diff options
author | David Hardeman <david@hardeman.nu> | 2006-12-02 18:16:05 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-12-10 06:05:09 -0500 |
commit | 5cc8ae000233e8dad667edcdbb921668c317b627 (patch) | |
tree | 300925c88ea9a6253de602cc0531fda6be914a6b /drivers/media/dvb | |
parent | dd2f398ccb73530a99582e972aa57e3ed2fd73c6 (diff) |
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/dvb')
-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 { | |||
76 | struct input_dev *dev; | 76 | struct input_dev *dev; |
77 | struct tasklet_struct msp430_irq_tasklet; | 77 | struct tasklet_struct msp430_irq_tasklet; |
78 | char name[72]; /* 40 + 32 for (struct saa7146_dev).name */ | 78 | char name[72]; /* 40 + 32 for (struct saa7146_dev).name */ |
79 | char phys[32]; | ||
79 | }; | 80 | }; |
80 | 81 | ||
81 | struct budget_ci { | 82 | struct budget_ci { |
@@ -205,8 +206,27 @@ static int msp430_ir_init(struct budget_ci *budget_ci) | |||
205 | 206 | ||
206 | snprintf(budget_ci->ir.name, sizeof(budget_ci->ir.name), | 207 | snprintf(budget_ci->ir.name, sizeof(budget_ci->ir.name), |
207 | "Budget-CI dvb ir receiver %s", saa->name); | 208 | "Budget-CI dvb ir receiver %s", saa->name); |
209 | snprintf(budget_ci->ir.phys, sizeof(budget_ci->ir.phys), | ||
210 | "pci-%s/ir0", pci_name(saa->pci)); | ||
211 | |||
208 | input_dev->name = budget_ci->ir.name; | 212 | input_dev->name = budget_ci->ir.name; |
209 | 213 | ||
214 | input_dev->phys = budget_ci->ir.phys; | ||
215 | input_dev->id.bustype = BUS_PCI; | ||
216 | input_dev->id.version = 1; | ||
217 | if (saa->pci->subsystem_vendor) { | ||
218 | input_dev->id.vendor = saa->pci->subsystem_vendor; | ||
219 | input_dev->id.product = saa->pci->subsystem_device; | ||
220 | } else { | ||
221 | input_dev->id.vendor = saa->pci->vendor; | ||
222 | input_dev->id.product = saa->pci->device; | ||
223 | } | ||
224 | # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) | ||
225 | input_dev->cdev.dev = &saa->pci->dev; | ||
226 | # else | ||
227 | input_dev->dev = &saa->pci->dev; | ||
228 | # endif | ||
229 | |||
210 | set_bit(EV_KEY, input_dev->evbit); | 230 | set_bit(EV_KEY, input_dev->evbit); |
211 | for (i = 0; i < ARRAY_SIZE(key_map); i++) | 231 | for (i = 0; i < ARRAY_SIZE(key_map); i++) |
212 | if (key_map[i]) | 232 | if (key_map[i]) |