summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
Commit message (Collapse)AuthorAgeFilesLines
* i2c-tiny-usb: New VID/PID pairTill Harbaum2008-04-111-4/+8
| | | | | | | | | | | | | I have recently bought some USB PIDs from EZPrototypes for my USB projects and one will be for the i2c-tiny-usb. I have not yet started to use the new one in the official i2c-tiny-usb firmware since i think it makes sense to get the change into the kernel before releasing a modified firmware. This patch adds support for the EZPrototypes USB vid/pid pair used in later i2c-tiny-usb firmware versions (avrusb v1.06 and up, usbtiny v2.06 and up). Signed-off-by: Till Harbaum <Till@Harbaum.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-davinci: Fix lost interruptTroy Kisky2008-04-111-11/+6
| | | | | | | | | | DAVINCI_I2C_STR_REG is a write 1 to clear register, so don't use a read/modify/write cycle. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Acked-by: Dirk Behme <dirk.behme@gmail.com> Signed-off-by: Kevin Hilman <khilman@mvista.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-ibm_iic: Fast mode parm desc fixupPaul Mundt2008-04-111-1/+1
| | | | | | | | | Noticed this when grepping for fast mode module params, the i2c-ibm_iic driver was using a non-existent variable for MODULE_PARM_DESC. Fix it up to reflect what it's actually supposed to be describing. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c: Fix docbook problemRandy Dunlap2008-03-231-2/+2
| | | | | | | | | | | | | | | | | | | | | Sometimes kernel-doc and xmlto conspire to create output that is invalid and causes problems. Until I know a real/better solution, change the source code that causes this. If anyone has better fixes or can just explain what is happening here, that would be great. xmlto: input does not validate (status 1) mmotm-2008-0314-1449/Documentation/DocBook/kernel-api.xml:71468: parser error : Opening and ending tag mismatch: programlisting line 71464 and para </para><para> ^ mmotm-2008-0314-1449/Documentation/DocBook/kernel-api.xml:71480: parser error : Opening and ending tag mismatch: para line 71473 and programlisting </programlisting></informalexample> ^ make[1]: *** [Documentation/DocBook/kernel-api.html] Error 1 Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-omap: Fix unhandled faultTony Lindgren2008-03-231-8/+28
| | | | | | | | | | | | | | | | | | | | | | | If an I2C interrupt happens between disabling interface clock and functional clock, the interrupt handler will produce an external abort on non-linefetch error when trying to access driver registers while interface clock is disabled. This patch fixes the problem by saving and disabling i2c-omap interrupt before turning off the clocks. Also disable functional clock before the interface clock as suggested by Paul Walmsley. Patch also renames enable/disable_clocks functions to unidle/idle functions. Note that the driver is currently not taking advantage of the idle interrupts. To use the idle interrupts, driver would have to enable interface clock based on the idle interrupt and dev->idle flag. This patch has been tested in linux-omap tree with various omaps. Cc: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-bfin-twi: Disable BF54x support for nowBryan Wu2008-03-231-1/+1
| | | | | | | | | The i2c-bfin-twi driver doesn't support BF54x for now due to missing header definitions causing the build to fail. Exclude it for now, it will be enabled again later. Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c: chips subdirectory is deprecatedJean Delvare2008-03-121-0/+7
| | | | | | | Let driver authors know that drivers/i2c/chips is usually the wrong place for new drivers. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c: Keep client->driver and client->dev.driver in syncHans Verkuil2008-03-121-1/+5
| | | | | | | | | Ensure that client->driver is set to NULL if the probe() returns an error (this keeps client->driver and client->dev.driver in sync). Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-amd756: Fix off-by-oneAdrian Bunk2008-03-121-1/+1
| | | | | | | This patch fixes an off-by-one error spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-i801: Add support for the ICH10Gaston, Jason D2008-02-242-2/+10
| | | | | | | | Add the Intel ICH10 SMBus Controller DeviceID's and updates Tolapai support. Signed-off-by: Jason Gaston <jason.d.gaston@intel.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-pca-isa: Add access check to legacy ioportsChristian Krafft2008-02-241-0/+7
| | | | | | | | | | When probing i2c-pca-isa writes to legacy ioports, which crashes the kernel if there is no device at that port. This patch adds a check_legacy_ioport call, so probe fails gracefully and thus prevents the oops. Signed-off-by: Christian Krafft <krafft@de.ibm.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c: Storage class should be before const qualifierTobias Klauser2008-02-241-2/+2
| | | | | | | | | | | The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c-pxa: Misc fixesWolfram Sang2008-02-241-11/+14
| | | | | | | | | | | | | While working on the PCA9564-platform driver, I sometimes had a glimpse at the pxa-driver. I found some suspicious places, and this patch contains my suggestions. Note: They are not tested, due to no hardware. [JD: Some more fixes.] Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Mike Rapoport <mike@compulab.co.il> Tested-by: Eric Miao <ymiao3@marvell.com>
* [ARM] 4827/1: fix two warnings in drivers/i2c/busses/i2c-pxa.cHolger Schurig2008-02-171-1/+3
| | | | | | | | | | | | This fixes two warnings: * unused static defined function decode_ICR() when compiled without CONFIG_I2C_PXA_SLAVE * a sparse warning about a void function returning something Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* hwmon: Discard useless I2C driver IDsJean Delvare2008-02-073-3/+0
| | | | | | | | | Many I2C hwmon drivers define a driver ID but no other code references these, meaning that they are useless. Discard them, along with a few IDs which are defined but never used at all. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
* deprecate obsolete pca9539 drivereric miao2008-02-051-2/+5
| | | | | | | | | | | | | | | Use drivers/gpio/pca9539.c instead. Signed-off-by: eric miao <eric.miao@marvell.com> Acked-by: Ben Gardner <bgardner@wabtec.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Philipp Zabel <philipp.zabel@gmail.com> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* PCI: Remove users of pci_enable_device_bars()Benjamin Herrenschmidt2008-02-011-1/+1
| | | | | | | | | | | | | | | This patch converts users of pci_enable_device_bars() to the new pci_enable_device_{io,mem} interface. The new API fits nicely, except maybe for the QLA case where a bit of code re-organization might be a good idea but I prefer sticking to the simple patch as I don't have hardware to test on. I'll also need some feedback on the cs5520 change. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge branch 'orion' into develRussell King2008-01-282-16/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * orion: (26 commits) [ARM] Orion: implement power-off method for QNAP TS-109/209 [ARM] Orion: add support for QNAP TS-109/TS-209 [ARM] Orion: I2C support [I2C] i2c-mv64xxx: Don't set i2c_adapter.retries [I2C] Split mv643xx I2C platform support [ARM] Orion: enable CONFIG_RTC_DRV_M41T80 for D-Link DNS-323 [ARM] Orion defconfig [ARM] Orion: add support for Orion/MV88F5181 based D-Link DNS-323 [ARM] Orion: MV88F5181 support bits [ARM] Orion: Buffalo/Revogear Kurobox Pro support [ARM] OrionNAS RD board support [ARM] Orion: support for Marvell Orion-2 (88F5281) Development Board [ARM] Orion: common platform setup for Gigabit Ethernet port [ARM] Orion: platform device registration for UART, USB and NAND [ARM] Orion: system timer support [ARM] Orion edge GPIO IRQ support [ARM] Orion: IRQ support [ARM] Orion: provide GPIO method for enabling hardware assisted blinking [ARM] Orion: GPIO support [ARM] Orion: programable address map support ... Conflicts: arch/arm/Kconfig arch/arm/Makefile Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * [I2C] i2c-mv64xxx: Don't set i2c_adapter.retriesJean Delvare2008-01-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | I2C adapter drivers are supposed to handle retries on nack by themselves if they do, so there's no point in setting .retries if they don't. As this retry mechanism is going away (at least in its current form), clean this up now so that we don't get build failures later. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Mark A. Greer <mgreer@mvista.com>
| * [I2C] Split mv643xx I2C platform supportTzachi Perelstein2008-01-262-15/+18
| | | | | | | | | | | | | | | | | | | | | | The motivation for this change is to allow other chips, like the Marvell Orion ARM SoC family, to use the existing i2c-mv64xxx driver. Signed-off-by: Tzachi Perelstein <tzachi@marvell.com> Acked-by: Nicolas Pitre <nico@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org> Acked-by: Mark A. Greer <mgreer@mvista.com> Acked-by: Jean Delvare <khali@linux-fr.org>
* | i2c-bfin-twi: Register adapter with a specific bus numberKalle Pokki2008-01-271-1/+2
| | | | | | | | | | | | | | | | | | All the users of this driver explicitly specify the I2C bus numbers to be used in their platform data. Make the driver respect that. Signed-off-by: Kalle Pokki <kalle.pokki@eke.fi> Cc: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-au1550: Convert to platform driverManuel Lauss2008-01-272-96/+102
| | | | | | | | | | | | | | | | | | Convert the i2c-au1550 bus driver to platform driver, and register a platform device for the Alchemy Db/Pb series of boards. Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-au1550: properly terminate zero-byte transfersManuel Lauss2008-01-271-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Zero-bytes transfers would leave the bus transaction unfinished (no i2c stop is sent), with the following transfer actually sending the slave address to the previously addressed device, resulting in weird device failures (e.g. reset minute register values in my RTC). This patch instructs the controller to send an I2C STOP right after the slave address in case of a zero-byte transfer. Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | mpc-i2c: Propagate error values properlyJon Smirl2008-01-271-12/+16
| | | | | | | | | | | | | | | | Propagate the error values returned by i2c_wait() instead of overriding them with a meaningless -1. Signed-off-by: Jon Smirl <jonsmirl@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c: Add i2c_new_dummy() utilityDavid Brownell2008-01-271-1/+58
| | | | | | | | | | | | | | | | | | This adds a i2c_new_dummy() primitive to help work with devices that consume multiple addresses, which include many I2C eeproms and at least one RTC. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c: Drop legacy locking in i2c_new_probed_deviceJean Delvare2008-01-271-2/+0
| | | | | | | | | | | | | | | | It is no longer required to hold adapter->clist_lock to call i2c_check_addr. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <david-b@pacbell.net>
* | i2c: Limit locking scope in i2c_detach_clientJean Delvare2008-01-271-1/+2
| | | | | | | | | | | | We only need to hold adapter->clist_lock when we touch the client list. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-remove-redundant-i2c_client-list.patchDavid Brownell2008-01-271-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This goes on top of the patch removing most i2c_adapter.clients usage, updating i2c_attach_client: - Don't call device_register() while holding clist_lock. This removes a self-deadlock when on the i2c_driver.probe() path, for drivers that need to attach new devices (e.g. dummies). - Remove a redundant address check. The driver model core does this as a consequence of guaranteeing unique names. - Move the "device registered" diagnostic so that it never lies; previously, on error paths it would falsely report success. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c: Stop using the redundant client listDavid Brownell2008-01-272-49/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The i2c_adapter.clients list of i2c_client nodes duplicates driver model state. This patch starts removing that list, letting us remove most existing users of those i2c-core lists. * The core I2C code now iterates over the driver model's list instead of the i2c-internal one in some places where it's safe: - Passing a command/ioctl to each client, a mechanims used almost exclusively by DVB adapters; - Device address checking, in both i2c-core and i2c-dev. * Provide i2c_verify_client() to use with driver model iterators. * Flag the relevant i2c_adapter and i2c_client fields as deprecated, to help prevent new users from appearing. For the moment the list needs to stick around, since some issues show up when deleting devices created by legacy I2C drivers. (They don't follow standard driver model rules. Removing those devices can cause self-deadlocks.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-viapro: Add support for the VT8237SJean Delvare2008-01-272-2/+6
| | | | | | | | | | | | | | Add support for another variant of the VT8237. I couldn't test I2C block support but I assume it is present as well. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-piix4: Drop redundant PCI function number checkJean Delvare2008-01-271-26/+15
| | | | | | | | | | | | | | Checking the PCI function number doesn't add any value, and it makes adding dynamic IDs to the driver more difficult. Drop this check. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c: Let the user specify PCI driver data through new_idJean Delvare2008-01-272-0/+10
| | | | | | | | | | | | | | | | | | | | | | The i2c-amd756 and i2c-viapro drivers make use of the driver_data field of the PCI device ID. When adding device IDs dynamically (by writing to the new_id sysfs file) you cannot set the value of this field by default. It has to be allowed explicitly. Do that, and check the value so that the user can't crash the kernel accidentally. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
* | i2c-pxa: Add polling transferMike Rapoport2008-01-271-12/+121
| | | | | | | | | | | | | | | | | | | | Add polling I2C transfer implementation for PXA I2C. This is needed for cases where I2C transactions have to occur at times interrups are disabled. Signed-off-by: Mike Rapoport <mike@compulab.co.il> Acked-by: eric miao <eric.miao@marvell.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c: Support i2c_transfer in atomic contextsMike Rapoport2008-01-271-1/+11
| | | | | | | | | | | | | | | | | | Allow i2c_transfer to be called in contexts where sleeping is not allowed. It is the reponsability of the caller to ensure that the underlying i2c bus driver will not sleep either. Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-sibyte: Remove the bus scan module parameterJean Delvare2008-01-271-28/+1
| | | | | | | | | | | | | | | | | | | | The implementation is unsafe, and anyway one can achieve the same from userspace using i2c-dev + i2cdetect. Also tag i2c_sibyte_add_bus __init. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Ralf Baechle <ralf@linux-mips.org>
* | i2c-i801: Implement I2C block read supportJean Delvare2008-01-271-25/+54
| | | | | | | | | | | | | | | | | | | | | | | | I2C block read is supported since the ICH5. I couldn't get it to work using the block buffer, so it's using the old-style byte-by-byte mode for now. Note: I'm also updating the driver author... The i2c-i801 driver was really written by Mark Studebaker, even though he based his work on the i2c-piix4 driver which was written by Philip Edelbrock. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-i801: Clear special mode bits as neededJean Delvare2008-01-271-1/+6
| | | | | | | | | | | | | | | | | | | | Clear special mode bits (PEC, block buffer) at driver load time, you never know in which state the device was left by its last user. Also make sure that we reset the block buffer mode at the end of every transaction, not only when PEC was used. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-i801: More explicit names for chip featuresJean Delvare2008-01-271-9/+15
| | | | | | | | | | | | | | Use separate flags with explicit names to describe the features of the ICH chip. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-i801: Document which chip support what featureJean Delvare2008-01-271-24/+33
| | | | | | | | | | | | | | Provide a clearer documentation of which additional features each ICH chip support, and which of these the driver supports. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c/tps65010: move header to <linux/i2c/...>David Brownell2008-01-273-6/+2
| | | | | | | | | | | | | | | | | | Move the tps65010 header file from the OMAP arch directory to the more generic <linux/i2c/...> directory, and remove the spurious dependency of this driver on OMAP. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c: Rename main mutexJean Delvare2008-01-271-15/+15
| | | | | | | | | | | | | | Rename the main mutex in i2c-core from core_lists to core_lock. This makes more sense now that the redundant lists are gone. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c: Drop redundant i2c_driver.listJean Delvare2008-01-271-23/+35
| | | | | | | | | | | | | | | | i2c_driver.list is superfluous, this list duplicates the one maintained by the driver core. Drop it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: David Brownell <dbrownell@users.sourceforge.net>
* | i2c: Drop redundant i2c_adapter.listJean Delvare2008-01-271-14/+10
| | | | | | | | | | | | | | | | i2c_adapter.list is superfluous, this list duplicates the one maintained by the driver core. Drop it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: David Brownell <dbrownell@users.sourceforge.net>
* | i2c: Change prototypes of refcounting functionsJean Delvare2008-01-271-4/+20
| | | | | | | | | | | | | | | | | | | | Use more standard prototypes for i2c_use_client() and i2c_release_client(). The former now returns a pointer to the client, and the latter no longer returns anything. This matches what all other subsystems do. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <david-b@pacbell.net>
* | i2c: Use the driver model reference countingJean Delvare2008-01-271-44/+2
| | | | | | | | | | | | | | | | Don't implement our own reference counting mechanism for i2c clients when the driver model already has one. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <david-b@pacbell.net>
* | i2c: Deprecate drivers for I2C buses on video adaptersJean Delvare2008-01-271-4/+13
| | | | | | | | | | | | | | The framebuffer drivers for these pieces of hardware include support for the DDC/I2C buses, so there is no need for separate drivers. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c: Don't uselessly set i2c_adapter.retriesJean Delvare2008-01-275-6/+0
| | | | | | | | | | | | | | | | | | | | I2C adapter drivers are supposed to handle retries on nack by themselves if they do, so there's no point in setting .retries if they don't. As this retry mechanism is going away (at least in its current form), clean this up now so that we don't get build failures later. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c: normal_i2c can be made const (remaining drivers)Jean Delvare2008-01-275-7/+9
| | | | | | | | Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c: Constify client address dataMark M. Hoffman2008-01-271-2/+2
| | | | | | | | | | | | | | | | This patch allows much of the I2C client address data to move from initdata into text. Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-algo-pcf: Delete broken 10-bit address supportJean Delvare2008-01-271-72/+13
| | | | | | | | | | | | | | | | The 10-bit address support in i2c-algo-pcf is so heavily broken that it can't have ever been used. Nobody ever complained, so I'll take it that nobody needs it. Let's just delete it. Signed-off-by: Jean Delvare <khali@linux-fr.org>
OpenPOWER on IntegriCloud