<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/i2c, branch v3.10.15</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>i2c: i2c-mxs: Use DMA mode even for small transfers</title>
<updated>2013-08-15T05:59:06+00:00</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@freescale.com</email>
</author>
<published>2013-07-01T21:14:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=060a7c36d7ba82d7f520d7f328db5d38e99c20a4'/>
<id>060a7c36d7ba82d7f520d7f328db5d38e99c20a4</id>
<content type='text'>
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&amp;m=137235593101385&amp;w=2
- https://lkml.org/lkml/2013/6/24/430

Let'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 &lt;fabio.estevam@freescale.com&gt;
Acked-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Acked-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Acked-by: Marek Vasut &lt;marex@denx.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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&amp;m=137235593101385&amp;w=2
- https://lkml.org/lkml/2013/6/24/430

Let'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 &lt;fabio.estevam@freescale.com&gt;
Acked-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Acked-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Acked-by: Marek Vasut &lt;marex@denx.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>i2c-piix4: Add AMD CZ SMBus device ID</title>
<updated>2013-07-25T21:07:28+00:00</updated>
<author>
<name>Shane Huang</name>
<email>shane.huang@amd.com</email>
</author>
<published>2013-06-03T10:24:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5ebc73095cf30bca82ef2983a46756ff26b1a810'/>
<id>5ebc73095cf30bca82ef2983a46756ff26b1a810</id>
<content type='text'>
commit b996ac90f595dda271cbd858b136b45557fc1a57 upstream.

To add AMD CZ SMBus controller device ID.

[bhelgaas: drop pci_ids.h update]
Signed-off-by: Shane Huang &lt;shane.huang@amd.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Tejun Heo &lt;tj@kernel.org&gt;
Reviewed-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit b996ac90f595dda271cbd858b136b45557fc1a57 upstream.

To add AMD CZ SMBus controller device ID.

[bhelgaas: drop pci_ids.h update]
Signed-off-by: Shane Huang &lt;shane.huang@amd.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Tejun Heo &lt;tj@kernel.org&gt;
Reviewed-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux</title>
<updated>2013-05-21T18:11:45+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-05-21T18:11:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e748a38596932af8632448f35e8b2bba714ae03d'/>
<id>e748a38596932af8632448f35e8b2bba714ae03d</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/i2c/busses: don't check resource with devm_ioremap_resource</title>
<updated>2013-05-18T09:55:32+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa@the-dreams.de</email>
</author>
<published>2013-05-12T13:19:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=00d083f928a37199e0fac984845bfd8b3587238e'/>
<id>00d083f928a37199e0fac984845bfd8b3587238e</id>
<content type='text'>
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Acked-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Barry Song &lt;Baohua.Song@csr.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Acked-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Barry Song &lt;Baohua.Song@csr.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: suppress lockdep warning on delete_device</title>
<updated>2013-05-17T20:49:45+00:00</updated>
<author>
<name>Alexander Sverdlin</name>
<email>alexander.sverdlin@nsn.com</email>
</author>
<published>2013-05-17T12:56:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e9b526fe704812364bca07edd15eadeba163ebfb'/>
<id>e9b526fe704812364bca07edd15eadeba163ebfb</id>
<content type='text'>
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: [&lt;ffffffff802b3048&gt;] sysfs_hash_and_remove+0x58/0xc8

but task is already holding lock:
  (s_active#110){++++.+}, at: [&lt;ffffffff802b3cb8&gt;] sysfs_write_file+0xc8/0x208

other 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:  (&amp;buffer-&gt;mutex){+.+.+.}, at: [&lt;ffffffff802b3c3c&gt;] sysfs_write_file+0x4c/0x208
  #1:  (s_active#110){++++.+}, at: [&lt;ffffffff802b3cb8&gt;] sysfs_write_file+0xc8/0x208
  #2:  (&amp;adap-&gt;userspace_clients_lock/1){+.+.+.}, at: [&lt;ffffffff80454a18&gt;] i2c_sysfs_delete_device+0x90/0x238
  #3:  (&amp;__lockdep_no_validate__){......}, at: [&lt;ffffffff803dcc24&gt;] device_release_driver+0x24/0x48

stack backtrace:
Call Trace:
[&lt;ffffffff80575cc8&gt;] dump_stack+0x8/0x34
[&lt;ffffffff801b50fc&gt;] __lock_acquire+0x161c/0x2110
[&lt;ffffffff801b5c3c&gt;] lock_acquire+0x4c/0x70
[&lt;ffffffff802b60cc&gt;] sysfs_addrm_finish+0x19c/0x1e0
[&lt;ffffffff802b3048&gt;] sysfs_hash_and_remove+0x58/0xc8
[&lt;ffffffff802b7d8c&gt;] sysfs_remove_group+0x64/0x148
[&lt;ffffffff803d990c&gt;] device_remove_attrs+0x9c/0x1a8
[&lt;ffffffff803d9b1c&gt;] device_del+0x104/0x1d8
[&lt;ffffffff803d9c18&gt;] device_unregister+0x28/0x70
[&lt;ffffffff8045505c&gt;] i2c_del_adapter+0x1cc/0x328
[&lt;ffffffff8045802c&gt;] i2c_del_mux_adapter+0x14/0x38
[&lt;ffffffffc025c108&gt;] pca954x_remove+0x90/0xe0 [pca954x]
[&lt;ffffffff804542f8&gt;] i2c_device_remove+0x80/0xe8
[&lt;ffffffff803dca9c&gt;] __device_release_driver+0x74/0xf8
[&lt;ffffffff803dcc2c&gt;] device_release_driver+0x2c/0x48
[&lt;ffffffff803dbc14&gt;] bus_remove_device+0x13c/0x1d8
[&lt;ffffffff803d9b24&gt;] device_del+0x10c/0x1d8
[&lt;ffffffff803d9c18&gt;] device_unregister+0x28/0x70
[&lt;ffffffff80454b08&gt;] i2c_sysfs_delete_device+0x180/0x238
[&lt;ffffffff802b3cd4&gt;] sysfs_write_file+0xe4/0x208
[&lt;ffffffff8023ddc4&gt;] vfs_write+0xbc/0x160
[&lt;ffffffff8023df6c&gt;] SyS_write+0x54/0xd8
[&lt;ffffffff8013d424&gt;] handle_sys64+0x44/0x64

The 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.html

Commit 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.html

As i2c case is in principle the same, the same workaround could be used here.

Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@nsn.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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: [&lt;ffffffff802b3048&gt;] sysfs_hash_and_remove+0x58/0xc8

but task is already holding lock:
  (s_active#110){++++.+}, at: [&lt;ffffffff802b3cb8&gt;] sysfs_write_file+0xc8/0x208

other 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:  (&amp;buffer-&gt;mutex){+.+.+.}, at: [&lt;ffffffff802b3c3c&gt;] sysfs_write_file+0x4c/0x208
  #1:  (s_active#110){++++.+}, at: [&lt;ffffffff802b3cb8&gt;] sysfs_write_file+0xc8/0x208
  #2:  (&amp;adap-&gt;userspace_clients_lock/1){+.+.+.}, at: [&lt;ffffffff80454a18&gt;] i2c_sysfs_delete_device+0x90/0x238
  #3:  (&amp;__lockdep_no_validate__){......}, at: [&lt;ffffffff803dcc24&gt;] device_release_driver+0x24/0x48

stack backtrace:
Call Trace:
[&lt;ffffffff80575cc8&gt;] dump_stack+0x8/0x34
[&lt;ffffffff801b50fc&gt;] __lock_acquire+0x161c/0x2110
[&lt;ffffffff801b5c3c&gt;] lock_acquire+0x4c/0x70
[&lt;ffffffff802b60cc&gt;] sysfs_addrm_finish+0x19c/0x1e0
[&lt;ffffffff802b3048&gt;] sysfs_hash_and_remove+0x58/0xc8
[&lt;ffffffff802b7d8c&gt;] sysfs_remove_group+0x64/0x148
[&lt;ffffffff803d990c&gt;] device_remove_attrs+0x9c/0x1a8
[&lt;ffffffff803d9b1c&gt;] device_del+0x104/0x1d8
[&lt;ffffffff803d9c18&gt;] device_unregister+0x28/0x70
[&lt;ffffffff8045505c&gt;] i2c_del_adapter+0x1cc/0x328
[&lt;ffffffff8045802c&gt;] i2c_del_mux_adapter+0x14/0x38
[&lt;ffffffffc025c108&gt;] pca954x_remove+0x90/0xe0 [pca954x]
[&lt;ffffffff804542f8&gt;] i2c_device_remove+0x80/0xe8
[&lt;ffffffff803dca9c&gt;] __device_release_driver+0x74/0xf8
[&lt;ffffffff803dcc2c&gt;] device_release_driver+0x2c/0x48
[&lt;ffffffff803dbc14&gt;] bus_remove_device+0x13c/0x1d8
[&lt;ffffffff803d9b24&gt;] device_del+0x10c/0x1d8
[&lt;ffffffff803d9c18&gt;] device_unregister+0x28/0x70
[&lt;ffffffff80454b08&gt;] i2c_sysfs_delete_device+0x180/0x238
[&lt;ffffffff802b3cd4&gt;] sysfs_write_file+0xe4/0x208
[&lt;ffffffff8023ddc4&gt;] vfs_write+0xbc/0x160
[&lt;ffffffff8023df6c&gt;] SyS_write+0x54/0xd8
[&lt;ffffffff8013d424&gt;] handle_sys64+0x44/0x64

The 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.html

Commit 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.html

As i2c case is in principle the same, the same workaround could be used here.

Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@nsn.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: mv64xxx: work around signals causing I2C transactions to be aborted</title>
<updated>2013-05-17T20:49:37+00:00</updated>
<author>
<name>Russell King</name>
<email>rmk+kernel@arm.linux.org.uk</email>
</author>
<published>2013-05-16T10:30:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d295a86eab200b3f0c513e78dbe1f189fd32d397'/>
<id>d295a86eab200b3f0c513e78dbe1f189fd32d397</id>
<content type='text'>
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 &lt;rmk+kernel@arm.linux.org.uk&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;rmk+kernel@arm.linux.org.uk&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: i801: Document feature bits in modinfo</title>
<updated>2013-05-17T20:49:30+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2013-05-15T02:44:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=53229345502bf3713cce220e849743f83065381d'/>
<id>53229345502bf3713cce220e849743f83065381d</id>
<content type='text'>
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 &lt;khali@linux-fr.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;khali@linux-fr.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: designware: add Intel BayTrail ACPI ID</title>
<updated>2013-05-17T20:49:22+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2013-05-13T00:54:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5a7e6bd809ca2f06bd669bd477ad3d6b48a3dd9f'/>
<id>5a7e6bd809ca2f06bd669bd477ad3d6b48a3dd9f</id>
<content type='text'>
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 &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: designware: always clear interrupts before enabling them</title>
<updated>2013-05-17T08:33:36+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2013-05-13T00:54:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2a2d95e9d6d29e726cc294b65391917ed2e32bf4'/>
<id>2a2d95e9d6d29e726cc294b65391917ed2e32bf4</id>
<content type='text'>
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 &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: designware: fix RX FIFO overrun</title>
<updated>2013-05-17T08:33:11+00:00</updated>
<author>
<name>Josef Ahmad</name>
<email>josef.ahmad@linux.intel.com</email>
</author>
<published>2013-04-19T16:28:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e6f34cea56f5b95498070eaa9f4aa3ba4a9e4f62'/>
<id>e6f34cea56f5b95498070eaa9f4aa3ba4a9e4f62</id>
<content type='text'>
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 &lt;josef.ahmad@linux.intel.com&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;josef.ahmad@linux.intel.com&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
</pre>
</div>
</content>
</entry>
</feed>
