summaryrefslogtreecommitdiff
path: root/drivers/i2c
AgeCommit message (Collapse)Author
2010-03-05Merge branch 'quilt/driver-core'Stephen Rothwell
2010-03-05Merge remote branch 'als/for-next'Stephen Rothwell
2010-03-05Merge remote branch 'trivial/for-next'Stephen Rothwell
Conflicts: arch/arm/mach-u300/include/mach/debug-macro.S drivers/net/qlge/qlge_ethtool.c drivers/net/qlge/qlge_main.c drivers/net/typhoon.c
2010-03-05Merge remote branch 'mfd/for-next'Stephen Rothwell
Conflicts: drivers/i2c/busses/i2c-isch.c
2010-03-05Merge remote branch 'bjdooks-i2c/next-i2c'Stephen Rothwell
Conflicts: drivers/i2c/busses/Kconfig drivers/i2c/busses/Makefile
2010-03-05Merge branch 'quilt/i2c'Stephen Rothwell
2010-03-05i2c: move i2c_omap's probe function to .devinit.textUwe Kleine-König
A pointer to omap_i2c_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Paul Walmsley <paul@pwsan.com> Cc: Richard Woodruff <r-woodruff2@ti.com> Cc: chandra shekhar <x0044955@ti.com> Cc: Jason P Marini <jason.marini@gmail.com> Cc: Syed Mohammed Khasim <x0khasim@ti.com> Cc: Jarkko Nikula <jarkko.nikula@nokia.com> Cc: Juha Yrjola <juha.yrjola@solidboot.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-05i2c-scmi: Provide module aliases for automatic loadingDarrick J. Wong
Provide module aliases for automatic loading. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-05i2c-scmi: Support IBM SMBus CMI devicesCrane Cai
*) add a new HID for IBM SMBus CMI devices *) add methods for IBM SMBus CMI devices *) hook different HID with different control methods set *) minor tweaks as suggested by Jean Delvare Slightly modified by Darrick to use #define'd IBM SMBUS HID from Darrick's ACPI scan quirk patch. Signed-off-by: Crane Cai <crane.cai@amd.com> Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-05i2c/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-03-05i2c-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> Cc: Seth Heasley <seth.heasley@intel.com>
2010-03-05i2c-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-03-05i2c-i801: Don't use the block buffer for I2C block writesJean Delvare
Experience has shown that the block buffer can only be used for SMBus (not I2C) block transactions, even though the datasheet doesn't mention this limitation. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Felix Rubinstein <felixru@gmail.com> Cc: Oleg Ryjkov <oryjkov@gmail.com>
2010-03-05i2c-powermac: Be less verbose in the absence of real errors.Jean Delvare
Be less verbose in the absence of real errors. We don't have to report failed probes to the users, it's only confusing them. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Andrey Gusev <ronne@list.ru> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: stable@kernel.org
2010-03-04ARM: Add Versatile Express supportRussell King
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-03-02i2c: Document the message size limitZhangfei Gao
i2c_master_send & i2c_master_recv do not support more than 64 kb transfer, since msg.len is u16. Signed-off-by: Zhangfei Gao <zgao6@marvell.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-02i2c-algo-pca: Drop duplicate variableJean Delvare
Thanks to -Wshadow. Signed-off-by: Jean Delvare <khali@linux-fr.org> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
2010-03-02i2c: Hook up runtime PM supportMark Brown
Allow I2C drivers to make use of the runtime PM framework by adding bus implementations of the runtime PM operations. These simply immediately suspend when the device is idle. The runtime PM framework provides drivers with off the shelf refcounts for enables and sysfs control for managing runtime suspend from userspace so is useful even without meaningful input from the bus. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-02i2c-parport-light: Add SMBus alert supportJean Delvare
Add support for the SMBus alert mechanism to the i2c-parport-light driver. The ADM1032 evaluation board at least is properly wired for this. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Trent Piepho <tpiepho@freescale.com>
2010-03-02i2c-parport: Add SMBus alert supportJean Delvare
Add support for the SMBus alert mechanism to the i2c-parport driver. The ADM1032 evaluation board at least is properly wired for this. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Trent Piepho <tpiepho@freescale.com>
2010-03-02i2c: Separate Kconfig option for i2c-smbusJean Delvare
Having a separate Kconfig option for i2c-smbus makes it possible to build that support as a module even when i2c-core itself is built-in. Bus drivers which implement SMBus alert should select this option, so in most cases this option is hidden and the user doesn't have to care about it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Trent Piepho <tpiepho@freescale.com>
2010-03-02i2c: Add SMBus alert supportJean Delvare
SMBus alert support. The SMBus alert protocol allows several SMBus slave devices to share a single interrupt pin on the SMBus master, while still allowing the master to know which slave triggered the interrupt. This is based on preliminary work by David Brownell. The key difference between David's implementation and mine is that his was part of i2c-core, while mine is split into a separate, standalone module named i2c-smbus. The i2c-smbus module is meant to include support for all SMBus extensions to the I2C protocol in the future. The benefit of this approach is a zero cost for I2C bus segments which do not need SMBus alert support. Where David's implementation increased the size of struct i2c_adapter by 7% (40 bytes on i386), mine doesn't touch it. Where David's implementation added over 150 lines of code to i2c-core (+10%), mine doesn't touch it. The only change that touches all the users of the i2c subsystem is a new callback in struct i2c_driver (common to both implementations.) I seem to remember Trent was worried about the footprint of David'd implementation, hopefully mine addresses the issue. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Trent Piepho <tpiepho@freescale.com>
2010-03-02i2c-parport: Give powered devices some time to settleJean Delvare
When the i2c-parport adapter is reponsible for powering devices, it would seem reasonable to give them some time to settle before trying to access them. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-02i2c-tiny-usb: Fix a comment on bus frequencyJean Delvare
The description of the delay parameter is incomplete, it suggests that there is a direct relation between the delay value and the bus frequency. In fact, due to additional delays in the i2c bitbanging code, the i2c clock is always much slower. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Till Harbaum <Till@Harbaum.org>
2010-03-02i2c-i801: Add Intel Cougar Point device IDsSeth Heasley
Add the Intel Cougar Point (PCH) SMBus controller device IDs. Signed-off-by: Seth Heasley <seth.heasley@intel.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-02i2c: Make PCI device ids constantMárton Németh
The id_table field of the struct pci_driver is constant in <linux/pci.h> so it is worth to make initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by: Márton Németh <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-03-02i2c: convert i2c-isch to platform_deviceDenis Turischev
Convert i2c-isch to platform_device for the lpc mfd core to add it at probe time. Signed-off-by: Denis Turischev <denis@compulab.co.il> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-01Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (100 commits) ARM: Eliminate decompressor -Dstatic= PIC hack ARM: 5958/1: ARM: U300: fix inverted clk round rate ARM: 5956/1: misplaced parentheses ARM: 5955/1: ep93xx: move timer defines into core.c and document ARM: 5954/1: ep93xx: move gpio interrupt support to gpio.c ARM: 5953/1: ep93xx: fix broken build of clock.c ARM: 5952/1: ARM: MM: Add ARM_L1_CACHE_SHIFT_6 for handle inside each ARCH Kconfig ARM: 5949/1: NUC900 add gpio virtual memory map ARM: 5948/1: Enable timer0 to time4 clock support for nuc910 ARM: 5940/2: ARM: MMCI: remove custom DBG macro and printk ARM: make_coherent(): fix problems with highpte, part 2 MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself ARM: 5945/1: ep93xx: include correct irq.h in core.c ARM: 5933/1: amba-pl011: support hardware flow control ARM: 5930/1: Add PKMAP area description to memory.txt. ARM: 5929/1: Add checks to detect overlap of memory regions. ARM: 5928/1: Change type of VMALLOC_END to unsigned long. ARM: 5927/1: Make delimiters of DMA area globally visibly. ARM: 5926/1: Add "Virtual kernel memory..." printout. ARM: 5920/1: OMAP4: Enable L2 Cache ... Fix up trivial conflict in arch/arm/mach-mx25/clock.c
2010-02-27MIPS: I2C: Add driver for Cavium OCTEON I2C ports.Rade Bozic
Signed-off-by: Rade Bozic <rade.bozic.ext@nsn.com> Signed-off-by: David Daney <ddaney@caviumnetworks.com> Cc: Michael Lawnick <michael.lawnick.ext@nsn.com> To: linux-mips@linux-mips.org To: linux-i2c@vger.kernel.org To: ben-linux@fluff.org To: khali@linux-fr.org Cc: rade.bozic.ext@nsn.com Cc: Michael Lawnick <michael.lawnick.ext@nsn.com> Patchwork: http://patchwork.linux-mips.org/patch/890/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-02-18Merge remote branch 'linus/master' into for-nextJonathan Cameron
2010-02-12ARM: PNX4008: use msecs_to_jiffies() rather than open-coding itRussell King
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-12ARM: PNX4008: i2c-pnx makes no use of asm/uaccess.h nor asm/irq.hRussell King
Remove unnecessary includes Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-12ARM: PNX4008: i2c-pnx: don't split messages across several linesRussell King
It makes them harder to grep for. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-12ARM: PNX4008: Use i2c driver data for passing between internal functionsRussell King
Since the drivers data now contains the i2c adapter structure, we can pass around the drivers data between internal functions (which is what they want) rather than using the i2c adapter structure and having an additional pointer dereference each time. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-12ARM: PNX4008: move i2c_adapter structure inside the drivers private dataRussell King
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-12ARM: PNX4008: kzalloc i2c drivers internal dataRussell King
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-12ARM: PNX4008: Make ioaddr 'void __iomem *' rather than 'u32'Russell King
This avoids unnecessary casting. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-12ARM: PNX4008: get i2c clock rate from clk APIRussell King
Acked-by: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-12ARM: PNX4008: convert i2c-pnx to use clk API enable/disable callsRussell King
clk_set_rate() is not supposed to be used to turn clocks on and off. That's what clk_enable/clk_disable is for. Acked-by: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-12ARM: PNX4008: move i2c clock start/stop into driverRussell King
Acked-by: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-12ARM: PNX4008: move i2c suspend/resume callbacks into driverRussell King
Acked-by: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-09tree-wide: Assorted spelling fixesDaniel Mack
In particular, several occurances of funny versions of 'success', 'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address', 'beginning', 'desirable', 'separate' and 'necessary' are fixed. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Joe Perches <joe@perches.com> Cc: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-02-05i2c-tiny-usb: Fix on big-endian systemsJean Delvare
The functionality bit vector is always returned as a little-endian 32-bit number by the device, so it must be byte-swapped to the host endianness. On the other hand, the delay value is handled by the USB stack, so no byte swapping is needed on our side. This fixes bug #15105: http://bugzilla.kernel.org/show_bug.cgi?id=15105 Reported-by: Jens Richter <jens@richter-stutensee.de> Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Jens Richter <jens@richter-stutensee.de> Cc: Till Harbaum <till@harbaum.org> Cc: stable@kernel.org
2010-02-05fix typo "definetly" -> "definitely" in commentUwe Kleine-König
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-02-03i2c/imx: don't add probe function to the driver structUwe Kleine-König
Having a pointer to the probe function is unnecessary when using platform_driver_probe and yields a section mismatch warning after removing the white list entry "*driver" for { .data$, .data.rel$ } -> { .init.* } mismatches in modpost. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-02-03i2c: Add support for Ux500/Nomadik I2C controllersrinidhi kasagar
This adds support for ST-Ericsson's I2C block found in Ux500 and Nomadik 8815 platforms. Signed-off-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com> Acked-by: Andrea Gallo <andrea.gallo@stericsson.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Reviewed-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-02-03i2c-mpc: add support for the MPC512x processors from FreescaleWolfgang Grandegger
The "setclock" initialization functions have been renamed to "setup" because I2C interrupts must be enabled for the MPC512x. This requires to handle "fsl,preserve-clocking" in a slighly different way. Also, the old settings are now reported calling dev_dbg(). For the MPC512x the clock setup function of the MPC52xx can be re-used. Furthermore, the Kconfig help has been updated and corrected. Signed-off-by: Wolfgang Grandegger <wg@denx.de> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-02-03i2c-mpc: use __devinit[data] for initialization functions and dataWolfgang Grandegger
"__devinit[data]" has not yet been used for all initialization functions and data. To avoid truncating lines, the struct "mpc_i2c_match_data" has been renamed to "mpc_i2c_data", which is even the better name. Signed-off-by: Wolfgang Grandegger <wg@denx.de> Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-02-03i2c: Add support for Xilinx XPS IIC Bus InterfaceRichard Röjfors
This patch adds support for the Xilinx XPS IIC Bus Interface. The driver uses the dynamic mode, supporting to put several I2C messages in the FIFO to reduce the number of interrupts. It has the same feature as ocores, it can be passed a list of devices that will be added when the bus is probed. Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-02-03i2c-designware: Allow mixed endianness accessesJean-Hugues Deschenes
Allows CPUs of a given endianness to access a dw controller of a different endianness. Endianncess difference is detected at run time through the dw component type register. Signed-off-by: Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>