summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses
AgeCommit message (Collapse)Author
2010-08-14Merge branch 'for-linus/i2c-2636' of git://git.fluff.org/bjdooks/linuxLinus Torvalds
* 'for-linus/i2c-2636' of git://git.fluff.org/bjdooks/linux: i2c/nuc900: add i2c driver support for nuc900 i2c: Enable NXP LPC support in Kconfig i2c-pxa: fix compiler warning, due to missing const i2c: davinci: bus recovery procedure to clear the bus i2c: davinci: Add cpufreq support i2c: davinci: Add suspend/resume support i2c: davinci: Add helper functions for power management i2c: davinci: misc. cleanups: remove MOD_REG_BIT and IO_ADDRESS usage i2c: davinci: Fix smbus Oops with AIC33 usage
2010-08-12Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: mmc_spi: Fix unterminated of_match_table of/sparc: fix build regression from of_device changes of/device: Replace struct of_device with struct platform_device
2010-08-11Merge branch 'for-2636/i2c/nuc' into next-i2cBen Dooks
2010-08-11Merge branch 'for-2636/i2c/nxp' into next-i2cBen Dooks
2010-08-11Merge branch 'for-2636/i2c/pxa' into next-i2cBen Dooks
2010-08-11i2c/nuc900: add i2c driver support for nuc900Wan ZongShun
This patch is to add i2c driver support for nuc900. Signed-off-by: Wan ZongShun <mcuos.com@gmail.org> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Reviewed-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-08-11i2c: Enable NXP LPC support in KconfigKevin Wells
NXP LPC series processors use the IP3204 I2C block shared with the Philips PNX4008 processor. Signed-off-by: Kevin Wells <wellsk40@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-08-11i2c-pxa: fix compiler warning, due to missing constMarc Kleine-Budde
This patch adds the missing const to "struct platform_device_id" to fix this warning: /home/frogger/pengutronix/linux/linux-2.6/drivers/i2c/busses/i2c-pxa.c: In function 'i2c_pxa_probe': /home/frogger/pengutronix/linux/linux-2.6/drivers/i2c/busses/i2c-pxa.c:1004: warning: initialization discards qualifiers from pointer target type Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Roel Kluin <roel.kluin@gmail.com> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-08-09Merge branch 'davinci-i2c' of ↵Ben Dooks
git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci into for-2636/i2c/davinci
2010-08-09Merge branch 'for-rmk' of ↵Russell King
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable Conflicts: arch/arm/Kconfig
2010-08-06Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/genesis-2.6 into ↵Russell King
devel-stable Conflicts: drivers/net/irda/sh_irda.c
2010-08-06of/device: Replace struct of_device with struct platform_deviceGrant Likely
of_device is just an alias for platform_device, so remove it entirely. Also replace to_of_device() with to_platform_device() and update comment blocks. This patch was initially generated from the following semantic patch, and then edited by hand to pick up the bits that coccinelle didn't catch. @@ @@ -struct of_device +struct platform_device Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Reviewed-by: David S. Miller <davem@davemloft.net>
2010-08-05Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (63 commits) of/platform: Register of_platform_drivers with an "of:" prefix of/address: Clean up function declarations of/spi: call of_register_spi_devices() from spi core code of: Provide default of_node_to_nid() implementation. of/device: Make of_device_make_bus_id() usable by other code. of/irq: Fix endian issues in parsing interrupt specifiers of: Fix phandle endian issues of/flattree: fix of_flat_dt_is_compatible() to match the full compatible string of: remove of_default_bus_ids of: make of_find_device_by_node generic microblaze: remove references to of_device and to_of_device sparc: remove references to of_device and to_of_device powerpc: remove references to of_device and to_of_device of/device: Replace of_device with platform_device in includes and core code of/device: Protect against binding of_platform_drivers to non-OF devices of: remove asm/of_device.h of: remove asm/of_platform.h of/platform: remove all of_bus_type and of_platform_bus_type references of: Merge of_platform_bus_type with platform_bus_type drivercore/of: Add OF style matching to platform bus ... Fix up trivial conflicts in arch/microblaze/kernel/Makefile due to just some obj-y removals by the devicetree branch, while the microblaze updates added a new file.
2010-08-05i2c: davinci: bus recovery procedure to clear the busPhilby John
Come out of i2c time out condition by following the bus recovery procedure outlined in the i2c protocol v3 spec. The kernel must be robust enough to gracefully recover from i2c bus failure without having to reset the machine. This is done by first NACKing the slave, pulsing the SCL line 9 times and then sending the stop command. This patch has been tested on a DM6446 and DM355 Signed-off-by: Philby John <pjohn@in.mvista.com> Signed-off-by: Srinivasan, Nageswari <nageswari@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-08-05i2c: davinci: Add cpufreq supportChaithrika U S
Add cpufreq support for DaVinci I2C driver. Tested on DA850/OMAP-L138 EVM. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-08-05i2c: davinci: Add suspend/resume supportChaithrika U S
Add suspend and resume callbacks to DaVinci I2C driver. This has been tested on DA850/OMAP-L138 EVM. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-08-05i2c: davinci: Add helper functions for power managementChaithrika U S
Add i2c reset control and clock divider calculation functions which will be useful for power management features. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-08-05i2c: davinci: misc. cleanups: remove MOD_REG_BIT and IO_ADDRESS usageChaithrika U S
Cleanup the DaVinci I2C driver. Remove MOD_REG_BIT macro. Also use ioremap instead of IO_ADDRESS macro. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-08-05i2c: davinci: Fix smbus Oops with AIC33 usageDirk Behme
This fixes Oops at kernel startup while "scanning" for TLV320AIC23IDx addresses. Additional fix from Sudhakar Rajashekhara: I think 'first byte set' should come after the write because an I2C transaction is being carried out before configuring the I2C mode register (which has bits to configure Master, Start condition etc), which causes undefined behavior. Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com> Signed-off-by: Alexander Vasiliev <alexvasiljev@gmail.com> Signed-off-by: Brad Griffis <bgriffis@ti.com> Signed-off-by: Dirk Behme <dirk.behme@gmail.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-08-05ARM: SAMSUNG: i2c/busses: Add HAVE_S3C2410_I2C option to include I2C for ↵Naveen Krishna Ch
Samsung SoCs This patch adds HAVE_S3C2410_I2C to control inclusion of I2C bus driver on Samsung SoCs and makes I2C bus driver dependency SoC specific instead of machine specific. This will enalbe all machines using Samsung ARCH_S3C2410, _S3C64XX, _S5P6440, _S5PC100, and _S5PV210 to select the I2C driver by default Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org>
2010-08-04Merge branch 'master' of ↵Paul Mundt
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: arch/arm/configs/ap4evb_defconfig arch/arm/configs/g3evm_defconfig arch/arm/configs/g4evm_defconfig Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-08-01powerpc/5200/i2c: improve i2c bus error recoveryAlbrecht Dreß
This patch improves the recovery of the MPC's I2C bus from errors like bus hangs resulting in timeouts: 1. make the bus timeout configurable, as it depends on the bus clock and the attached slave chip(s); default is still 1 second; 2. detect any of the cases indicated by the CF, BB and RXAK MSR flags if a timeout occurs, and add a missing (required) MAL reset; 3. use a more reliable method to fixup the bus if a hang has been detected. The sequence is sent 9 times which seems to be necessary if a slave "misses" more than one clock cycle. For 400 kHz bus speed, the fixup is also ~70us (81us vs. 150us) faster. Tested on a custom Lite5200b derived board, with a Dallas RTC, AD sensors and NXP IO expander chips attached to the i2c. Changes vs. v1: - use improved bus fixup sequence for all chips (not only the 5200) - calculate real clock from defaults if no clock is given in the device tree - better description (I hope) of the changes. I didn't split the changes in this file into three parts as recommended by Grant, as they actually belong together (i.e. they address one single problem, just in three places of one single source file). Signed-off-by: Albrecht Dreß <albrecht.dress@arcor.de> [grant.likely@secretlab.ca: fixup for ->node to ->dev.of_node transition] Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-07-24Merge commit 'v2.6.35-rc6' into devicetree/nextGrant Likely
Conflicts: arch/sparc/kernel/prom_64.c
2010-07-11Merge branch 'hwmon-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: hwmon: Fix autoloading of fschmd on recent Fujitsu machines hwmon: (coretemp) Properly label the sensors hwmon: (coretemp) Skip duplicate CPU entries hwmon: (it87) Fix in7 on IT8720F hwmon: (k8temp) Fix temperature reporting for ASB1 processor revisions
2010-07-10i2c/mips: Fix error return codes from Sibyte i2c bus driverGuenter Roeck
Sibyte i2c bus driver returns non-descriptive error values. Update to return error values as defined in Documentation/i2c/fault-codes. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-07-09hwmon: Fix autoloading of fschmd on recent Fujitsu machinesJean Delvare
Fujitsu slightly changed the DMI strings in their recent machines, (for example the D2778) and this breaks the automatic loading of the needed fschmd driver. Being more tolerant on string comparison fixes the issue. This closes bug #15634: https://bugzilla.kernel.org/show_bug.cgi?id=15634 Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Sergey Spiridonov <sena@hurd.homeunix.org> Cc: Hans de Goede <hdegoede@redhat.com>
2010-07-05i2c: Add OF-style registration and bindingGrant Likely
This patch adds OF hooks to the i2c core so that devices can automatically be registered based on device tree data. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-07-05of/i2c: Generalize OF supportGrant Likely
This patch cleans up the i2c OF support code to make it selectable by all architectures and allow for automatic registration of i2c devices. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-07-05Merge branch 'master' of ↵Paul Mundt
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: include/linux/serial_sci.h Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-06-03i2c/busses: Move two drivers to embedded sectionWolfram Sang
And fix a typo while we are here Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-31Merge branch 'master' of ↵Paul Mundt
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
2010-05-24Merge branch 'master' of ↵Paul Mundt
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
2010-05-22Merge remote branch 'origin' into secretlab/next-devicetreeGrant Likely
Merging in current state of Linus' tree to deal with merge conflicts and build failures in vio.c after merge. Conflicts: drivers/i2c/busses/i2c-cpm.c drivers/i2c/busses/i2c-mpc.c drivers/net/gianfar.c Also fixed up one line in arch/powerpc/kernel/vio.c to use the correct node pointer. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-05-22of: Remove duplicate fields from of_platform_driverGrant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver and device_driver. This patch is a removes the extra copies from struct of_platform_driver and converts all users to the device_driver members. This patch is a pretty mechanical change. The usage model doesn't change and if any drivers have been missed, or if anything has been fixed up incorrectly, then it will fail with a compile time error, and the fixup will be trivial. This patch looks big and scary because it touches so many files, but it should be pretty safe. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Sean MacLennan <smaclennan@pikatech.com>
2010-05-21i2c-nforce2: Remove redundant error messages on ACPI conflictChase Douglas
The ACPI subsystem strictly checks for resource conflicts. When there's a conflict, it outputs a warning message with all the details needed to properly diagnose the underlying issue. However, the i2c-nforce2 driver also prints its own message. Not only is the message redundant, it is at the KERN_ERR level, which overrides some bootsplash screens for no good reason. This change removes the two lines that print out the error messages. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-21i2c: Use <linux/io.h> instead of <asm/io.h>H Hartley Sweeten
As warned by checkpatch.pl, <linux/io.h> should be used instead of <asm/io.h>. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-21i2c-gpio: Move initialization code to subsys_initcall()Marek Szyprowski
GPIO driven I2C bus can be used for controlling the PMIC chip. The example of such configuration is Samsung Aquila board. This patch moves initialization code to subsys_initcall() to ensure that the i2c bus is available early so the regulators can be quickly probed and available for other devices on their probe() call. Such solution has been proposed by Mark Brown to fix the problem of the regulators not beeing available on the peripheral device probe(): http://lists.infradead.org/pipermail/linux-arm-kernel/2010-March/011971.html Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-21i2c-parport: Make template structure constJean Delvare
parport_algo_data is a template so it can be marked const. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-21i2c-stub: Expose the default functionality flagsJean Delvare
It is easier to adjust the flags when you know their default value. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Mark M. Hoffman <mhoffman@lightlink.com>
2010-05-21i2c/scx200_acb: Make PCI device ids constantJean Delvare
Make PCI device ids constant as we just did for many other i2c bus drivers already. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Márton Németh <nm127@freemail.hu>
2010-05-21i2c-i801: Fix all checkpatch warningsIvo Manca
Fix all checkpatch warnings. No functional changes are made. Signed-off-by: Ivo Manca <pinkel@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-05-21i2c-i801: All newer devices have all the optional featuresJean Delvare
Only the oldest devices lack some of the features supported by this driver. List them explicitly, and default to all features enabled for all other chips, including the ones added through sysfs. This will make future driver maintenance easier. In the unlikely event of a not yet supported device not implementing all the features, one can always use the disable_features module parameter to prevent the driver from attempting to use them. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Seth Heasley <seth.heasley@intel.com>
2010-05-21i2c-i801: Let the user disable selected driver featuresJean Delvare
Let the user disable selected features normally supported by the device. This makes it possible to work around possible driver or hardware bugs if the feature in question doesn't work as intended for whatever reason. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Felix Rubinstein <felixru@gmail.com>
2010-05-20Merge branch 'master' of ↵Paul Mundt
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
2010-05-20i2c-highlander: remover superflous variableWolfram Sang
When cppcheck found this flaw [./i2c/busses/i2c-highlander.c:284]: (style) Warning - using char variable in bit operation it was noted that the 'read'-variable could be simply removed as read_write can only be 0 or 1 anyhow. So, we remove the flaw and simplify the code. Reported-by: d binderman <dcb314@hotmail.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Jean Delvare <khali@linux-fr.org> Cc: Ben Dooks <ben-linux@fluff.org>
2010-05-20i2c-ibm-iic: drop NO_IRQWolfram Sang
Drop NO_IRQ as 0 is the preferred way to describe 'no irq' (http://lkml.org/lkml/2005/11/21/221). This change is safe, as the driver is only used on powerpc, where NO_IRQ is 0 anyhow. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Sean MacLennan <smaclennan@pikatech.com> Cc: Ben Dooks <ben-linux@fluff.org>
2010-05-20i2c-cpm: drop NO_IRQWolfram Sang
Drop NO_IRQ as 0 is the preferred way to describe 'no irq' (http://lkml.org/lkml/2005/11/21/221). This change is safe, as the driver is only used on powerpc, where NO_IRQ is 0 anyhow. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Jochen Friedrich <jochen@scram.de> Cc: Ben Dooks <ben-linux@fluff.org>
2010-05-20i2c-mpc: drop NO_IRQWolfram Sang
Drop NO_IRQ as 0 is the preferred way to describe 'no irq' (http://lkml.org/lkml/2005/11/21/221). This change is safe, as the driver is only used on powerpc, where NO_IRQ is 0 anyhow. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Cc: Ben Dooks <ben-linux@fluff.org>
2010-05-20i2c-pxa: only define 'blue_murder'-function if DEBUG is #definedWolfram Sang
This talkative function is also called on timeouts. As timeouts can happen on regular writes to EEPROMs (no error case), this creates false positives. Giving lots of details is interesting only for developers anyhow, so just use the function if DEBUG is #defined. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Eric Miao <eric.y.miao@gmail.com> Cc: Roel Kluin <roel.kluin@gmail.com> Cc: Pavel Machek <pavel@ucw.cz>
2010-05-20i2c-pxa: remove unused macroUwe Kleine-König
Commit beea494 ([ARM] Remove EEPROM slave emulation from i2c-pxa driver.) removed all uses of eedbg, so the definition can go, too. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Roel Kluin <roel.kluin@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>