- 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 21, 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>
-
- Jun 15, 2009
-
-
Harald Welte authored
The south bridge of the VIA VX855 chipset has a different PCI Device ID so i2c-viapro.c needs to be updated with this. Signed-off-by:
Harald Welte <HaraldWelte@viatech.com> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
Wolfram Sang authored
This driver only reads the user EEPROM of that chip, so we can move it to the eeprom-directory in order to further clean up (and later remove) drivers/i2c/chips. The Kconfig text was updated to match the current functionality, dropping the meanwhile obsoleted parts. Defconfigs have been adapted. Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de> Acked-by:
Ben Gardner <gardner.ben@gmail.com> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
Jean Delvare authored
We don't need to give adapters a parent if they don't have one. The driver core will put them in the virtual device directory and all will be fine. Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
Jean Delvare authored
There's no point in giving the I2C bus of Voodoo3 adapters a class value, there's no video chip driver checking for it anymore. If support is ever needed, the video device should be instantiated explicitly rather than probed. To the best of my knowledge the only video chip that can be found on these boards is a BT869 video encoder, for which no support exists currently. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Acked-by:
Krzysztof Helt <krzysztof.h1@wp.pl>
-
Clifford Wolf authored
Some small changes in i2c core to retry i2c xfers until either the maximum number of retries or the timeout is hit. Signed-off-by:
Clifford Wolf <clifford@clifford.at> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
Jack Stone authored
Remove uneeded void casts. Signed-off-by:
Jack Stone <jwjstone@fastmail.fm> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
- Jun 13, 2009
-
-
Richard Röjfors authored
There is sometimes a need for the ocores driver to add devices to the bus when installed. i2c_register_board_info can not always be used, because the I2C devices are not known at an early state, they could for instance be connected on a I2C bus on a PCI device which has the Open Cores IP. i2c_new_device can not be used in all cases either since the resulting bus nummer might be unknown. The solution is the pass a list of I2C devices in the platform data to the Open Cores driver. This is useful for MFD drivers. Signed-off-by:
Richard Röjfors <richard.rojfors.ext@mocean-labs.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Ben Dooks authored
Change to using platform id table to match either of the two supported platform device names in the driver. This simplifies the driver init and exit code Note, log messages will now be prefixed with 's3c-i2c' instead of the driver name, so output will be of the form of: s3c-i2c s3c2440-i2c.0: slave address 0x10 Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Aaro Koskinen authored
Use longer noise filter period for fast and standard mode. Based on an earlier patch by Eero Nurkkala. Signed-off-by:
Aaro Koskinen <aaro.koskinen@nokia.com> Acked-by:
Tony Lindgren <tony@atomide.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Aaro Koskinen authored
Fix scll/sclh calculations for HS and fast modes. Currently the driver uses equal (roughly) low/high times which will result in too short low time. OMAP3430 TRM gives the following equations: F/S: tLow = (scll + 7) * internal_clk tHigh = (sclh + 5) * internal_clk HS: tLow = (scll + 7) * fclk tHigh = (sclh + 5) * fclk Furthermore, the I2C specification sets the following minimum values for HS tLow/tHigh for capacitive bus loads 100 pF (maximum speed 3400) and 400 pF (maximum speed 1700): speed tLow tHigh 3400 160 ns 60 ns 1700 320 ns 120 ns and for F/S: speed tLow tHigh 400 1300 ns 600 ns 100 4700 ns 4000 ns By using duty cycles 33/66 (HS, F) and 50/50 (S) we stay above these minimum values. Signed-off-by:
Aaro Koskinen <aaro.koskinen@nokia.com> Acked-by:
Tony Lindgren <tony@atomide.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Michael Hennerich authored
Some drivers need i2c_smbus_read_i2c_block_data() functionality, so add support for it to the Blackfin I2C bus driver. Signed-off-by:
Michael Hennerich <michael.hennerich@analog.com> Signed-off-by:
Mike Frysinger <vapier@gentoo.org> [ben-linux@fluff.org: shortened subject] Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Frank Shew authored
We have a custom BF537 board with an I2C RTC (MAX DS3231) running uclinux 2007R1 for some time. Recently during migration to 2008R1.5-RC3 we losted access to the RTC. The RTC driver calls 'i2c_transfer()' which in turns calls 'bfin_twi_master_xfer()' in i2c-bfin-twi.c. Compared with 2007R1, it looks like the 2008R1.5 version of i2c-bin-twi.c has a new mode 'TWI_I2C-MODE_REPEAT' which corresponds to the Repeat Start Condition described in the HRM. However, according to the HRM, at XMIT or RECV interrupt and when the data count is 0, not only is the RESTART bit supposed to be set, but MDIR must also be set if the next operation is a receive sequence, and cleared if not. Currently there is no code that looks at the I2C_M_RD bit in the flag from the next cur_msg and set/clear the MDIR flag accordingly at the same time that the RSTART bit is set. Instead, MDIR is set or cleared (by OR'ing with 0?) after the RESTART bit has been cleared during handling of MCOMP interrupt. It appears that this is causing our failure with reading the RTC, as a quick patch to set/clear MDIR when RESTART is set seem to solve our problem. Signed-off-by:
Frank Shew <fshew@geometrics.com> Signed-off-by:
Sonic Zhang <sonic.zhang@analog.com> Signed-off-by:
Mike Frysinger <vapier@gentoo.org> Signed-off-by:
Bryan Wu <cooloney@kernel.org> [ben-linux@fluff.org: shorted subject] Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Sonic Zhang authored
Avoid rewrite TWI MASTER_CTL reg when issue next message In i2c repeat transfer mode, byte count of next message should be filled into part of the TWI MASTER_CTL reg when interrupt MCOMP of last message transfer is triggered. But, other bits in this reg should not be touched. Signed-off-by:
Sonic Zhang <sonic.zhang@analog.com> Signed-off-by:
Mike Frysinger <vapier@gentoo.org> Signed-off-by:
Bryan Wu <cooloney@kernel.org> [ben-linux@fluff.org: shorted subject] Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Michael Hennerich authored
Make sure we don't end up with an invalid CLKDIV=0 in case someone specifies 20kHz SCL or less (5 * 1024 / 20 = 0x100). Signed-off-by:
Michael Hennerich <michael.hennerich@analog.com> Signed-off-by:
Mike Frysinger <vapier@gentoo.org> Signed-off-by:
Bryan Wu <cooloney@kernel.org> [ben-linux@fluff.org: shortened subject line] Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
- Jun 04, 2009
-
-
Eric Miao authored
Signed-off-by:
Paul Shen <paul.shen@marvell.com> Signed-off-by:
Eric Miao <eric.miao@marvell.com>
-
Eric Miao authored
Signed-off-by:
Eric Miao <eric.miao@marvell.com>
-
Sean MacLennan authored
The i2c-ibm_iic driver printed messages in an odd order that seemed to list devices before the driver was probed. Here is an example: at24 0-0052: 512 byte 24c04 EEPROM (writable) ibm-iic ef600700.i2c: using standard (100 kHz) mode ad7414 0-004a: chip found This changes the order to print the i2c driver message before scanning for devices so that the logs show the driver, then the devices. Signed-off-by:
Sean MacLennan <smaclennan@pikatech.com> Acked-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Josh Boyer <jwboyer@linux.vnet.ibm.com>
-
- May 13, 2009
-
-
Paul Mundt authored
For consistenct naming, and to allow us to fix up some confusion in the SH-Mobile clock framework, amongst other places. Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
- May 11, 2009
-
-
Mark Ware authored
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>
-
Mark Brown authored
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>
-
Wolfgang Grandegger authored
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>
-