summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common/saa7146_i2c.c
AgeCommit message (Collapse)Author
2009-04-02saa7146: fix incorrect comment.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-03-30v4l2: use old-style i2c API for kernels < 2.6.26 instead of < 2.6.22Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Originally the intention was to switch to the new style i2c API starting with the introduction of the API in 2.6.22. However, the i2c_new_probed_device() function has a lethal bug that wasn't fixed until 2.6.25. Or more accurately, it was only fixed in the stable series of 2.6.25 and 2.6.26. Given the fact that the new i2c API also changed starting with 2.6.26 (the addition of i2c_device_id), it is easiest to switch APIs starting with 2.6.26. This patch updates all the legacy code accordingly. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-28saa7146: Clean-up i2c error handlingMauro Carvalho Chehab
From: Oliver Endriss <o.endriss@gmx.de> saa7146: Clean-up i2c error handling Simplify i2c error handling and fix incorrect handling of address errors in poll mode. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-07saa7146: the adapter class will be NULL when v4l2_subdev is used.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-07saa7146: i2c adapdata now points to v4l2_device.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Prepare for converting to v4l2_subdev. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-11-25fix boards for kernels with algo_controlMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> changeset 4ecae6da8244 removed algo_control from i2c drivers. However, on older kernels, a dummy function to implement algo_control is required, otherwise, an OOPS is generated. This patch adds a backport for all i2c drivers that defines an i2c_algorithm, except for cafe_ccic, since OLPC hardware only works for kernels newer than 2.6.19. Some of the backported drivers would need also extra changes to work with older kernels, as specified on v4l/versions.txt. Yet, I decided to add the backport for those drivers also, since the lack of algo_control doesn't generate any compilation error, but it is enough to break the driver. So, better to all for all boards than to allow compiling a kernel backported that just generates OOPS. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-06-22saa7146: ->cpu_addr and friends are little-endianMauro Carvalho Chehab
From: Al Viro <viro@ftp.linux.org.uk> Annotations + stop saa7146_i2c from playing fast and loose with reuse of ->cpu_addr for host-endian. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-30backport tuners move patch from -gitMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Due to the feedback I got, I've changed the -git patch. This needs to be reflected also at -hg tree. kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-26From: Mauro Carvalho Chehab <mchehab@infradead.org>Mauro Carvalho Chehab
Move tuners to common/tuners There were several issues in the past, caused by the hybrid tuner design, since now, the same tuner can be used by drivers/media/dvb and drivers/media/video. This patch moves those common tuners into a common dir. It also moves saa7146 driver into drivers/media/video, where other hybrid drivers are placed. Kconfig items were rearranged, to split V4L/DVB core from their drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-08media/common/ replace remaining __FUNCTION__ occurrencesMichael Krufky
From: Harvey Harrison <harvey.harrison@gmail.com> __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2007-08-09saa7146: clean-up irq processingOliver Endriss
From: Oliver Endriss <o.endriss@gmx.de> Interrupt processing fixed: First handle interrupt, then acknowledge it. Otherwise the same interrupt might occur twice. Cleaned-up i2c interrupt handler and i2c error messages. Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2007-07-23dvb-ttpci/saa7146: Replace saa7146_i2c_transfer by generic i2c_transferOliver Endriss
From: Oliver Endriss <o.endriss@gmx.de> Convert av7110_v4l.c to use i2c_transfer() instead of saa7146_i2c_transfer(). Make saa7146_i2c_transfer() static. Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2007-02-19compat: Add -include linux/version.h to cflagsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Add -include linux/version.h to the cflags. Now code can have backward compatibility test without including compat.h first. Linux headers included from compat.h are removed, so that code will get the same headers when compiling in v4l-dvb as it does in the kernel. Many drivers have compat.h moved to the end of their include list, as this lets compat.h do things it can't do at the beginning. Such as test of something is defined to include compat code, or to put a wrapper around a function without changing the function's name. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-11-01saa7146: Add timeout protection for I2C interruptOliver Endriss
From: Hartmut Birr <e9hack@googlemail.com> Add a timeout to the wait for the i2c-interrupt. The timeout prevents from endless waiting if the interrupt gets lost. Signed-off-by: Hartmut Birr <e9hack@googlemail.com> Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2006-10-27[saa7146_i2c] short_delay mode fixed for fast machinesOliver Endriss
From: Oliver Endriss <o.endriss@gmx.de> TT DVB-C 2300 runs at 137 kHz I2C speed. short_delay mode did not work reliably on fast machines with that speed. Increased max loop count from 20 to 50. Moved dummy access out of the loop. Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2006-02-06sem2mutex: drivers/media/, #2Mauro Carvalho Chehab
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Kernel-sync from patch 3318b Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2005-11-26Whitespaces cleanups.Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-10-01Add compat.h for backwards compatabilityMichael Krufky
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2005-10-01[PATCH] I2C: Kill i2c_algorithm.name (1/7)Michael Krufky
The name member of the i2c_algorithm is never used, although all drivers conscientiously fill it. We can drop it completely, this structure doesn't need to have a name. [PATCH] I2C: Kill i2c_algorithm.id (4/7) There are no more users of i2c_algorithm.id, so we can finally drop this structure member. [PATCH] I2C: Kill i2c_algorithm.id (6/7) In theory, there should be no more users of I2C_ALGO_* at this point. However, it happens that several drivers were using I2C_ALGO_* for adapter ids, so we need to correct these before we can get rid of all the I2C_ALGO_* definitions. Note that this also fixes a bug in media/video/tvaudio.c: /* don't attach on saa7146 based cards, because dedicated drivers are used */ if ((adap->id & I2C_ALGO_SAA7146)) return 0; This test was plain broken, as it would succeed for many more adapters than just the saa7146: any those id would share at least one bit with the saa7146 id. We are really lucky that the few other adapters we want this driver to work with did not fulfill that condition. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2005-08-31From: Philipp Matthias Hahn <pmhahn@titan.lahn.de>Johannes Stezenbach
Integrate saa7146_i2c adapter into device model: Moves entries from /sys/device/platform to /sys/device/pci*. Signed-off-by: Philipp Hahn <pmhahn@titan.lahn.de>
2005-07-16Remove all #include <linux/version.h> and all referencesJohannes Stezenbach
to LINUX_VERSION_CODE and KERNEL_VERSION. Based on patch by Olaf Hering. Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
2005-06-19backport of 2.6.12 changes to match other API changes (i2c, usb)Johannes Stezenbach
2005-03-02whitespace cleanup (remove ws at eol, sync with changes in mainline kernel)Johannes Stezenbach
2004-11-21- prefix IER_DISABLE and IER_ENABLE with SAA7146_Johannes Stezenbach
- add SAA7146_ISR_CLEAR - use those consistently in the ttpci driver
2004-11-08- make needlessly global code staticMichael Hunold
- remove unused code Thanks to Adrian Bunk <bunk@stusta.de>
2004-08-11- Kernel Janitor: uses msleep() instead of my_wait() to guarantee the time ↵Michael Hunold
delay. Removes definition of my_wait(). Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
2004-06-21- compilation fix for analog 2.4 driversMichael Hunold
2004-06-21- Replace generic saa7146 i2c name by card specific name, suggested by Uli ↵Michael Hunold
Luckas <luckas@musoft.de>
2004-04-06- introduce new class variable, sets the i2c adapter class for 2.6 (unused ↵Michael Hunold
for 2.4)
2003-11-26- i2c timeout fix by Gerd KnorrMichael Hunold
2003-11-25introduced flag SAA7146_I2C_SHORT_DELAY to speed up I2C accessOliver Endriss
2003-11-14- sanitize enabling of video input pins and i2c pinsMichael Hunold
- use some default values, so the hardware is always in a sane state
2003-10-16- fix usage of i2c name field (has been changed again, see this for moreMichael Hunold
details: http://linus.bkbits.net:8080/linux-2.5/cset@1.1123.4.1?nav=index.html|src/.|src/drivers|src/drivers/media|src/drivers/media/common|related/drivers/media/common/saa7146_i2c.c
2003-10-14Include 2.6 kernel janitor cleanups (eliminate #include duplication, shiftMichael Hunold
includes around) -- I don't care much about this...
2003-07-17Fix build for 2.4.Michael Hunold
2003-07-17[V4L] - fix static build for hexium_gemini and hexium_orion drivers (Thanks ↵Michael Hunold
to Adrian Bunk <bunk@fs.tum.de> for reporting this) [V4L] - set debug verbosity to 0 for hexium_gemini and hexium_orion drivers [V4L] - make hexium_gemini and hexium_orion drivers depdend on i2c module [V4L] - make saa7146 module depend on hexium_gemini and hexium_orion drivers [V4L] - let the saa7146 i2c bus report itself as I2C_ADAP_CLASS_TV_ANALOG
2003-06-18When I submitted the last patchset for the 2.5 kernel series,Michael Hunold
Alan Cox reformatted the code to follow his coding style when he fixed the merge bugs. This patch now introduces these coding style changes, so that we don't wipe out his changes with the next patchset.
2003-06-16Fix to the jerking problem with tda10045hHolger Waechtler
2003-06-14i2c fixes and build fixes. Must have been brain-amputated yesterday...Holger Waechtler
2003-05-28I removed all "analog" drivers from the main CVS repository and moved themMichael Hunold
to a separate "analog-2.4" directory. Main reasons: - the drivers don't have anything to do with dvb 8-) - the drivers are already in the kernel (besides the "Hexium" driver) and don't change that much any more - the analog drivers rely on the i2c subsystem, which was heavily modified between 2.4 and 2.5. When making a new DVB patchset I have to work around these differences every time, which is very annoying
2003-05-19First try to use pci_consistent_dma() throughout the whole saa7146Michael Hunold
driver subsystem.
2003-04-28Compile fixes against 2.5.68.Michael Hunold
- add some ifdef magic into i2c drivers (mxb/analog drivers only) - shuffle around includes, so that "dvb_compat.h" is included after all other include files - fix a warning in saa7146 i2c code
2003-04-22- removed the compatibility crap around KBUILD_MODNAME from all drivers,Michael Hunold
use KBUILD_BASENAME for 2.4 instead ­ some changes to the i2c core to make it work with both 2.4 and late 2.5 kernels (not done yet -- only interesting for analog drivers) - add MODULE_DEVICE_TABLE to all drivers, so that pci "hotplug" can detect the devices automatically. Alan Cox says, that we should use this to load the firmware (not done yet) - fix the long standing "insmod/rmmod with multiple budget cards" bug -- it was a double kfree() call...
2003-03-20This is the beginning of some modifications to get the newMichael Hunold
"dvb-kernel" tree into shape for direct inclusion into the 2.5.x kernel.
2003-03-19- optimize the i2c retry-address error problem by distinguishing betweenMichael Hunold
analog tv cards and dvb cards. (see source comments for further informations)
2003-03-19wait between i2c retries and don't bail out on adress errors,Holger Waechtler
patch conributed by Andrew de Quincey <adq_dvb@lidskialf.net>
2003-01-13add a timeout to saa7146_i2c_writeout() to prevent endless loopJohannes Stezenbach
2003-01-10- Fix broken i2c irq transfer, due to Holger's changesMichael Hunold
- clean up the mxb driver and it's helper modules (rename the structures, add GPL license to the appropriate files, c99 initialisers) - fix 2.5.55 "module insertion causes bug in kobject.o" issue - fixed missing exported symbols in budget-core
2003-01-09return meaningful error valuesHolger Waechtler
2003-01-05After all, using the i2c irq wasn't a good idea. After long hours ofMichael Hunold
testing why the !#+?§"1 TS stream stops and "debi oops" messages appear, I found out that this is caused by the i2c irq handler. Don't ask me why, but returning to the old code solved this mystery. Apparently, the additional i2c interrupts caused some timing problems or the saa7146 is simply too f*cked up. I left the code in however, it works for the analog MXB driver, so the extension should decide if it should be used. Removed some additional debug messages, which were commented out anyway.