- Sep 19, 2009
-
-
Wolfram Sang authored
As I2C is used by PMICs also, make the busses available early via subsys_initcall(). Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Mikael Pettersson authored
The mv64xxx_i2c_intr() irq handler in drivers/i2c/busses/i2c-mv64xxx.c is declared as returning 'int', resulting in this compile-time warning: drivers/i2c/busses/i2c-mv64xxx.c: In function 'mv64xxx_i2c_probe': drivers/i2c/busses/i2c-mv64xxx.c:540: warning: passing argument 2 of 'request_irq' from incompatible pointer type Fix: correct the return type to 'irqreturn_t'. Signed-off-by:
Mikael Pettersson <mikpe@it.uu.se> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
- Aug 23, 2009
-
-
Magnus Damm authored
This patch modifies the SuperH Mobile I2C driver to support Runtime PM. These changes is all that is needed for proper Runtime PM support in this driver. Driver callbacks for Runtime PM are empty because the device registers are always re-initialized after pm_runtime_get_sync(). Signed-off-by:
Magnus Damm <damm@igel.co.jp> Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
- Aug 20, 2009
-
-
Linus Walleij authored
- blk clk is enabled when an irq arrives. The clk should be enabled, but just to make sure. - All error bits are handled no matter state machine state - All irq's will run complete() except for irq's that wasn't an event. - No more looking into status registers just in case an interrupt has happend and the irq handle wasn't executed. - irq_disable/enable are now separete functions. - clk settings calculation changed to round upwards instead of downwards. - Number of address send attempts before giving up is increased to 12 from 10 since it most times take 8 tries before getting through. Signed-off-by:
Linus Walleij <linus.walleij@stericsson.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Moiz Sonasath authored
Silicon Errata 1.153 has been fixed on OMAP 3630|4430 with the use of a later version of I2C IP block. The errata impacts OMAP 2420|2430|3430, enable the workaround for these based on I2C IP block revision number instead of OMAP CPU type Signed-off-by:
Moiz Sonasath <m-sonasath@ti.com> Signed-off-by:
Vikram Pandita <vikram.pandita@ti.com> Reviewed-by:
Paul Walmsley <paul@pwsan.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Moiz Sonasath authored
ACK any pending read/write interrupts before exiting the ISR either after completing the operation [ARDY interrupt] or in case of an error [NACK|AL interrupt] Signed-off-by:
Moiz Sonasath <m-sonasath@ti.com> Signed-off-by:
Vikram Pandita <vikram.pandita@ti.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Nishanth Menon authored
I2C status ack for [RX]RDR and [RX]RDY could cause race conditions of clearing the event twice and a violation of the programing sequence as defined in TRM This patch fixes the same. Signed-off-by:
Nishanth Menon <nm@ti.com> Signed-off-by:
Moiz Sonasath <m-sonasath@ti.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
- Jul 30, 2009
-
-
Sonasath, Moiz authored
When an XRDY/XDR is hit, wait for XUDF before writing data to DATA_REG. Otherwise some data bytes can be lost while transferring them from the memory to the I2C interface. Do a Busy-wait for XUDF, before writing data to DATA_REG. While waiting if there is NACK | AL, set the appropriate error flags, ack the pending interrupts and return from the ISR. Signed-off-by:
Moiz Sonasath <m-sonasath@ti.com> Signed-off-by:
Vikram pandita <vikram.pandita@ti.com> [ben-linux@fluff.org: fixed mail format and added i2c-omap to subject] Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Sonasath, Moiz authored
In case of a NACK or ARDY or AL interrupt, complete the request. There is no need to service the RRDY/RDR or XRDY/XDR interrupts. Refer TRM SWPU114: Figure 18-31.I2C Master Transmitter Mode, Interrupt Method, in F/S and HS Modes http://focus.ti.com/pdfs/wtbu/SWPU114T_PrelimFinalEPDF_06_25_2009.pdf Signed-off-by:
Moiz Sonasath <m-sonasath@ti.com> Signed-off-by:
Vikram pandita <vikram.pandita@ti.com> [ben-linux@fluff.org: fixed mail format and added i2c-omap to subject] Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Sonasath, Moiz authored
Fix bug in reading the I2C_BUFFSTAT register for getting byte count on RX/TX interrupt. On Interrupt: I2C_STAT[RDR], read 'RXSTAT' from I2C_BUFFSTAT[8-13] On Interrupt: I2C_STAT[XDR] read 'TXSTAT' from I2C_BUFFSTAT[0-5] Signed-off-by:
Jagadeesh Pakaravoor <j-pakaravoor@ti.com> Signed-off-by:
Moiz Sonasath <m-sonasath@ti.com> Signed-off-by:
Vikram pandita <vikram.pandita@ti.com> [ben-linux@fluff.org: fixed mail format and added i2c-omap to subject] Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
- Jul 29, 2009
-
-
Magnus Damm authored
Convert the i2c-sh_mobile i2c bus driver to use subsys_initcall() instead of module_init(). This change makes the driver register a bit earlier which together with earlier platform data moves the time for probe(). The earlier probe() makes it possible to use i2c_get_adapter() and i2c_transfer() from device_initcall(). The same strategy is used by other i2c bus drivers such as i2c-pxa.c and i2c-s3c2410.c. Signed-off-by:
Magnus Damm <damm@igel.co.jp> [ben-linux@fluff.org: minor subject updaye] Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Roel Kluin authored
strlcpy() will always null terminate the string. Signed-off-by:
Roel Kluin <roel.kluin@gmail.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Peter Korsgaard authored
s3c24xx_i2c_init() was overwriting the IICLC value set just above in s3c24xx_i2c_clockrate() with zero, effectively disabling the platform line control setting. Signed-off-by:
Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
- Jul 28, 2009
-
-
Michele Jr De Candia authored
I've tested TSL2550 driver and I've found a bug: when light is off, returned value from tsl2550_calculate_lux function is -1 when it should be 0 (sensor correctly read that light was off). I think the bug is that a zero c0 value (approximated value of ch0) is misinterpreted as an error. Signed-off-by:
Michele Jr De Candia <michele.decandia@valueteam.com> Acked-by:
Rodolfo Giometti <giometti@linux.it> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
- Jul 23, 2009
-
-
Magnus Damm authored
Convert the i2c-sh_mobile i2c bus driver to use subsys_initcall() instead of module_init(). This change makes the driver register a bit earlier which together with earlier platform data moves the time for probe(). The earlier probe() makes it possible to use i2c_get_adapter() and i2c_transfer() from device_initcall(). The same strategy is used by other i2c bus drivers such as i2c-pxa.c and i2c-s3c2410.c. Signed-off-by:
Magnus Damm <damm@igel.co.jp> Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
- Jul 21, 2009
-
-
Magnus Damm authored
This is V2 of the i2c-s3c2410 dev_pm_ops patch. The callbacks are converted for CONFIG_SUSPEND like this: suspend_late() -> suspend_noirq() resume() -> resume() Signed-off-by:
Magnus Damm <damm@igel.co.jp> Acked-by:
Greg Kroah-Hartman <gregkh@suse.de> Acked-by:
Pavel Machek <pavel@ucw.cz> Signed-off-by:
Rafael J. Wysocki <rjw@sisk.pl>
-
Magnus Damm authored
This patch reworks platform driver power management code for i2c-pxa from legacy late/early callbacks to dev_pm_ops. The callbacks are converted for CONFIG_SUSPEND like this: suspend_late() -> suspend_noirq() resume_early() -> resume_noirq() Signed-off-by:
Magnus Damm <damm@igel.co.jp> Acked-by:
Greg Kroah-Hartman <gregkh@suse.de> Acked-by:
Pavel Machek <pavel@ucw.cz> Signed-off-by:
Rafael J. Wysocki <rjw@sisk.pl>
-
- Jul 14, 2009
-
-
Julia Lawall authored
Use the function resource_size, which reduces the chance of introducing off-by-one errors in calculating the resource size. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/ ) // <smpl> @@ struct resource *res; @@ - (res->end - res->start) + 1 + resource_size(res) // </smpl> Signed-off-by:
Julia Lawall <julia@diku.dk> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
David Brownell authored
Make i2c-davinci cope properly with "i2cdetect": don't spew syslog spam on perfectly normal behaviors, or respond to any address other than the one reserved for the SMBus host. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net> Signed-off-by:
Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Kevin Hilman authored
DaVinci core code has converted to the new clkdev API so clock name strings are not needed. Instead, just the a 'struct device' pointer is needed. Signed-off-by:
Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
- Jul 08, 2009
-
-
Joe Perches authored
Commit 5fd29d6c ("printk: clean up handling of log-levels and newlines") changed printk semantics. printk lines with multiple KERN_<level> prefixes are no longer emitted as before the patch. <level> is now included in the output on each additional use. Remove all uses of multiple KERN_<level>s in formats. Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Jun 25, 2009
-
-
Ingo Molnar authored
This build error triggers on x86: drivers/built-in.o: In function `i2c_dw_init': i2c-designware.c:(.text+0x4e37ca): undefined reference to `clk_get_rate' drivers/built-in.o: In function `dw_i2c_probe': i2c-designware.c:(.devinit.text+0x51f5e): undefined reference to `clk_get' i2c-designware.c:(.devinit.text+0x51f76): undefined reference to `clk_enable' i2c-designware.c:(.devinit.text+0x520ff): undefined reference to `clk_disable' i2c-designware.c:(.devinit.text+0x52108): undefined reference to `clk_put' Because this new driver uses the clk_*() facilities which is an ARM-only thing currently. Signed-off-by:
Ingo Molnar <mingo@elte.hu> Acked-by:
Baruch Siach <baruch@tkos.co.il> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Jun 23, 2009
-
-
Baruch Siach authored
The i2c Linux driver for the DesignWare i2c block of Synopsys, which is meant for AMBA Peripheral Bus. This i2c block is used on SoC chips like the ARM9 based PVG610. Signed-off-by:
Baruch Siach <baruch@tkos.co.il> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
- Jun 22, 2009
-
-
Michael Trimarchi authored
When a process tries to read/write a disconnected i2c device, it receives a signal (e.g. ctrl-c) and the kernel gets stuck. BUG: soft lockup - CPU#0 stuck for 61s! [I2CEEpromTest:392] NIP: c01628f8 LR: c01628f0 CTR: c00177cc REGS: c39abd70 TRAP: 0901 Not tainted (2.6.25.7-alcore) MSR: 00009032 <EE,ME,IR,DR> CR: 42042048 XER: 20000000 TASK = c3889bd0[392] 'I2CEEpromTest' THREAD: c39aa000 GPR00: 00009000 c39abe20 c3889bd0 c39075c8 c39abe28 00000001 00000000 00000001 GPR08: c3889bd0 c39075c8 00009032 c39abe34 00002437 NIP [c01628f8] cpm_i2c_xfer+0x5fc/0x6d0 LR [c01628f0] cpm_i2c_xfer+0x5f4/0x6d0 Call Trace: [c39abe20] [c0162924] cpm_i2c_xfer+0x628/0x6d0 (unreliable) [c39abe90] [c015f6a0] i2c_transfer+0x88/0xb4 [c39abeb0] [c0160164] i2c_master_recv+0x48/0x6c [c39abed0] [c01618dc] i2cdev_read+0x50/0xe4 [c39abef0] [c0068b24] vfs_read+0xc4/0x108 [c39abf10] [c0068f4c] sys_read+0x4c/0x90 [c39abf40] [c000d348] ret_from_syscall+0x0/0x38 Instruction dump: 3bc00064 92610010 3bf201c8 92810014 3b61 This happen because though the wait_event_interruptible_timeout takes the signals into account, the driver does not handle them. We propose to change the wait_event_interruptible_timeout with wait_event_timeout, leaving the signals to be handled in other points on the upper layers. Signed-off-by:
Bruno Morelli <bruno@evidence.eu.com> Signed-off-by:
Michael Trimarchi <michael@evidence.eu.com> Acked-by:
Jochen Friedrich <jochen@scram.de> [ben-linux@fluff.org: fix title for patch] Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Tony Lindgren authored
Hi Ben, Can you please queue this fix? Thanks, Tony >From ffe2b2cdf6283770b70a197e3748c6b40a1006be Mon Sep 17 00:00:00 2001 From: Tony Lindgren <tony@atomide.com> Date: Wed, 17 Jun 2009 13:14:23 +0300 Subject: [PATCH] i2c-omap: Fix build breaking typo in cpu_is_omap_2430 Commit 84bf2c86 introduced a typo, it should be cpu_is_omap2430 instead. The typo was probably caused by a mismerge. Without this patch all omaps fail to build with: error: implicit declaration of function 'cpu_is_omap_2430' Signed-off-by:
Tony Lindgren <tony@atomide.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
- Jun 19, 2009
-
-
Rodolfo Giometti authored
By using rwsem we can easily manage recursive calls of i2c_scan_static_board_info() function without breaking the locking. Signed-off-by:
Rodolfo Giometti <giometti@linux.it> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
Jean Delvare authored
Add a sysfs interface to instantiate and delete I2C devices. This is primarily a replacement of the force_* module parameters implemented by some i2c drivers. These module parameters were implemented internally by the I2C_CLIENT_INSMOD* macros, which don't scale well. This can also be used when developing a driver on a self-soldered board which doesn't yet have proper I2C device declaration at the platform level, and presumably for various debugging situations. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net>
-
Jean Delvare authored
The i2c-core code tends to hold the core lock for longer than it should. Limit locking to the necessary sections for both performance and clarity. This is also a requirement to support I2C multiplexers in the future. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Tested-by:
Rodolfo Giometti <giometti@linux.it> Cc: David Brownell <dbrownell@users.sourceforge.net>
-
Jean Delvare authored
We used to maintain our own per-adapter list of i2c clients, but this is redundant with what the driver core does, and no longer needed. Just drop the redundant list. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net>
-
Jean Delvare authored
Legacy i2c drivers are gone, all drivers are new-style now, so there is no point to check. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net>
-
Jean Delvare authored
Now that i2c_attach_client is no longer exported, it doesn't need to be a separate function. Merge it into its only user, i2c_new_device. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net>
-
Jean Delvare authored
The legacy i2c_probe() function has no users left, get rid of it. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net>
-
Jean Delvare authored
We converted all the legacy i2c drivers so we can finally get rid of the legacy binding model. Hooray! Signed-off-by:
Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net>
-
Jean Delvare authored
These methods were useful in the legacy binding model but no longer in the new (standard) binding model. There are no users left so we can drop them. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net>
-
- Jun 17, 2009
-
-
Wolfgang Denk authored
So far, MPC512x used mpc512x_find_ips_freq() to get the bus frequency, while MPC52xx used mpc52xx_find_ipb_freq(). Despite the different clock names (IPS vs. IPB) the code was identical. Use common code for both processor families. Signed-off-by:
Wolfgang Denk <wd@denx.de> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- Jun 16, 2009
-
-
Linus Walleij authored
This makes the stu300 driver for the ST Micro ST DDC I2C bus driver depend on MACH_U300, new platforms reusing this I2C driver will need to add in a similar dependency. Signed-off-by:
Linus Walleij <linus.walleij@stericsson.com> [ben-linux@fluff.org: re-aranged subject line] Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Ben Dooks authored
Change the usage of res->end-res->start to resource_size(), missed by the last patch to change this. Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Linus Walleij authored
This replace all instances in the i2c busses tree of res->end - res->start + 1 with the handy macro resource_size(res) from ioport.h (coming in from platform_device.h). This was created with a simple sed -i -e 's/\([a-z]*\)->end *- *[a-z]*->start *+ *1/resource_size(\1)/g' Then manually replacing the PXA redefiniton of the same kind of macro manually. Recompiled some ARM defconfigs I could find to make a rough test so it shouldn't break anything, though I couldn't see exactly which configs you need for all the drivers. Signed-off-by:
Linus Walleij <linus.walleij@stericsson.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Linus Walleij authored
This adds support for the ST Microelectronics DDC I2C bus driver. This bus is used in the U300 architecture recently added to RMK:s ARM tree. Signed-off-by:
Linus Walleij <linus.walleij@stericsson.com> Reviewed-by:
Ben Dooks <ben-linux@fluff.org> Reviewed-by:
Jean Delvare <khali@linus-fr.org> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Mike Frysinger authored
Rather than relying on some of the headers implicitly pulling in io.h, pull it in explicitly our self for ioremap() and friends. Signed-off-by:
Mike Frysinger <vapier@gentoo.org> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-