01 Sep, 2014
1 commit
-
According to the spec, for multimaster mode, if I2C is enabled
when the bus is busy and asserts start, hardware inhibits the
transmission, clears MSTA without signaling a stop, generate
an interrupt, and set I2C_I2SR[IAL] to indicate a failed attempt
to engage the bus, which means arbitration lost. In this case,
we should first test I2C_I2SR[IAL], and clear this bit if it is
set, and then I2C controller default to slave receive mode.This patch check the IAL bit every time before an I2c transmission.
if IAL is set, clear it and make I2C controller to default mode.Signed-off-by: haibo.chen
28 Aug, 2014
2 commits
-
Test i2c device Maxim max44009, datasheet is located at:
http://www.maximintegrated.com/datasheet/index.mvp/id/7175The max44009 support repeat operation like:
read -> repeat restart -> read/writeThe current i2c imx host controller driver don't support this
operation that causes i2c bus hang due to "MTX" is cleared in
.i2c_imx_read(). If "read" is the last message there have no problem,
so the current driver supports all SMbus operation like:
write -> repeat restart -> read/writeIMX i2c controller for master receiver has some limitation:
- If it is the last byte for one operation, it must generate STOP
signal before read I2DR to prevent controller from generating another
clock cycle.
- If it is the last byte in the read, and then do repeat restart, it must
set "MTX" before read I2DR to prevent controller from generating another
extra clock cycle.The patch is to fix the issue.
Signed-off-by: Fugang Duan
Signed-off-by: Wolfram Sang -
i.MX6 I2C clk is from IPG_PERCLK which is sourced from IPG_CLK.
Under normal operation, IPG_CLK is 66MHz, ipg_perclk is at 22MHz.
In low bus freq mode, IPG_CLK is at 12MHz and IPG_PERCLK is down
to 4MHz. So the I2C driver must update the divider register for
each transaction when the current IPG_PERCLK is not equal to the
clock of previous transaction.Signed-off-by: Fugang Duan
08 Jun, 2014
5 commits
-
commit ce78cc071f5f541480e381cc0241d37590041a9d upstream.
Don't unmark the device as suspended until after it's been re-setup.
The main race would be w.r.t. an i2c driver that gets resumed at the same
time (asyncronously), that is allowed to do a transfer since suspended
is set to 0 before reinit, but really should have seen the -EIO return
instead.Signed-off-by: Olof Johansson
Signed-off-by: Doug Anderson
Acked-by: Kukjin Kim
Signed-off-by: Wolfram Sang
Signed-off-by: Greg Kroah-Hartman -
commit 47bb27e78867997040a228328f2a631c3c7f2c82 upstream.
There have been "i2c_designware 80860F41:00: controller timed out" errors
on a number of Baytrail platforms. The issue is caused by incorrect value in
Interrupt Mask Register (DW_IC_INTR_MASK) when i2c core is being enabled.
This causes call to __i2c_dw_enable() to immediately start the transfer which
leads to timeout. There are 3 failure modes observed:1. Failure in S0 to S3 resume path
The default value after reset for DW_IC_INTR_MASK is 0x8ff. When we start
the first transaction after resuming from system sleep, TX_EMPTY interrupt
is already unmasked because of the hardware default.2. Failure in normal operational path
This failure happens rarely and is hard to reproduce. Debug trace showed that
DW_IC_INTR_MASK had value of 0x254 when failure occurred, which meant
TX_EMPTY was unmasked.3. Failure in S3 to S0 suspend path
This failure also happens rarely and is hard to reproduce. Adding debug trace
that read DW_IC_INTR_MASK made this failure not reproducible. But from ISR
call trace we could conclude TX_EMPTY was unmasked when problem occurred.The patch masks all interrupts before the controller is enabled to resolve the
faulty DW_IC_INTR_MASK conditions.Signed-off-by: Wenkai Du
Acked-by: Mika Westerberg
[wsa: improved the comment and removed typo in commit msg]
Signed-off-by: Wolfram Sang
Signed-off-by: Greg Kroah-Hartman -
commit d7653964c590ba846aa11a8f6edf409773cbc492 upstream.
This hardware does not support zero length transfers. Instead, the
driver does one (random) byte transfers currently with undefined results
for the slaves. We now bail out.Signed-off-by: Wolfram Sang
Signed-off-by: Wolfram Sang
Signed-off-by: Greg Kroah-Hartman -
commit 1b31e9b76ef8c62291e698dfdb973499986a7f68 upstream.
Add Device ID of Intel BayTrail SMBus Controller.
Signed-off-by: Chew, Kean ho
Signed-off-by: Chew, Chiau Ee
Reviewed-by: Jean Delvare
Signed-off-by: Wolfram Sang
Cc: "Chang, Rebecca Swee Fun"
Signed-off-by: Greg Kroah-Hartman -
commit afc659241258b40b683998ec801d25d276529f43 upstream.
This patch adds the SMBus Device IDs for the Intel Wildcat Point-LP PCH.
Signed-off-by: James Ralston
Signed-off-by: Wolfram Sang
Cc: "Chang, Rebecca Swee Fun"
Signed-off-by: Greg Kroah-Hartman
14 Feb, 2014
1 commit
-
commit f39901c1befa556bc91902516a3e2e460000b4a8 upstream.
This patch adds the i801 SMBus Controller DeviceIDs for the Intel Coleto Creek PCH.
Signed-off-by: Seth Heasley
Signed-off-by: Wolfram Sang
Cc: "Chan, Wei Sern"
Signed-off-by: Greg Kroah-Hartman
05 Dec, 2013
2 commits
-
commit 250ad590d6f12d93f4d85be305b0a598d609232e upstream.
Some gpio chips may have get/set operations that
can sleep. gpio_set_value() only works for chips
which do not sleep, for the others we will get a
kernel warning. Using gpio_set_value_cansleep()
will work for both chips that do sleep and those
who don't.Signed-off-by: Ionut Nicu
Acked-by: Peter Korsgaard
Signed-off-by: Wolfram Sang
Signed-off-by: Greg Kroah-Hartman -
commit 8c0ec2500eeb89749341884a972860d7f9e56f9c upstream.
The i2c-mux driver requires that the chan_id parameter
passed to the i2c_add_mux_adapter() function is equal
to the reg value for that adapter:for_each_child_of_node(mux_dev->of_node, child) {
ret = of_property_read_u32(child, "reg", ®);
if (ret)
continue;
if (chan_id == reg) {
priv->adap.dev.of_node = child;
break;
}
}The i2c-mux-gpio driver uses an internal logical index
for chan_id when calling i2c_add_mux_adapter() instead
of using the reg value.Because of this, there will problems in selecting the
right adapter when the i2c-mux-gpio's index into
mux->data.values doesn't match the reg value.An example of such a case:
mux->data.values = { 1, 0 }
For chan_id = 0, i2c-mux will bind the adapter to the
of_node with reg = , but when it will call the
select() callback with chan_id set to 0, the i2c-mux-gpio
will use it as an index into mux->data.values and it will
actually select the bus with reg = .Signed-off-by: Ionut Nicu
Acked-by: Alexander Sverdlin
Signed-off-by: Wolfram Sang
Signed-off-by: Greg Kroah-Hartman
04 Nov, 2013
1 commit
-
commit bf4169100c909667ede6af67668b3ecce6928343 upstream.
This patch adds code to initialize the DMA buffer to compensate for
possible hardware data corruption.Signed-off-by: James Ralston
[wsa: changed to use 'sizeof']
Signed-off-by: Wolfram Sang
Cc: Jean Delvare
Signed-off-by: Greg Kroah-Hartman
18 Oct, 2013
1 commit
-
commit 4cdbf7d346e7461c3b93a26707c852e2c9db3753 upstream.
Initially commit cb527ede1bf6ff2008a025606f25344b8ed7b4ac
"i2c-omap: Double clear of ARDY status in IRQ handler"
added a workaround for undocumented errata ProDB0017052.
But then commit 1d7afc95946487945cc7f5019b41255b72224b70
"i2c: omap: ack IRQ in parts" refactored code and missed
one of ARDY clearings. So current code violates errata.
It causes often i2c bus timeouts on my Pandaboard.This patch adds a second clearing in place.
Signed-off-by: Grygorii Strashko
Signed-off-by: Taras Kondratiuk
Signed-off-by: Wolfram Sang
Signed-off-by: Greg Kroah-Hartman
15 Aug, 2013
1 commit
-
commit d6e102f498cbcc8dd2e36721a01213f036397112 upstream.
Recently we have been seing some reports about PIO mode not working properly.
- http://www.spinics.net/lists/linux-i2c/msg11985.html
- http://marc.info/?l=linux-i2c&m=137235593101385&w=2
- https://lkml.org/lkml/2013/6/24/430Let's use DMA mode even for small transfers.
Without this patch, i2c reads the incorrect sgtl5000 version on a mx28evk when
touchscreen is enabled:[ 5.856270] sgtl5000 0-000a: Device with ID register 0 is not a sgtl5000
[ 9.877307] sgtl5000 0-000a: ASoC: failed to probe CODEC -19
[ 9.883528] mxs-sgtl5000 sound.12: ASoC: failed to instantiate card -19
[ 9.892955] mxs-sgtl5000 sound.12: snd_soc_register_card failed (-19)[wsa: we have a proper solution for -next, so this non intrusive
solution is OK for now]Signed-off-by: Fabio Estevam
Acked-by: Shawn Guo
Acked-by: Lucas Stach
Acked-by: Marek Vasut
Signed-off-by: Wolfram Sang
Signed-off-by: Greg Kroah-Hartman
26 Jul, 2013
1 commit
-
commit b996ac90f595dda271cbd858b136b45557fc1a57 upstream.
To add AMD CZ SMBus controller device ID.
[bhelgaas: drop pci_ids.h update]
Signed-off-by: Shane Huang
Signed-off-by: Bjorn Helgaas
Reviewed-by: Tejun Heo
Reviewed-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman
22 May, 2013
1 commit
-
Pull i2c bugfixes from Wolfram Sang:
"These should have been in rc2 but I missed it due to working on devm
longer than expected.There is one ID addition, since we are touching the driver anyhow.
And the feature bit documentation is one outcome of a debug session
and will make it easier for users to work around problems. The rest
is typical driver bugfixes."* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
i2c: suppress lockdep warning on delete_device
i2c: mv64xxx: work around signals causing I2C transactions to be aborted
i2c: i801: Document feature bits in modinfo
i2c: designware: add Intel BayTrail ACPI ID
i2c: designware: always clear interrupts before enabling them
i2c: designware: fix RX FIFO overrun
18 May, 2013
5 commits
-
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.Signed-off-by: Wolfram Sang
Acked-by: Stephen Warren
Acked-by: Barry Song -
i2c: suppress lockdep warning on delete_device
Since commit 846f99749ab68bbc7f75c74fec305de675b1a1bf the following lockdep
warning is thrown in case i2c device is removed (via delete_device sysfs
attribute) which contains subdevices (e.g. i2c multiplexer):=============================================
[ INFO: possible recursive locking detected ]
3.8.7-0-sampleversion-fct #8 Tainted: G O
---------------------------------------------
bash/3743 is trying to acquire lock:
(s_active#110){++++.+}, at: [] sysfs_hash_and_remove+0x58/0xc8but task is already holding lock:
(s_active#110){++++.+}, at: [] sysfs_write_file+0xc8/0x208other info that might help us debug this:
Possible unsafe locking scenario:CPU0
----
lock(s_active#110);
lock(s_active#110);*** DEADLOCK ***
May be due to missing lock nesting notation
4 locks held by bash/3743:
#0: (&buffer->mutex){+.+.+.}, at: [] sysfs_write_file+0x4c/0x208
#1: (s_active#110){++++.+}, at: [] sysfs_write_file+0xc8/0x208
#2: (&adap->userspace_clients_lock/1){+.+.+.}, at: [] i2c_sysfs_delete_device+0x90/0x238
#3: (&__lockdep_no_validate__){......}, at: [] device_release_driver+0x24/0x48stack backtrace:
Call Trace:
[] dump_stack+0x8/0x34
[] __lock_acquire+0x161c/0x2110
[] lock_acquire+0x4c/0x70
[] sysfs_addrm_finish+0x19c/0x1e0
[] sysfs_hash_and_remove+0x58/0xc8
[] sysfs_remove_group+0x64/0x148
[] device_remove_attrs+0x9c/0x1a8
[] device_del+0x104/0x1d8
[] device_unregister+0x28/0x70
[] i2c_del_adapter+0x1cc/0x328
[] i2c_del_mux_adapter+0x14/0x38
[] pca954x_remove+0x90/0xe0 [pca954x]
[] i2c_device_remove+0x80/0xe8
[] __device_release_driver+0x74/0xf8
[] device_release_driver+0x2c/0x48
[] bus_remove_device+0x13c/0x1d8
[] device_del+0x10c/0x1d8
[] device_unregister+0x28/0x70
[] i2c_sysfs_delete_device+0x180/0x238
[] sysfs_write_file+0xe4/0x208
[] vfs_write+0xbc/0x160
[] SyS_write+0x54/0xd8
[] handle_sys64+0x44/0x64The problem is already known for USB and PCI subsystems. The reason is that
delete_device attribute is defined statically in i2c-core.c and used for all
devices in i2c subsystem.Discussion of original USB problem:
http://lkml.indiana.edu/hypermail/linux/kernel/1204.3/01160.htmlCommit 356c05d58af05d582e634b54b40050c73609617b introduced new macro to suppress
lockdep warnings for this special case and included workaround for USB code.LKML discussion of the workaround:
http://lkml.indiana.edu/hypermail/linux/kernel/1205.1/03634.htmlAs i2c case is in principle the same, the same workaround could be used here.
Signed-off-by: Alexander Sverdlin
Acked-by: Alan Stern
Cc: Eric W. Biederman
Cc: Tejun Heo
Cc: Peter Zijlstra
Cc: Greg Kroah-Hartman
Signed-off-by: Wolfram Sang -
Do not use interruptible waits in an I2C driver; if a process uses
signals (eg, Xorg uses SIGALRM and SIGPIPE) then these signals can
cause the I2C driver to abort a transaction in progress by another
driver, which can cause that driver to fail. I2C drivers are not
expected to abort transactions on signals.Signed-off-by: Russell King
Signed-off-by: Wolfram Sang -
Duplicate the feature bits documentation in modinfo, as not every user
will read the driver's source code or documentation file.Signed-off-by: Jean Delvare
Signed-off-by: Wolfram Sang -
This is the same controller as on Intel Lynxpoint but the ACPI ID is
different (8086F41). Add support for this.Signed-off-by: Mika Westerberg
Signed-off-by: Wolfram Sang
17 May, 2013
2 commits
-
If the I2C bus is put to a low power state by an ACPI method it might pull
the SDA line low (as its power is removed). Once the bus is put to full
power state again, the SDA line is pulled back to high. This transition
looks like a STOP condition from the controller point-of-view which sets
STOP detected bit in its status register causing the driver to fail
subsequent transfers.Fix this by always clearing all interrupts before we start a transfer.
Signed-off-by: Mika Westerberg
Signed-off-by: Wolfram Sang
Cc: stable@kernel.org -
i2c_dw_xfer_msg() pushes a number of bytes to transmit/receive
to/from the bus into the TX FIFO.
For master-rx transactions, the maximum amount of data that can be
received is calculated depending solely on TX and RX FIFO load.This is racy - TX FIFO may contain master-rx data yet to be
processed, which will eventually land into the RX FIFO. This
data is not taken into account and the function may request more
data than the controller is actually capable of storing.This patch ensures the driver takes into account the outstanding
master-rx data in TX FIFO to prevent RX FIFO overrun.Signed-off-by: Josef Ahmad
Acked-by: Mika Westerberg
Signed-off-by: Wolfram Sang
Cc: stable@kernel.org
10 May, 2013
1 commit
-
Pull removal of GENERIC_GPIO from Grant Likely:
"GENERIC_GPIO now synonymous with GPIOLIB. There are no longer any
valid cases for enableing GENERIC_GPIO without GPIOLIB, even though it
is possible to do so which has been causing confusion and breakage.
This branch does the work to completely eliminate GENERIC_GPIO."* tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux:
gpio: update gpio Chinese documentation
Remove GENERIC_GPIO config option
Convert selectors of GENERIC_GPIO to GPIOLIB
blackfin: force use of gpiolib
m68k: coldfire: use gpiolib
mips: pnx833x: remove requirement for GENERIC_GPIO
openrisc: default GENERIC_GPIO to false
avr32: default GENERIC_GPIO to false
xtensa: remove explicit selection of GENERIC_GPIO
sh: replace CONFIG_GENERIC_GPIO by CONFIG_GPIOLIB
powerpc: remove redundant GENERIC_GPIO selection
unicore32: default GENERIC_GPIO to false
unicore32: remove unneeded select GENERIC_GPIO
arm: plat-orion: use GPIO driver on CONFIG_GPIOLIB
arm: remove redundant GENERIC_GPIO selection
mips: alchemy: require gpiolib
mips: txx9: change GENERIC_GPIO to GPIOLIB
mips: loongson: use GPIO driver on CONFIG_GPIOLIB
mips: remove redundant GENERIC_GPIO select
08 May, 2013
1 commit
-
Pull ARM SoC device tree updates (part 2) from Arnd Bergmann:
"These are mostly new device tree bindings for existing drivers, as
well as changes to the device tree source files to add support for
those devices, and a couple of new boards, most notably Samsung's
Exynos5 based Chromebook.The changes depend on earlier platform specific updates and touch the
usual platforms: omap, exynos, tegra, mxs, mvebu and davinci."* tag 'dt-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (169 commits)
ARM: exynos: dts: cros5250: add EC device
ARM: dts: Add sbs-battery for exynos5250-snow
ARM: dts: Add i2c-arbitrator bus for exynos5250-snow
ARM: dts: add mshc controller node for Exynos4x12 SoCs
ARM: dts: Add chip-id controller node on Exynos4/5 SoC
ARM: EXYNOS: Create virtual I/O mapping for Chip-ID controller using device tree
ARM: davinci: da850-evm: add SPI flash support
ARM: davinci: da850: override SPI DT node device name
ARM: davinci: da850: add SPI1 DT node
spi/davinci: add DT binding documentation
spi/davinci: no wildcards in DT compatible property
ARM: dts: mvebu: Convert mvebu device tree files to 64 bits
ARM: dts: mvebu: introduce internal-regs node
ARM: dts: mvebu: Convert all the mvebu files to use the range property
ARM: dts: mvebu: move all peripherals inside soc
ARM: dts: mvebu: fix cpus section indentation
ARM: davinci: da850: add EHRPWM & ECAP DT node
ARM/dts: OMAP3: fix pinctrl-single configuration
ARM: dts: Add OMAP3430 SDP NOR flash memory binding
ARM: dts: Add NOR flash bindings for OMAP2420 H4
...
07 May, 2013
1 commit
-
This is support for the ARM Chromebook, originally scheduled
as a "late" pull request. Since it's already late now, we
can combine this into the existing next/dt2 branch.* late/dt:
ARM: exynos: dts: cros5250: add EC device
ARM: dts: Add sbs-battery for exynos5250-snow
ARM: dts: Add i2c-arbitrator bus for exynos5250-snow
ARM: dts: Add chip-id controller node on Exynos4/5 SoC
ARM: EXYNOS: Create virtual I/O mapping for Chip-ID controller using device tree
03 May, 2013
1 commit
-
Pull i2c changes from Wolfram Sang:
- an arbitration driver. While the driver is quite simple, it caused
discussion if we need additional arbitration on top of the one
specified in the I2C standard. Conclusion is that I accept a few
generic mechanisms, but not very specific ones.- the core lost the detach_adapter() call. It has no users anymore and
was in the way for other cleanups. attach_adapter() is sadly still
there since there are users waiting to be converted.- the core gained a bus recovery infrastructure. I2C defines a way to
recover if the data line is stalled. This mechanism is now in the
core and drivers can now pass some data to make use of it.- bigger driver cleanups for designware, s3c2410
- removing superfluous refcounting from drivers
- removing Ben Dooks as second maintainer due to inactivity. Thanks
for all your work so far, Ben!- bugfixes, feature additions, devicetree fixups, simplifications...
* 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (38 commits)
i2c: xiic: must always write 16-bit words to TX_FIFO
i2c: octeon: use HZ in timeout value
i2c: octeon: Fix i2c fail problem when a process is terminated by a signal
i2c: designware-pci: drop superfluous {get|put}_device
i2c: designware-plat: drop superfluous {get|put}_device
i2c: davinci: drop superfluous {get|put}_device
MAINTAINERS: Ben Dooks is inactive regarding I2C
i2c: mux: Add i2c-arb-gpio-challenge 'mux' driver
i2c: at91: convert to dma_request_slave_channel_compat()
i2c: mxs: do error checking and handling in PIO mode
i2c: mxs: remove races in PIO code
i2c-designware: switch to use runtime PM autosuspend
i2c-designware: use usleep_range() in the busy-loop
i2c-designware: enable/disable the controller properly
i2c-designware: use dynamic adapter numbering on Lynxpoint
i2c-designware-pci: use managed functions pcim_* and devm_*
i2c-designware-pci: use dev_err() instead of printk()
i2c-designware: move to managed functions (devm_*)
i2c: remove CONFIG_HOTPLUG ifdefs
i2c: s3c2410: Add SMBus emulation for block read
...
01 May, 2013
1 commit
-
Pull trivial tree updates from Jiri Kosina:
"Usual stuff, mostly comment fixes, typo fixes, printk fixes and small
code cleanups"* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (45 commits)
mm: Convert print_symbol to %pSR
gfs2: Convert print_symbol to %pSR
m32r: Convert print_symbol to %pSR
iostats.txt: add easy-to-find description for field 6
x86 cmpxchg.h: fix wrong comment
treewide: Fix typo in printk and comments
doc: devicetree: Fix various typos
docbook: fix 8250 naming in device-drivers
pata_pdc2027x: Fix compiler warning
treewide: Fix typo in printks
mei: Fix comments in drivers/misc/mei
treewide: Fix typos in kernel messages
pm44xx: Fix comment for "CONFIG_CPU_IDLE"
doc: Fix typo "CONFIG_CGROUP_CGROUP_MEMCG_SWAP"
mmzone: correct "pags" to "pages" in comment.
kernel-parameters: remove outdated 'noresidual' parameter
Remove spurious _H suffixes from ifdef comments
sound: Remove stray pluses from Kconfig file
radio-shark: Fix printk "CONFIG_LED_CLASS"
doc: put proper reference to CONFIG_MODULE_SIG_ENFORCE
...
24 Apr, 2013
2 commits
-
The TX_FIFO register is 10 bits wide. The lower 8 bits are the data to be
written, while the upper two bits are flags to indicate stop/start.The driver apparently attempted to optimize write access, by only writing a
byte in those cases where the stop/start bits are zero. However, we have
seen cases where the lower byte is duplicated onto the upper byte by the
hardware, which causes inadvertent stop/starts.This patch changes the write access to the transmit FIFO to always be 16 bits
wide.Signed off by: Steven A. Falco
Signed-off-by: Wolfram Sang
Cc: stable@kernel.org -
HZ based value is better than a magic number.
Signed-off-by: Eunbong Song
Signed-off-by: Wolfram Sang
20 Apr, 2013
4 commits
-
I've been debugging the abnormal operation of i2c on octeon. If a process is
terminated by signal in the middle of i2c operation, next i2c read operation
which is done by another process was failed. So i changed to ignore signal in
the middle of i2c operation. After that the problem was not reproduced.Signed-off-by: Eunbong Song
Signed-off-by: Wolfram Sang -
Driver core already takes care of refcounting, no need to do this on
driver level again.Signed-off-by: Wolfram Sang
Tested-by: Mika Westerberg -
Driver core already takes care of refcounting, no need to do this on
driver level again.Signed-off-by: Wolfram Sang
Tested-by: Mika Westerberg -
Driver core already takes care of refcounting, no need to do this on
driver level again.Signed-off-by: Wolfram Sang
Tested-by: Sekhar Nori
17 Apr, 2013
1 commit
-
The i2c-arb-gpio-challenge driver implements an I2C arbitration scheme
where masters need to claim the bus with a GPIO before they can start
a transaction. This should generally only be used when standard I2C
multimaster isn't appropriate for some reason (errata/bugs).This driver is based on code that Simon Glass added to the i2c-s3c2410
driver in the Chrome OS kernel 3.4 tree. The current incarnation as a
mux driver is as suggested by Grant Likely. See
for some history.Signed-off-by: Doug Anderson
Signed-off-by: Simon Glass
Signed-off-by: Naveen Krishna Chatradhi
Reviewed-by: Stephen Warren
Acked-by: Olof Johansson
Signed-off-by: Wolfram Sang
16 Apr, 2013
5 commits
-
GENERIC_GPIO is now equivalent to GPIOLIB and features that depended on
GENERIC_GPIO can now depend on GPIOLIB to allow removal of this option.Signed-off-by: Alexandre Courbot
Acked-by: Linus Walleij
Acked-by: Grant Likely -
Use generic DMA DT helper. Platforms booting with or without DT populated are
both supported.Signed-off-by: Ludovic Desroches
Acked-by: Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Wolfram Sang -
In PIO mode we can end up with the same errors as in DMA mode, but as IRQs
are disabled there we have to check for them manually after each command.Also don't use the big controller reset hammer when receiving a NAK from a
slave. It's sufficient to tell the controller to continue at a clean state.Signed-off-by: Lucas Stach
Tested-by: Marek Vasut
Signed-off-by: Wolfram Sang -
This commit fixes the three following races in PIO code:
- The CTRL0 register is racy in itself, when programming transfer state and
run bit in the same cycle the hardware sometimes ends up using the state
from the last transfer. Fix this by programming state in one cycle, make
sure the write is flushed down APBX bus by reading back the reg and only
then trigger the run bit.- Only clear the DMAREQ bit in DEBUG0 after the read/write to the data reg
happened. Otherwise we are racing with the hardware about who touches
the data reg first.- When checking for completion of a transfer it's not sufficient to check
if the data engine finished, but also a check for i2c bus idle is needed.
In PIO mode we are really fast to program the next transfer after a finished
one, so the controller possibly tries to start a new transfer while the
clkgen engine is still busy writing the NAK/STOP from the last transfer to
the bus.Signed-off-by: Lucas Stach
Signed-off-by: Wolfram Sang -
Using autosuspend helps to reduce the resume latency in situations where
another I2C message is going to be started soon. For example with HID over
I2C touch panels we get several messages in a short period of time while
the touch panel is in use.Signed-off-by: Mika Westerberg
Signed-off-by: Wolfram Sang