summaryrefslogtreecommitdiff
path: root/drivers/media/video/ivtv/ivtv-i2c.c
AgeCommit message (Collapse)Author
2011-03-22[media] rc/keymaps: Remove the obsolete rc-rc5-tv keymapMauro Carvalho Chehab
This keymap were used for the Hauppauge Black remote controller only. It also contains some keycodes not found there. As the Hauppauge Black is now part of the hauppauge keymap, just remove it. Also, remove the modprobe hacks to select between the Gray and the Black versions of the remote controller as: - Both are supported by default by the keymap; - If the user just wants one keyboard supported, it is just a matter of changing the keymap via the userspace tool (ir-keytable), removing the keys that he doesn't desire. As ir-keytable auto-loads the keys via udev, this is better than obscure modprobe parameters. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22[media] remove the old RC_MAP_HAUPPAUGE_NEW RC mapMauro Carvalho Chehab
The rc-hauppauge-new map is a messy thing, as it bundles 3 different remote controllers as if they were just one, discarding the address byte. Also, some key maps are wrong. With the conversion to the new rc-core, it is likely that most of the devices won't be working properly, as the i2c driver and the raw decoders are now providing 16 bits for the remote, instead of just 8. delete mode 100644 drivers/media/rc/keymaps/rc-hauppauge-new.c Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-01-19[media] v4l2-subdev: remove core.s_config and v4l2_i2c_new_subdev_cfg()Hans Verkuil
The core.s_config op was meant for legacy drivers that needed to work with old pre-2.6.26 kernels. This is no longer relevant. Unfortunately, this op was incorrectly called from several drivers. Replace those occurences with proper i2c_board_info structs and call v4l2_i2c_new_subdev_board. After these changes v4l2_i2c_new_subdev_cfg() was no longer used, so remove that function as well. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30[media] ivtv-i2c: Fix two warningsMauro Carvalho Chehab
Fix two gcc warnings: drivers/media/video/ivtv/ivtv-i2c.c:170: warning: cast from pointer to integer of different size drivers/media/video/ivtv/ivtv-i2c.c:171: warning: cast from pointer to integer of different size $ gcc --version gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48) They seem bogus, but, as the original code also has problems with LE/BE, just change its implementation to be clear. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30[media] ivtv-i2c: Don't use IR legacy mode for Zilog IRMauro Carvalho Chehab
The Zilog IR entries are already handled by IR new code. So, remove its usage from the legacy IR support. Acked-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30[media] ivtv: Add Adaptec Remote ControllerMauro Carvalho Chehab
lirc-i2c implements a get key logic for the Adaptec Remote Controller, at address 0x6b. The only driver that seems to have an Adaptec device is ivtv: $ git grep -i adaptec drivers/media drivers/media/video/cs53l32a.c: * cs53l32a (Adaptec AVC-2010 and AVC-2410) i2c ivtv driver. drivers/media/video/cs53l32a.c: * Audio source switching for Adaptec AVC-2410 added by Trev Jackson drivers/media/video/cs53l32a.c: /* Set cs53l32a internal register for Adaptec 2010/2410 setup */ drivers/media/video/ivtv/ivtv-cards.c:/* Adaptec VideOh! AVC-2410 card */ drivers/media/video/ivtv/ivtv-cards.c: { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0093 }, drivers/media/video/ivtv/ivtv-cards.c: .name = "Adaptec VideOh! AVC-2410", drivers/media/video/ivtv/ivtv-cards.c:/* Adaptec VideOh! AVC-2010 card */ drivers/media/video/ivtv/ivtv-cards.c: { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0092 }, drivers/media/video/ivtv/ivtv-cards.c: .name = "Adaptec VideOh! AVC-2010", drivers/media/video/ivtv/ivtv-cards.h:#define IVTV_CARD_AVC2410 7 /* Adaptec AVC-2410 */ drivers/media/video/ivtv/ivtv-cards.h:#define IVTV_CARD_AVC2010 8 /* Adaptec AVD-2010 (No Tuner) */ drivers/media/video/ivtv/ivtv-cards.h:#define IVTV_PCI_ID_ADAPTEC 0x9005 drivers/media/video/ivtv/ivtv-driver.c: "\t\t\t 8 = Adaptec AVC-2410\n" drivers/media/video/ivtv/ivtv-driver.c: "\t\t\t 9 = Adaptec AVC-2010\n" drivers/media/video/ivtv/ivtv-i2c.c: 0x6b, /* Adaptec IR */ There are two Adaptec cards defined there, but AVC-2010 doesn't have a remote controller. So, the logic at lirc_i2c seems to be for Adaptec AVC-2410. As we'll remove lirc_i2c from kernel, move the getkey code to ivtv driver, and use it for AVC-2410. Reviewed-by: Andy Walls <awalls@md.metrocast.net> Acked-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29[media] rc: Rename remote controller type to rc_type instead of ir_typeMauro Carvalho Chehab
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,IR_TYPE,RC_TYPE,g <$i >a && mv a $i; done for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_type,rc_type,g <$i >a && mv a $i; done Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-11-22[media] v4l: Remove module_name argument to the v4l2_i2c_new_subdev* functionsLaurent Pinchart
The argument isn't used anymore by the functions, remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-22[media] ivtv: Don't use module names to load I2C modulesLaurent Pinchart
With the v4l2_i2c_new_subdev* functions now supporting loading modules based on modaliases, replace the hardcoded module name passed to those functions by NULL. The sub-devices without a listed module name don't result in and I2C sub-device being created, as they either are IR devices or don't have an I2C address listed. It's thus safe to rely on modaliases only. All corresponding I2C modules have been checked, and all of them include a module aliases table with names corresponding to what the ivtv driver uses. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-11i2c: Add support for custom probe functionJean Delvare
The probe method used by i2c_new_probed_device() may not be suitable for all cases. Let the caller provide its own, optional probe function. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-08V4L/DVB: cx25840/ivtv: replace ugly priv control with s_configHans Verkuil
The cx25840 used a private control CX25840_CID_ENABLE_PVR150_WORKAROUND to be told whether to enable a workaround for certain pvr150 cards. This is really config data that it needs to get at load time. Implemented this in cx25840 and ivtv. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: ir-core: Make use of the new IR keymap modulesMauro Carvalho Chehab
Instead of using the ugly keymap sequences, use the new rc-*.ko keymap files. For now, it is still needed to have one keymap loaded, for the RC code to work. Later patches will remove this depenency. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: ir: use IR_KEYTABLE where an IR table is neededMauro Carvalho Chehab
Replaces most of the occurences of IR keytables on V4L drivers by a macro that evaluates to provide the name of the exported symbol. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13446): ivtv: Add more explicit detection of known IR devices for ↵Andy Walls
Hauppauge cards Avoid legacy IR I2C probing for PVR-150, PVR-500, and PVR-350 cards. This still probes, but restricts the possbile addresses probed per card. Also removed legacy probe addresses for the KNC and PixelView cards which are not supported by ivtv as far as I know. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13444): ivtv: Add explicit IR controller initialization for the ↵Andy Walls
AVerTV M116 Add explicit support for the AVerTV M116 for use with the ir-kbd-i2c module. This also eases future support for other AVerMedia ivtv boards with the same microcontroller program at I2C address 0x40. This is a reworked version of an earlier patch that was... Reviewed-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13443): ivtv: Defer legacy I2C IR probing until after setup of ↵Andy Walls
known I2C devices This avoids collisions of legacy IR controller probing with known I2C devices in the card definitions in ivtv-cards.c. I2C driver modules for device listed explicitly in a card definition should always take precedence over a probe guessing where and IR controller may be. Reviewed-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13442): ivtv: Add module parameter to adjust I2C SCL clock period ↵Andy Walls
per board Add a module parameter to adjust I2C SCL clock period per board. This allows some experimental fine tuning by end users to overcome quirky I2C device problems. Reported-by: "Aleksandr V. Piskunov" <aleksandr.v.piskunov@gmail.com> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19V4L/DVB (12540): v4l: simplify v4l2_i2c_new_subdev and friendsHans Verkuil
Rewrite v4l2_i2c_new_subdev as a simplified version of v4l2_i2c_new_subdev_cfg and remove v4l2_i2c_new_probed_subdev and v4l2_i2c_new_probed_subdev_addr. This simplifies this API substantially. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12343): Stop defining I2C adapter IDs nobody usesJean Delvare
There is no point in defining I2C adapter IDs when no code is using them. As this field might go away in the future, stop using it when we don't need to. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11849): ivtv: Probe more I2C addresses for IR devicesJean Delvare
Probe I2C addresses 0x71 and 0x6b for IR receiver devices (for the PVR150 and Adaptec cards, respectively.) Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11844): ir-kbd-i2c: Switch to the new-style device binding modelJean Delvare
Let card drivers probe for IR receiver devices and instantiate them if found. Ultimately it would be better if we could stop probing completely, but I suspect this won't be possible for all card types. There's certainly room for cleanups. For example, some drivers are sharing I2C adapter IDs, so they also had to share the list of I2C addresses being probed for an IR receiver. Now that each driver explicitly says which addresses should be probed, maybe some addresses can be dropped from some drivers. Also, the special cases in saa7134-i2c should probably be handled on a per-board basis. This would be more efficient and less risky than always probing extra addresses on all boards. I'll give it a try later. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11375): v4l2: use v4l2_i2c_new_probed_subdev_addr where appropriate.Hans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11373): v4l2-common: add explicit v4l2_device pointer as first arg ↵Hans Verkuil
to new_(probed)_subdev The functions v4l2_i2c_new_subdev and v4l2_i2c_new_probed_subdev relied on i2c_get_adapdata to return the v4l2_device. However, this is not always possible on embedded platforms. So modify the API to pass the v4l2_device pointer explicitly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10488): ivtv: cleanup naming conventionsHans Verkuil
Use consistent naming for pci_dev, v4l2_device and video_device. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30V4L/DVB (9835): ivtv/ivtvfb: convert to v4l2_device/v4l2_subdev.Hans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9328): ivtvfb: FB_BLANK_POWERDOWN turns off video outputIan Armstrong
When using FBIOBLANK, FB_BLANK_POWERDOWN will now switch off the video output. Since some televisions turn themselves off after a while with no signal, this is the closest we can get to power-saving. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12V4L/DVB (8856): v4l: fix assorted compile warnings/errorsHans Verkuil
BIT define conflicts on kernels < 2.6.24, byteorder/swab.h doesn't need to be included at all. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-07-20V4L/DVB (8379): saa7127: Make device detection optionalJean Delvare
The saa7127 driver supports all of SAA7126, SAA7127, SAA7128 and SAA1729 devices. Declare all these devices, so that board drivers can tell which device is present, instead of always relying on auto-detection (which needs to write to the chip, eek!). We still need the detection for ivtv, so a special device name "saa7127_auto" can be used when the caller doesn't know exactly which device is present. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20v4l-dvb: remove legacy checks to allow support for kernels < 2.6.10Hans Verkuil
Also remove some blank lines that were used to split compat code at -devel tree. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-18i2c: Convert remaining new-style drivers to use module aliasingJean Delvare
Update all the remaining new-style i2c drivers to use standard module aliasing instead of the old driver_name/type driver matching scheme. Note that the tuner driver is a bit quirky at the moment, as it overwrites i2c_client.name with arbitrary strings. We write "tuner" back on remove, to make sure that driver cycling will work properly, but there may still be troublesome corner cases. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-04-29V4L/DVB (7756): ivtv: use strlcpy instead of strcpyHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7534): ivtv: the upd* modules have to be probed to properly ↵Hans Verkuil
autodetect some cards Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6915): ivtv: drop an incorrect commentJean Delvare
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6896): ivtv: add XC2028 support for Club3D cardsHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6765): ivtv: convert to bus-based i2c APIHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6488): ivtv: add ASUS Falcon2 supportHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-07V4L/DVB (6916): ivtv: udelay has to be changed *after* the eeprom was read, ↵Hans Verkuil
not before The eeprom decides which Hauppauge model it is, so the decision whether to use an udelay of 5 or 10 needs to be taken after reading the eeprom, not before. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-24V4L/DVB (6876): ivtv: mspx4xx needs a longer i2c udelayHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-11V4L/DVB (6796): ivtv/ section fixAdrian Bunk
This patch fixes the following section mismatch with CONFIG_HOTPLUG=n: <-- snip --> ... ... <-- snip --> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-31[MEDIA] IVTV: exit_ivtv_i2c() cannot be __devexitDavid Miller
It is referenced both from __devinit code (ivtv_probe) and normal .text (ivtv_process_eeprom), and therefore cannot be discarded via __devexit. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-09V4L/DVB (6113): ivtv: udelay for the i2c bus was set too highHans Verkuil
An udelay of 5 is sufficient for standard speed i2c busses, 10 make it too slow. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6081): ivtv: Fix static structure initializationJean Delvare
Convert the initialization of ivtv_i2c_algo_template to C99-style. Otherwise a future change to struct i2c_algo_bit_data would break this code. Also declared that structure const - it's a template after all. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (5929): Add vp27smpx driverHans Verkuil
This device is internal to the Panasonic VP27S tuner and is used to set the mono/stereo/bilingual setting of the tuner. It is used by two Japanese cx23416-based cards. Signed-off-by: Takahiro Adachi <tadachi@tadachi-net.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-20V4L/DVB (5854): ivtv: cleanup of driver messagesHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-20V4L/DVB (5853): ivtv: add support to suppress high volume i2c debug messages.Hans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27V4L/DVB (5405): Add missing includes.Hans Verkuil
Every file should include the headers containing the prototypes for its global functions. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27V4L/DVB (5388): Ivtv warning fixAndrew Morton
drivers/media/video/ivtv/ivtv-i2c.c:547: warning: initializer-string for array of chars is too long drivers/media/video/ivtv/ivtv-i2c.c:547: warning: (near initialization for 'ivtv_i2c_client_template.name') Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27V4L/DVB (5379): If possible make vars/functions static.Hans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27V4L/DVB (5356): Fix bogus error messages in ivtv for VIDIOC_G_CHIP_IDENTHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27V4L/DVB (5345): ivtv driver for Conexant cx23416/cx23415 MPEG encoder/decoderHans Verkuil
It took three core maintainers, over four years of work, eight new i2c modules, eleven new V4L2 ioctls, three new DVB video ioctls, a Sliced VBI API, a new MPEG encoder API, an enhanced DVB video MPEG decoding API, major YUV/OSD contributions from Ian and John, web/wiki/svn/trac support from Axel Thimm, (hardware) support from Hauppauge, support and assistance from the v4l-dvb people and the many, many users of ivtv to finally make it possible to merge this driver into the kernel. Thank you all! Signed-off-by: Kevin Thayer <nufan_wfk@yahoo.com> Signed-off-by: Chris Kennedy <c@groovy.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: John P Harvey <john.p.harvey@btinternet.com> Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>