diff options
author | David Hardeman <david@hardeman.nu> | 2006-12-02 21:16:05 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-12-10 09:05:09 -0200 |
commit | 5cc8ae000233e8dad667edcdbb921668c317b627 (patch) | |
tree | 300925c88ea9a6253de602cc0531fda6be914a6b /drivers/media | |
parent | dd2f398ccb73530a99582e972aa57e3ed2fd73c6 (diff) | |
download | blackbird-op-linux-5cc8ae000233e8dad667edcdbb921668c317b627.tar.gz blackbird-op-linux-5cc8ae000233e8dad667edcdbb921668c317b627.zip |
V4L/DVB (4876): budget-ci IR: support EVIOCGPHYS
This patch adds a 'phys' string, of the same form as used by various other
DVB cards' IR drivers, for access by any program which uses the EVIOCPHYS
ioctl or may read /sys/class/input/*/phys (e.g. udev) to identify input
device nodes.
Taken from Darren Salt's dvb-ir patchset.
Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/ttpci/budget-ci.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c index 2893e752745b..0809fb90c264 100644 --- a/drivers/media/dvb/ttpci/budget-ci.c +++ b/drivers/media/dvb/ttpci/budget-ci.c @@ -76,6 +76,7 @@ struct budget_ci_ir { struct input_dev *dev; struct tasklet_struct msp430_irq_tasklet; char name[72]; /* 40 + 32 for (struct saa7146_dev).name */ + char phys[32]; }; struct budget_ci { @@ -205,8 +206,27 @@ static int msp430_ir_init(struct budget_ci *budget_ci) snprintf(budget_ci->ir.name, sizeof(budget_ci->ir.name), "Budget-CI dvb ir receiver %s", saa->name); + snprintf(budget_ci->ir.phys, sizeof(budget_ci->ir.phys), + "pci-%s/ir0", pci_name(saa->pci)); + input_dev->name = budget_ci->ir.name; + input_dev->phys = budget_ci->ir.phys; + input_dev->id.bustype = BUS_PCI; + input_dev->id.version = 1; + if (saa->pci->subsystem_vendor) { + input_dev->id.vendor = saa->pci->subsystem_vendor; + input_dev->id.product = saa->pci->subsystem_device; + } else { + input_dev->id.vendor = saa->pci->vendor; + input_dev->id.product = saa->pci->device; + } +# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) + input_dev->cdev.dev = &saa->pci->dev; +# else + input_dev->dev = &saa->pci->dev; +# endif + set_bit(EV_KEY, input_dev->evbit); for (i = 0; i < ARRAY_SIZE(key_map); i++) if (key_map[i]) |