aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c
AgeCommit message (Collapse)Author
2006-10-03fix file specification in commentsUwe Zeisberger
Many files include the filename at the beginning, serveral used a wrong one. Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03Fix several typos in drivers/Matt LaPlante
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-01[PATCH] proper flags type of spin_lock_irqsave()Alexey Dobriyan
Convert various spin_lock_irqsave() callers to correctly use `unsigned long'. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp> Cc: "Luck, Tony" <tony.luck@intel.com> Acked-by: Kyle McMartin <kyle@mcmartin.ca> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-30[PATCH] i2c: Prevent deadlock on i2c client registrationJean Delvare
Delay the call to adapter->client_register() until after we are certain that the client registration is a success. At this point the client is fully initialized and we no longer hold the adapter->clist mutex, so this should prevent the deadlocks if the client_register() callback needs to take that mutex too, as is the case for the bttv driver. This fixes bug #7234. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29[PATCH] i2c-sibyte: Fix modular build breakageYoichi Yuasa
Fix undefined reference in i2c_sibyte_exit(). drivers/built-in.o: In function `i2c_sibyte_exit': i2c-sibyte.c:(.exit.text+0x368): undefined reference to `i2c_del_bus' i2c-sibyte.c:(.exit.text+0x368): relocation truncated to fit: R_MIPS_26 against `i2c_del_bus' i2c-sibyte.c:(.exit.text+0x38c): undefined reference to `i2c_del_bus' i2c-sibyte.c:(.exit.text+0x38c): relocation truncated to fit: R_MIPS_26 against `i2c_del_bus' Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-28Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (130 commits) [ARM] 3856/1: Add clocksource for Intel IXP4xx platforms [ARM] 3855/1: Add generic time support [ARM] 3873/1: S3C24XX: Add irq_chip names [ARM] 3872/1: S3C24XX: Apply consistant tabbing to irq_chips [ARM] 3871/1: S3C24XX: Fix ordering of EINT4..23 [ARM] nommu: confirms the CR_V bit in nommu mode [ARM] nommu: abort handler fixup for !CPU_CP15_MMU cores. [ARM] 3870/1: AT91: Start removing static memory mappings [ARM] 3869/1: AT91: NAND support for DK and KB9202 boards [ARM] 3868/1: AT91 hardware header update [ARM] 3867/1: AT91 GPIO update [ARM] 3866/1: AT91 clock update [ARM] 3865/1: AT91RM9200 header updates [ARM] 3862/2: S3C2410 - add basic power management support for AML M5900 series [ARM] kthread: switch arch/arm/kernel/apm.c [ARM] Off-by-one in arch/arm/common/icst* [ARM] 3864/1: Refactore sharpsl_pm [ARM] 3863/1: Add Locomo SPI Device [ARM] 3847/2: Convert LOMOMO to use struct device for GPIOs [ARM] Use CPU_CACHE_* where possible in asm/cacheflush.h ...
2006-09-27USB: move <linux/usb_otg.h> to <linux/usb/otg.h>David Brownell
Move <linux/usb_otg.h> to <linux/usb/otg.h>. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27Merge master.kernel.org:/pub/scm/linux/kernel/git/tmlind/linux-omap-upstream ↵Russell King
into devel
2006-09-27[PATCH] inode_diet: Replace inode.u.generic_ip with inode.i_privateTheodore Ts'o
The following patches reduce the size of the VFS inode structure by 28 bytes on a UP x86. (It would be more on an x86_64 system). This is a 10% reduction in the inode size on a UP kernel that is configured in a production mode (i.e., with no spinlock or other debugging functions enabled; if you want to save memory taken up by in-core inodes, the first thing you should do is disable the debugging options; they are responsible for a huge amount of bloat in the VFS inode structure). This patch: The filesystem or device-specific pointer in the inode is inside a union, which is pretty pointless given that all 30+ users of this field have been using the void pointer. Get rid of the union and rename it to i_private, with a comment to explain who is allowed to use the void pointer. This is just a cleanup, but it allows us to reuse the union 'u' for something something where the union will actually be used. [judith@osdl.org: powerpc build fix] Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Judith Lebzelter <judith@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-26i2c: Constify i2c_algorithm declarations, part 2Jean Delvare
i2c: Constify i2c_algorithm declarations, part 2 Make struct i2c_algorithm declarations const in all i2c bus drivers where it is possible. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c: Constify i2c_algorithm declarations, part 1Jean Delvare
i2c: Constify i2c_algorithm declarations, part 1 Make struct i2c_algorithm declarations const in all i2c algorithm drivers. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c-viapro: Add support for the VT8237A and VT8251Rudolf Marek
i2c-viapro: Add support for the VT8237A and VT8251 Documentation update included. Compile tested. Signed-off-by: Rudolf Marek <r.marek@sh.cvut.cz> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c: Warn on i2c client creation failureJean Delvare
i2c: Warn on i2c client creation failure Warn when an i2c client creation fails. If we don't, the user will never know something wrong happened, as i2c client creation is typically called through an attach_adapter callback, those return value we currently ignore for technical reasons. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c-core: Drop useless bitmaskingsJean Delvare
i2c-core: Drop useless bitmaskings The code generated is exactly the same. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c-algo-pcf: Discard the mdelay data struct memberAdrian Bunk
i2c-algo-pcf: Discard the mdelay data struct member Just as i2c-algo-bit, i2c-algo-pcf has an unused mdelay struct member, which we can get rid of to spare some code and memory. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c-algo-bit: CleanupsJean Delvare
i2c-algo-bit: Cleanups * Uninline long functions (saves around 1 kB or 15%) * Refactor code in sclhi() * Drop redundant udelay on repeated start Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c-isa: Fail adding driver on attach_adapter errorDavid Hubbard
i2c-isa: Fail adding driver on attach_adapter error Signed-off-by: David Hubbard <david.c.hubbard@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c: __must_check fixes (chip drivers)Jean Delvare
i2c: __must_check fixes (chip drivers) Check for error on sysfs file creation. Delete sysfs files on device removal. The approach taken for the most complex case (pcf8591) is similar to what Mark M. Hoffman proposed for hardware monitoring chip drivers. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Ben Gardner <bgardner@wabtec.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c-dev: attach/detach_adapter cleanupsJean Delvare
i2c-dev: attach/detach_adapter cleanups * Only print that an adapter was attached when it succeeds. * i2c_dev == NULL on detach simply means that the attach failed before, this isn't an error per se. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c-stub: Chip address as a module parameterJean Delvare
i2c-stub: Chip address as a module parameter Add a mandatory chip_addr parameter to i2c-stub. This parameter defines to which chip address the driver will respond, instead of reponding to all addresses as before. The idea is to prevent the users from loading i2c-stub at random and being then confused by the results of sensors-detect or other user-space tools. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c: New bus driver for TI OMAP boardsKomal Shah
i2c: New bus driver for TI OMAP boards This patch adds I2C bus driver for various Texas Instruments (TI) OMAP1/2 (http://www.ti.com/omap) series based boards like OMAP1510/1610/1710/242x. Signed-off-by: Komal Shah <komal_shah802003@yahoo.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c-algo-bit: Discard the mdelay data struct memberJean Delvare
i2c-algo-bit: Discard the mdelay data struct member The i2c_algo_bit_data structure has an mdelay member, which is not used by the algorithm code (the code has always been ifdef'd out.) Let's discard it to save some code and memory. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c: Fix copy-n-paste in subsystem KconfigArthur Othieno
i2c: Fix copy-n-paste in subsystem Kconfig We have: drivers/i2c/Kconfig:2:# Character device configuration Which is obviously not true.. Signed-off-by: Arthur Othieno <apgo@patchbomb.org> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c-au1550: Add I2C support for Au1200Domen Puncer
i2c-au1550: Add I2C support for Au1200 Signed-off-by: Domen Puncer <domen.puncer@ultra.si> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c-au1550: Add SMBus functionality flagDomen Puncer
i2c-au1550: Add SMBus functionality flag Add SMBus functionality flag, so we can use eeprom and similar drivers. Signed-off-by: Domen Puncer <domen.puncer@ultra.si> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c-au1550: Fix timeout problemDomen Puncer
i2c-au1550: Fix timeout problem Fix from Jordan Crouse: If the transmit and recieve FIFOS are not empty, forceably flush them rather then waiting for them to drain on their own. This solves at least a problem reported by Clem Taylor: http://www.linux-mips.org/archives/linux-mips/2006-05/msg00240.html (1% of I2C transactions would timeout) Signed-off-by: Domen Puncer <domen.puncer@ultra.si> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c-sibyte: Kip Walker is goneJean Delvare
i2c-sibyte: Kip Walker is gone Kip Walker no longer works at Broadcom, and his e-mail address there bounces back, so let's drop it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c-algo-sibyte: Merge into i2c-sibyteJean Delvare
i2c-algo-sibyte: Merge into i2c-sibyte Merge i2c-algo-sibyte into i2c-sibyte, as this is a complete, hardware-dependent SMBus implementation and not a reusable algorithm. Perform some basic coding style cleanups while we're here (mainly space-based indentation replaced by tabulations.) Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c-algo-sibyte: CleanupsJean Delvare
i2c-algo-sibyte: Cleanups * Delete empty algo_control implementation. * Simplify i2c_sibyte_del_bus. * Delete empty module init and cleanup functions. * Drop out-of-date #ifdef MODULE construct. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c: __must_check fixes, i2c-devJean Delvare
i2c: __must_check fixes (i2c-dev) Check for error on sysfs file creation. Check for error on device creation. Delete sysfs file on device destruction. I couldn't test this one beyond compilation, as it applies on top of another patch in Greg's tree [1] which breaks all my systems when I apply it (my udev isn't recent enough.) Anyone with bleeding edge udev is welcome to test and report. [1] http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/i2c/i2c-dev-device.patch Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c: __must_check fixes (core drivers)Jean Delvare
i2c: __must_check fixes (core drivers) Check for error on sysfs file creation. Check for error on device registration. Check for error on class device registration. Greg, I am not familiar with completion, can you please tell me if I need to take care of it in the error paths (as I did in this patch, see /* Needed? */ comments), or if it isn't needed? These patches were tested, including forced errors, so they should work fine. But of course more testing can't hurt. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c-dev: Drop the client templateJean Delvare
i2c-dev: Drop the client template Drop the i2c-dev client template. This saves about 360 bytes of memory. I got the idea from a similar cleanup Hans-Frieder Vogt made to i2c-nforce2 recently. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c-dev: Use a list for data storageJean Delvare
i2c-dev: Use a list for data storage Use a list instead of a static array for storing the i2c-dev data. Given that most systems have less than 10 i2c busses, most of the space was wasted, so this saves around 1 kB of memory (2 kB on 64-bit archs.) The drawback is that lookup was in O(1) and is now in O(N), but given that the values of N are always small, I don't think this is a problem. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26i2c-dev: CleanupsJean Delvare
i2c-dev: Cleanups * We no more need to include platform_device.h. * Delete the to_i2c_dev macro, which is no more used (and no more valid either.) * Drop i2c_dev.minor. Now that the minor number always matches the i2c adapter number, this field is redundant with i2c_dev.adap->nr. * Delete i2c_dev_get_by_adapter() which is now redundant with i2c_dev_get_by_minor() for the same reason. * Drop the local variable dev in i2cdev_attach_adapter(), we can easily do without it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-25[ARM] 3827/1: iop3xx: add common gpio moduleLennert Buytenhek
Implement the gpio_line_{config,get,set} API for iop3xx. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-09-25[ARM] 3817/1: iop3xx: split the iop3xx mach into iop32x and iop33xLennert Buytenhek
Split the iop3xx mach type into iop32x and iop33x -- split the config symbols, and move the code in the mach-iop3xx directory to the mach-iop32x and mach-iop33x directories. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-09-25[ARM] 3816/1: iop3xx: rename config symbolsLennert Buytenhek
Rename CONFIG_ARCH_IOP321 to CONFIG_ARCH_IOP32X and CONFIG_ARCH_IOP331 to CONFIG_ARCH_IOP33X. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-08-31Merge branch 'merge'Paul Mackerras
2006-08-26[PATCH] i2c: tps65010 build fixesDavid Brownell
The tps65010.c driver in the main tree never got updated with build fixes since the last batch of I2C driver changes; and the genirq trigger flags were updated wierdly too. This also includes a minor tweak to reduce the frequency used to poll for unplug-the-AC-power on the TPS chips that don't provide relevant IRQs. It _would_ be nice to sense whether there's even a battery, but that'd normally be an HDQ/1-wire interface to a smart battery, and such APIs aren't standardized. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-08Merge branch 'merge'Paul Mackerras
2006-08-06[PATCH] SCX200_ACB: eliminate spurious timeout errorsDavid Woodhouse
While busy-waiting for completion, check the hardware after scheduling; don't schedule and then immediately check the _timeout_. If the yield() took a long time (as it does on my OLPC prototype board when it's busy), we'd report a timeout even though the hardware was now ready. This fixes it, and also switches the yield() for a cond_resched() because we don't actually want to be _that_ nice about it. I see nice tightly-packed SMBus transactions now, rather than waiting for milliseconds between successive phases. Actually, we shouldn't be busy-waiting here at all. We should be using interrupts. That's an exercise for another day though. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Cc: Christer Weinigel <wingel@nano-system.com> Cc: <Jordan.Crouse@amd.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-08-01Merge branch 'merge'Paul Mackerras
2006-07-31[POWERPC] powermac: Constify & voidify get_property()Jeremy Kerr
Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. powermac platform & macintosh driver changes. Built for pmac32_defconfig, g5_defconfig Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-07-12[PATCH] pca9539: Honor the force parameterBen Gardner
The pca9539 driver doesn't honor the force parameter; it always does detection. This patch will skip detection if forced. Signed-off-by: Ben Gardner <gardner.ben@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12[PATCH] i2c-algo-bit: Wipe out dead codeUwe Bugla
i2c-algo-bit: Wipe out dead code Signed-off-by: Uwe Bugla <uwe.bugla@gmx.de> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12[PATCH] i2c: Handle i2c_add_adapter failure in i2c algorithm driversMark M. Hoffman
Content-Disposition: inline; filename=i2c-algo-error-handling-fix.patch It is possible for i2c_add_adapter() to fail. Several I2C algorithm drivers ignore that fact. This (compile-tested only) patch fixes them. Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12[PATCH] i2c-powermac: Fix master_xfer return valueJean Delvare
Fix the value returned by the i2c-powermac's master_xfer method. It should return the number of messages processed successfully, but instead returns the number of data bytes in the first (and only) processed message. Also explicitly mention the master_xfer convention so that future implementations get it right directly. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12[PATCH] scx200_acb: Fix the block transactionsJean Delvare
The scx200_acb i2c bus driver pretends to support SMBus block transactions, but in fact it implements the more simple I2C block transactions. Additionally, it lacks sanity checks on the length of the block transactions, which could lead to a buffer overrun. This fixes an oops reported by Alexander Atanasov: http://marc.theaimsgroup.com/?l=linux-kernel&m=114970382125094 Thanks to Ben Gardner for fixing my bugs :) Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12[PATCH] scx200_acb: Fix the state machineThomas Andrews
Fix the scx200_acb state machine: * Nack was sent one byte too late on reads >= 2 bytes. * Stop bit was set one byte too late on reads. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12[PATCH] i2c-iop3xx: Avoid addressing selfPeter Milne
Avoid addressing self when sending a slave address. Follows instruction in Intel 80331/80321 manuals. Ignoring this worked previously on 80321, but causes a hang on i2cdetect on 80331. Signed-off-by: Peter Milne <peter.milne@d-tacq.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>