aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/busses
AgeCommit message (Collapse)Author
2009-06-05[ARM] pxa: add platform device ID table to pxa i2c driverEric Miao
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-05-12Merge branch 'i2c-for-2630-rc5' of git://aeryn.fluff.org.uk/bjdooks/linuxLinus Torvalds
* 'i2c-for-2630-rc5' of git://aeryn.fluff.org.uk/bjdooks/linux: i2c-cpm: Pass dev ptr to dma_*_coherent rather than NULL i2c: Enable i2c-s3c2410 for S3C64XX too i2c-mpc: bug fix for MPC52xx clock setting and printout i2c-pxa.c: timeouts off by 1
2009-05-12i2c-cpm: Pass dev ptr to dma_*_coherent rather than NULLMark Ware
Recent DMA changes result in a BUG() when NULL is passed to dma_alloc_coherent in place of a device. Signed-off-by: Mark Ware <mware@elphinstone.net> [ben-linux@fluff.org: fix patch moves] Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-12i2c: Enable i2c-s3c2410 for S3C64XX tooMark Brown
This controller is also present on the S3C64xx series processors so enable the driver in Kconfig for those platforms. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-12i2c-mpc: bug fix for MPC52xx clock setting and printoutWolfgang Grandegger
The clock setting did not work for the MPC52xx due to a stupid bug. Furthermore, the dev info output "clock=0" for old device trees was misleading. This patch fixes both issues. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-05i2c: Timeouts off by 1Roel Kluin
with while (timeout++ < MAX_TIMEOUT); timeout reaches MAX_TIMEOUT + 1 after the loop, so the tests below are off by one. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-05-03i2c-pxa.c: timeouts off by 1Roel Kluin
With `while (timeout--)' timeout reaches -1 after the loop, so the tests below are off by one. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-04-13i2c-voodoo3: Deprecate in favor of tdfxfbJean Delvare
Support for I2C/DDC was recently added to the tdfxfb driver, which means that the i2c-voodoo3 driver can be deprecated. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
2009-04-07i2c: imx: Make disable_delay a per-device variableWolfram Sang
'disable_delay' was static which is wrong as it is calculated using the per-device bus speed. This patch turns 'disable_delay' into a per-device variable. Reported-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Darius Augulis <augulis.darius@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-04-07i2c: xtensa s6000 i2c driverOskar Schirmer
Support for the s6000 on-chip i2c controller. Signed-off-by: Oskar Schirmer <os@emlix.com> Signed-off-by: Daniel Glöckner <dg@emlix.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-04-07i2c: i2c-mpc: make I2C bus speed configurableWolfgang Grandegger
This patch makes the I2C bus speed configurable by using the I2C node property "clock-frequency". If the property is not defined, the old fixed clock settings will be used for backward comptibility. The generic I2C clock properties, especially the CPU-specific source clock pre-scaler are defined via the OF match table: static const struct of_device_id mpc_i2c_of_match[] = { ... {.compatible = "fsl,mpc8543-i2c", .data = &(struct fsl_i2c_match_data) { .setclock = mpc_i2c_setclock_8xxx, .prescaler = 2, }, }, The "data" field defines the relevant I2C setclock function and the relevant pre-scaler for the I2C source clock frequency. It uses arch-specific tables and functions to determine resonable Freqency Divider Register (fdr) values for MPC83xx, MPC85xx, MPC86xx, MPC5200 and MPC5200B. The i2c->flags field and the corresponding FSL_I2C_DEV_* definitions have been removed as they are obsolete. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-04-07i2c: i2c-mpc: use dev based printout functionWolfgang Grandegger
This patch used the dev_dbg, dev_err, etc. functions for debug and error output instead of printk and pr_debug. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-04-07i2c: i2c-mpc: various coding style fixesWolfgang Grandegger
Fix errors reported by checkpatch (indention, long lines, trailing white space, etc.). Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-04-07i2c: imx: Add missing request_mem_region in probe()Darius Augulis
Signed-off-by: Darius Augulis <augulis.darius@gmail.com> [ben-linux@fluff.org: fix minor patch fault in remove] Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-04-07i2c: i2c-s3c2410: Initialise Samsung I2C controller earlyMark Brown
This is required in order to ensure that core system devices such as voltage regulators attached via I2C are avaiable early in boot. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-04-07i2c-s3c2410: Simplify bus frequency calculationDaniel Silverstone
The platform data for the i2c-s3c2410 driver used to allow a min, max and desired frequency for the I2C bus. This patch reduces it to simply a desired frequency ceiling and corrects all the uses of the platform data appropriately. This means, for example, that on a system with a 66MHz fclk, a request for 100KHz will achieve 65KHz which is safe and acceptable, rather than 378KHz which it would have achieved without this change. Signed-off-by: Simtec Linux Team <linux@simtec.co.uk> Signed-off-by: Daniel Silverstone <dsilvers@simtec.co.uk> [ben-linux@fluff.org: tidy subject and description] Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-04-07i2c-s3c2410: sda_delay should be in ns, not clock ticksBen Dooks
The sda_delay field should be specified in ns, not in clock ticks as when using cpufreq we could be changing the bus rate. Signed-off-by: Ben Dooks <ben@simtec.co.uk>
2009-04-07i2c: iMX/MXC supportDarius Augulis
Implementation of I2C Adapter/Algorithm Driver for I2C Bus integrated in Freescale's i.MX/MXC processors. Signed-off-by: Darius Augulis <augulis.darius@gmail.com> Tested-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-03-30Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6Linus Torvalds
* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: hwmon: (fschmd) Add support for the FSC Hades IC hwmon: (fschmd) Add support for the FSC Syleus IC i2c-i801: Instantiate FSC hardware montioring chips dmi: Let dmi_walk() users pass private data hwmon: Define a standard interface for chassis intrusion detection Move the pcf8591 driver to hwmon hwmon: (w83627ehf) Only expose in6 or temp3 on the W83667HG hwmon: (w83627ehf) Add support for W83667HG hwmon: (w83627ehf) Invert fan pin variables logic hwmon: (hdaps) Fix Thinkpad X41 axis inversion hwmon: (hdaps) Allow inversion of separate axis hwmon: (ds1621) Clean up documentation hwmon: (ds1621) Avoid unneeded register access hwmon: (ds1621) Clean up register access hwmon: (ds1621) Reorder code statements
2009-03-30i2c-i801: Instantiate FSC hardware montioring chipsHans de Goede
Detect various FSC hwmon IC's based on DMI tables and then let the i2c-i801 driver instantiate the i2c client devices. Note that some of the info in the added table is indentical for all rows, still this is kept in the table to keep the code general and thus (hopefully) easily extensible in the future. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-03-30Merge commit 'origin/master' into nextBenjamin Herrenschmidt
Manual merge of: arch/powerpc/include/asm/elf.h drivers/i2c/busses/i2c-mpc.c
2009-03-28Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6Linus Torvalds
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: i2c-core: Some style cleanups i2c-piix4: Add support for the Broadcom HT1100 chipset i2c-piix4: Add support to SB800 SMBus changes i2c-pca-platform: Use defaults if no platform_data given i2c-algo-pca: Use timeout for checking the state machine i2c-algo-pca: Rework waiting for a free bus i2c-algo-pca: Add PCA9665 support i2c: Adapt debug macros for KERN_* constants i2c-davinci: Fix timeout handling i2c: Adapter timeout is in jiffies i2c: Set a default timeout value for all adapters i2c: Add missing KERN_* constants to printks i2c-algo-pcf: Handle timeout correctly i2c-algo-pcf: Style cleanups eeprom/at24: Remove EXPERIMENTAL i2c-nforce2: Add support for MCP67, MCP73, MCP78S and MCP79 i2c: Clarify which clients are auto-removed i2c: Let checkpatch shout on users of the legacy model i2c: Document the different ways to instantiate i2c devices
2009-03-28i2c-piix4: Add support for the Broadcom HT1100 chipsetFlavio Leitner
Add support for the Broadcom HT1100 LD chipset (SMBus function.) Signed-off-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-03-28i2c-piix4: Add support to SB800 SMBus changesShane Huang
Add support for the AMD SB800 Family series of products. Major changes include the changes to addressing the SMBus registers at different location from the locations in the previous compatible parts from AMD such as SB400/SB600/SB700. For SB800, the main features and register definitions of SMBus and other interfaces are still compatible with the previous products with the only change being in how to access the internal registers for these blocks. Signed-off-by: Shane Huang <shane.huang@amd.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-03-28i2c-pca-platform: Use defaults if no platform_data givenWolfram Sang
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-03-28i2c-algo-pca: Use timeout for checking the state machineWolfram Sang
We now timeout also if the state machine does not change within the given time. For that, the driver-specific completion-functions are extended to return true or false depending on the timeout. This then gets checked in the algorithm. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-03-28i2c-algo-pca: Rework waiting for a free busWolfram Sang
Waiting for a free bus now accepts the timeout value in jiffies and does proper checking using time_before. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-03-28i2c-algo-pca: Add PCA9665 supportMarco Aurelio da Costa
Add support for the PCA9665 I2C controller. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-03-28i2c-davinci: Fix timeout handlingJean Delvare
Properly set the adapter timeout value in jiffies, and then use that value in the driver, rather than a hard-coded constant. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Troy Kisky <troy.kisky@boundarydevices.com> Cc: Kevin Hilman <khilman@mvista.com>
2009-03-28i2c: Adapter timeout is in jiffiesJean Delvare
i2c_adapter.timeout is in jiffies. Fix all drivers which thought otherwise. It didn't really matter as long as the value was only used inside the driver, but soon i2c-core will use it too so it must have the proper unit. Note: for the i2c-mpc driver, this fixes a bug in polling mode. Timeout would trigger after 1 jiffy, which is most probably not what the author wanted. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Clifford Wolf <clifford@clifford.at> Acked-by: Sean MacLennan <smaclennan@pikatech.com> Cc: Stefan Roese <sr@denx.de> Acked-by: Lennert Buytenhek <kernel@wantstofly.org> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Grant Likely <grant.likely@secretlab.ca> Acked-by: Mark A. Greer <mgreer@mvista.com>
2009-03-28i2c: Add missing KERN_* constants to printksFrank Seidel
According to kerneljanitors todo list all printk calls (beginning a new line) should have an according KERN_* constant. Those are the missing pieces here for the i2c subsystem. Signed-off-by: Frank Seidel <frank@f-seidel.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-03-28i2c-nforce2: Add support for MCP67, MCP73, MCP78S and MCP79Jean Delvare
The MCP78S and MCP79 appear to be compatible with the previous nForce chips as far as the SMBus controller is concerned. The MCP67 and MCP73 were not tested yet but I'd be very surprised if they weren't compatible too. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Oleg Ryjkov <olegr@olegr.ca> Cc: Malcolm Lalkaka <mlalkaka@gmail.com> Cc: Zbigniew Luszpinski <zbiggy@o2.pl>
2009-03-25[ARM] acorn,ebsa110,footbridge,integrator,sa1100: Convert asm/io.h to linux/io.hRussell King
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-03-19Merge branch 'omap-clks3' into develRussell King
Conflicts: arch/arm/mach-omap2/clock.c
2009-03-13Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into develRussell King
Conflicts: arch/arm/mach-at91/gpio.c
2009-03-11Merge commit 'origin/master' into nextBenjamin Herrenschmidt
2009-03-09i2c-mpc: do not allow interruptions when waiting for I2C to completeTimur Tabi
The i2c_wait() function is using wait_event_interruptible_timeout() to wait for the I2C controller to signal that it has completed an I2C bus operation. If the process that causes the I2C operation terminated abruptly, the wait will be interrupted, returning an error. It is better to let the I2C operation finished before the process exits. It is safe to use wait_event_timeout() instead, because the timeout will allow the process to exit if the I2C bus hangs. It's also better to allow the I2C operation to finish, because unacknowledged I2C operations can cause the I2C bus to hang. Signed-off-by: Timur Tabi <timur@freescale.com> Acked-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-03-03Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] fix lots of ARM __devexit sillyness [ARM] 5417/1: Set the correct cacheid for ARMv6 CPUs with ARMv7 style MMU [ARM] 5416/1: Use unused address in v6_early_abort [ARM] 5411/1: S3C64XX: Fix EINT unmask [ARM] at91: fix for Atmel AT91 powersaving [ARM] RiscPC: Fix etherh oops
2009-03-03[ARM] fix lots of ARM __devexit sillynessRussell King
`iop_adma_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o `mv_xor_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o `mv64xxx_i2c_unmap_regs' referenced in section `.devinit.text' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o `mv64xxx_i2c_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o `orion_nand_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o `pxafb_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-24Add i2c_board_info for RiscPC PCF8583Russell King
Add the necessary i2c_board_info structure to fix the lack of PCF8583 RTC on RiscPC. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Alessandro Zummo <a.zummo@towertech.it>
2009-02-24i2c: Make sure i2c_algo_bit_data.timeout is HZ-independentJean Delvare
i2c_algo_bit_data.timeout is supposed to be in jiffies, so drivers should use set this value in terms of HZ. Ultimately I think this field should be discarded in favor of i2c_adapter.timeout, but that's left for a future patch. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Lennert Buytenhek <kernel@wantstofly.org> Acked-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
2009-02-24i2c: Timeouts reach -1Roel Kluin
With a postfix decrement these timeouts reach -1 rather than 0, but after the loop it is tested whether they have become 0. As pointed out by Jean Delvare, the condition we are waiting for should also be tested before the timeout. With the current order, you could exit with a timeout error while the job is actually done. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-02-19[ARM] 5394/1: Add static bus numbering support to i2c-versatileCatalin Marinas
If dev->id is not -1, the platform code may use static bus numbering rather than dynamic. The patch also changes the i2c_versatile_init to a subsys_initcall rather than module_init to make sure it is initialised before the I2C devices initialisation. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08[ARM] omap: i2c: remove conditional ick clocksRussell King
By providing a dummy ick for OMAP1510 and OMAP310, we avoid having SoC conditional clock information in i2c-omap.c. Also, fix the error handling by making sure we propagate the error returned via clk_get(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08[ARM] omap: i2c: remove armxor_ckRussell King
On OMAP1, the I2C functional clock (fck) is the armxor_ck, so there's no need to get "armxor_ck" separately. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08[ARM] omap: i2c: use short connection idsRussell King
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-01-26i2c: Delete many unused adapter IDsJean Delvare
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-01-07i2c: Use snprintf to set adapter namesJean Delvare
Use snprintf instead of sprintf to set adapter names, it's safer. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-01-07Input: apanel - convert to new i2c bindingJean Delvare
Convert the apanel driver to the new i2c device driver binding model, as the legacy model is going away soon. In the new model, the apanel driver is no longer scanning all the i2c adapters, instead the relevant bus driver (i2c-i801) is instantiating the device as needed. One side benefit is that the apanel driver will now load automatically on all systems where it is needed. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Stephen Hemminger <shemminger@linux-foundation.org>
2009-01-07i2c: Drop I2C_CLASS_ALLJean Delvare
I2C_CLASS_ALL is almost never what bus driver authors really want. These i2c classes are really only about which devices must be probed, not what devices can be present. As device drivers get converted to the new i2c device driver model, only a few device types will keep relying on probing. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Sonic Zhang <sonic.zhang@analog.com>