summaryrefslogtreecommitdiff
path: root/drivers/staging/tm6000/tm6000-i2c.c
AgeCommit message (Collapse)Author
2011-06-28tm6000: Cleaned up code style in tm6000-i2c.cCurtis McEnroe
Replaced __FUNCTION__ with __func__ Signed-off-by: Curtis McEnroe <programble@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-20[media] tm6000: add detection based on eeprom nameMauro Carvalho Chehab
On some situations, it is desired to use eeprom data to detect the board type. This patch adds a logic for it and fixes 2 detection issues: 1) 10Moons UT-821 uses a generic Trident ID. Other boards also share the same ID. So, better to use an alternative way for it; 2) Sometimes, HVR-900H is loaded with the default Trident ID. This seems to be some hardware bug or race condition. The new logic will only be enabled if the device is detected as having a generic ID. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29[media] TM6000: Drop unused macroJean Delvare
Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Michel Ludwig <michel.ludwig@gmail.com> Cc: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29[media] TM6000: Clean-up i2c initializationJean Delvare
Usage of templates for large structures is a bad idea, as it wastes a lot of space. Manually initializing the few fields we need is way more efficient. Also set the algorithm data const, use strlcpy instead of strcpy, fix a small race (device data must always be set before registering said device) and properly return error on adapter registration failure. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Michel Ludwig <michel.ludwig@gmail.com> Cc: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-31i2c: Drop unused I2C_CLASS_TV flagsJean Delvare
There are no users left for I2C_CLASS_TV_ANALOG and I2C_CLASS_TV_DIGITAL, so we can get rid of them. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-21[media] tm6000: fix comments coding style issue in group of filesRuslan Pisarev
This is a patch to the tm6000-cards.c tm6000-core.c tm6000-dvb.c tm6000-i2c.c tm6000-input.c tm6000-regs.h tm6000-stds.c tm6000-usb-isoc.h tm6000.h files that fixed up a comments warnings found by the checkpatch.pl tools. Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] tm6000: don't initialize static var on tm6000-i2c.cRuslan Pisarev
This is a patch to the tm6000-i2c.c file that fixed "ERROR: do not initialise statics to 0 or NULL" found by the checkpatch.pl tools. Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21V4L/DVB: tm6000: removed unused i2c adapter IDHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: Staging: tm6000: Fix coding style issuesTimofey Trofimov
Fixed coding style issues founded by checkpatch.pl in files: tm6000-alsa.c,tm6000-cards, tm6000-core.c, tm6000-dvb.c, tm6000-i2c.c, tm6000-stds.c, tm6000-usb-isoc.h, tm6000.h [mchehab@redhat.com: Fix some compilation breakages] Signed-off-by: Timofey Trofimov <tumoxep@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: tm6000: fix i2c readDmitri Belimov
Set correct limit for I2C packet. Use different method for the tm5600/tm6000 and tm6010 to read word. [mchehab@redhat.com: Fix CodingStyle] Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: tm6000: tm6000_i2c_xfer: request labelingStefan Ringel
labeling the request after tuner reading and writeing Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB: tm6000: bugfix reading problems with demodulator zl10353Stefan Ringel
Reading from zl10353 with tm6000 has a bug. For example: regs w/o patch with patch 0x06 0x00 0x7f 0x07 0x33 0x30 0x08 0x00 0x00 0x09 0x58 0x50 0x0f 0x31 0x28 0x10 0x00 0x84 This patch provides the workaround for the bug [mchehab@redhat.com: Fix merge conflict and add a comment at the workaround] Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB: tm6000: add send and recv functionStefan Ringel
Split the i2c send and receive functions on separate functions [mchehab@redhat.com: CodingStyle and fix the logic for more than 2 read values] Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB: tm6000: fix some info messagesDmitri Belimov
Fix some messages for add information about TM6010 Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB: tm6000: fix i2c addr testStefan Ringel
The i2c addr on I2C core is specified on 7-bit format, but tm6000 expects it on 8-bit format. Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB: tm6000: special request for all tunerStefan Ringel
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB: tm6000: add special usb request to quit i2c tuner transferStefan Ringel
After sending an i2c command, tm6010 needs a reset, in order to properly work. While here, add the missing I2C_CLASS_TV_DIGITAL i2c class. Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18tm6000: Remove legacy code to work with older kernel versionsMauro Carvalho Chehab
Such code has no space upstream and prevents tm6000 from compiling. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB (12853): tm6000: Fix almost all warnings at the driverMauro Carvalho Chehab
Onr warning is left, since it is there for a purpose: tm6000-core.c:218: warning: ISO C90 forbids mixed declarations and code It indicates a place where a temporary hack were added. Tests are needed to be sure that we can remove it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB (12852): tm6000: Fix compilation against 2.6.31Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB (12835): tm6000: Cleanups to work like em28xx-videoMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB (12821): tm6000: update USB request names and clean up i2c routineChris Pascoe
Update the descriptions of the USB request types so that they match what we now know they do. Rework the i2c_xfer function so that it is more explicit what sort of I2C transfers it is that the tm6000 can't perform. Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB (12820): tm6000: fix i2c readingsChristopher Pascoe
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB (12814): tm6000: fix eeprom reading on tm6000Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB (12813): tm6000: all read messages should use prev_regMauro Carvalho Chehab
read messages with length>1 where using the wrong register. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB (12801): tm6000: Add support for ADSTech Mini Dual TV (PTV-339).Michel Ludwig
Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB (12793): tm6000: On some kernels, eeprom reading were generating a bugMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB (12786): tm6000: Remove code dealing with the ZL10353Michel Ludwig
Remove code dealing with the ZL10353 as this is all handled by the ZL10353 module. Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB (12785): tm6000: allow user gpio address for tuner resetMichel Ludwig
Modify tuner_callback to user the device's GPIO address field for tuner reset. Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB (12783): tm6000: add xc2028/3028 to dvbMichel Ludwig
Add experimental DVB frontend tuner interface to xc2028/3028 Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB (12780): tm6000: Improve handling of SMBus Write Byte commands ↵Michel Ludwig
followed by a read command. SMBus Write Byte commands followed by a read command on the same I2C address are not sent out to the chip as they wouldn't have any effect. Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB (12778): tm6000: Fix SMBus Read Byte commandMichel Ludwig
Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB (12770): Add tm6000 driver to staging treeMauro Carvalho Chehab
Adds a driver for Trident TV Master tm5600/tm6000 chips. Those USB devices are usually found with a Xceive xc2028/xc3028 tuner, although the firmware seems to be modified to work with those chips on some older devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>