<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/i2c, branch v4.14.217</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.217</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.217'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-01-17T12:58:59+00:00</updated>
<entry>
<title>i2c: sprd: use a specific timeout to avoid system hang up issue</title>
<updated>2021-01-17T12:58:59+00:00</updated>
<author>
<name>Chunyan Zhang</name>
<email>chunyan.zhang@unisoc.com</email>
</author>
<published>2020-12-14T04:58:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3d87acd7e4ac0df83d8c8bb445923c415bf7171a'/>
<id>urn:sha1:3d87acd7e4ac0df83d8c8bb445923c415bf7171a</id>
<content type='text'>
commit 0b884fe71f9ee6a5df35e677154256ea2099ebb8 upstream.

If the i2c device SCL bus being pulled up due to some exception before
message transfer done, the system cannot receive the completing interrupt
signal any more, it would not exit waiting loop until MAX_SCHEDULE_TIMEOUT
jiffies eclipse, that would make the system seemed hang up. To avoid that
happen, this patch adds a specific timeout for message transfer.

Fixes: 8b9ec0719834 ("i2c: Add Spreadtrum I2C controller driver")
Signed-off-by: Linhua Xu &lt;linhua.xu@unisoc.com&gt;
Signed-off-by: Chunyan Zhang &lt;chunyan.zhang@unisoc.com&gt;
[wsa: changed errno to ETIMEDOUT]
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>i2c: qup: Fix error return code in qup_i2c_bam_schedule_desc()</title>
<updated>2020-12-11T12:39:06+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2020-11-16T14:10:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=083c1c7f1333a794ddf1228edc9dbbdc129edb8d'/>
<id>urn:sha1:083c1c7f1333a794ddf1228edc9dbbdc129edb8d</id>
<content type='text'>
commit e9acf0298c664f825e6f1158f2a97341bf9e03ca upstream.

Fix to return the error code from qup_i2c_change_state()
instaed of 0 in qup_i2c_bam_schedule_desc().

Fixes: fbf9921f8b35d9b2 ("i2c: qup: Fix error handling")
Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>i2c: imx: Check for I2SR_IAL after every byte</title>
<updated>2020-12-11T12:39:05+00:00</updated>
<author>
<name>Christian Eggers</name>
<email>ceggers@arri.de</email>
</author>
<published>2020-10-09T11:03:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9b77be65d82958ebbb7cfe60dbbda6165fe9b3f4'/>
<id>urn:sha1:9b77be65d82958ebbb7cfe60dbbda6165fe9b3f4</id>
<content type='text'>
commit 1de67a3dee7a279ebe4d892b359fe3696938ec15 upstream.

Arbitration Lost (IAL) can happen after every single byte transfer. If
arbitration is lost, the I2C hardware will autonomously switch from
master mode to slave. If a transfer is not aborted in this state,
consecutive transfers will not be executed by the hardware and will
timeout.

Signed-off-by: Christian Eggers &lt;ceggers@arri.de&gt;
Tested (not extensively) on Vybrid VF500 (Toradex VF50):
Tested-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Acked-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>i2c: imx: Fix reset of I2SR_IAL flag</title>
<updated>2020-12-11T12:39:05+00:00</updated>
<author>
<name>Christian Eggers</name>
<email>ceggers@arri.de</email>
</author>
<published>2020-10-09T11:03:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=693b198d476add6f9cae22907f11c90f5933f6d0'/>
<id>urn:sha1:693b198d476add6f9cae22907f11c90f5933f6d0</id>
<content type='text'>
commit 384a9565f70a876c2e78e58c5ca0bbf0547e4f6d upstream.

According to the "VFxxx Controller Reference Manual" (and the comment
block starting at line 97), Vybrid requires writing a one for clearing
an interrupt flag. Syncing the method for clearing I2SR_IIF in
i2c_imx_isr().

Signed-off-by: Christian Eggers &lt;ceggers@arri.de&gt;
Fixes: 4b775022f6fd ("i2c: imx: add struct to hold more configurable quirks")
Reviewed-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>i2c: imx: Fix external abort on interrupt in exit paths</title>
<updated>2020-11-22T09:00:24+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzk@kernel.org</email>
</author>
<published>2020-09-20T21:12:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7dd0051f6b85ce19140c64b130d6eb89f1830749'/>
<id>urn:sha1:7dd0051f6b85ce19140c64b130d6eb89f1830749</id>
<content type='text'>
commit e50e4f0b85be308a01b830c5fbdffc657e1a6dd0 upstream

If interrupt comes late, during probe error path or device remove (could
be triggered with CONFIG_DEBUG_SHIRQ), the interrupt handler
i2c_imx_isr() will access registers with the clock being disabled.  This
leads to external abort on non-linefetch on Toradex Colibri VF50 module
(with Vybrid VF5xx):

    Unhandled fault: external abort on non-linefetch (0x1008) at 0x8882d003
    Internal error: : 1008 [#1] ARM
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper Not tainted 5.7.0 #607
    Hardware name: Freescale Vybrid VF5xx/VF6xx (Device Tree)
      (i2c_imx_isr) from [&lt;8017009c&gt;] (free_irq+0x25c/0x3b0)
      (free_irq) from [&lt;805844ec&gt;] (release_nodes+0x178/0x284)
      (release_nodes) from [&lt;80580030&gt;] (really_probe+0x10c/0x348)
      (really_probe) from [&lt;80580380&gt;] (driver_probe_device+0x60/0x170)
      (driver_probe_device) from [&lt;80580630&gt;] (device_driver_attach+0x58/0x60)
      (device_driver_attach) from [&lt;805806bc&gt;] (__driver_attach+0x84/0xc0)
      (__driver_attach) from [&lt;8057e228&gt;] (bus_for_each_dev+0x68/0xb4)
      (bus_for_each_dev) from [&lt;8057f3ec&gt;] (bus_add_driver+0x144/0x1ec)
      (bus_add_driver) from [&lt;80581320&gt;] (driver_register+0x78/0x110)
      (driver_register) from [&lt;8010213c&gt;] (do_one_initcall+0xa8/0x2f4)
      (do_one_initcall) from [&lt;80c0100c&gt;] (kernel_init_freeable+0x178/0x1dc)
      (kernel_init_freeable) from [&lt;80807048&gt;] (kernel_init+0x8/0x110)
      (kernel_init) from [&lt;80100114&gt;] (ret_from_fork+0x14/0x20)

Additionally, the i2c_imx_isr() could wake up the wait queue
(imx_i2c_struct-&gt;queue) before its initialization happens.

The resource-managed framework should not be used for interrupt handling,
because the resource will be released too late - after disabling clocks.
The interrupt handler is not prepared for such case.

Fixes: 1c4b6c3bcf30 ("i2c: imx: implement bus recovery")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Acked-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
Signed-off-by: Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>i2c: imx: use clk notifier for rate changes</title>
<updated>2020-11-22T09:00:24+00:00</updated>
<author>
<name>Lucas Stach</name>
<email>l.stach@pengutronix.de</email>
</author>
<published>2018-03-08T13:25:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9d63ef79a92de6c541f6794fa66e4530e6501ae5'/>
<id>urn:sha1:9d63ef79a92de6c541f6794fa66e4530e6501ae5</id>
<content type='text'>
commit 90ad2cbe88c22d0215225ab9594eeead0eb24fde upstream

Instead of repeatedly calling clk_get_rate for each transfer, register
a clock notifier to update the cached divider value each time the clock
rate actually changes.

Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Reviewed-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>i2c: core: Restore acpi_walk_dep_device_list() getting called after registering the ACPI i2c devs</title>
<updated>2020-10-29T08:07:14+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2020-10-14T14:41:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d40a93fabd7fa36d0992f19ca3081a2cc09c33cb'/>
<id>urn:sha1:d40a93fabd7fa36d0992f19ca3081a2cc09c33cb</id>
<content type='text'>
[ Upstream commit 8058d69905058ec8f467a120b5ec5bb831ea67f3 ]

Commit 21653a4181ff ("i2c: core: Call i2c_acpi_install_space_handler()
before i2c_acpi_register_devices()")'s intention was to only move the
acpi_install_address_space_handler() call to the point before where
the ACPI declared i2c-children of the adapter where instantiated by
i2c_acpi_register_devices().

But i2c_acpi_install_space_handler() had a call to
acpi_walk_dep_device_list() hidden (that is I missed it) at the end
of it, so as an unwanted side-effect now acpi_walk_dep_device_list()
was also being called before i2c_acpi_register_devices().

Move the acpi_walk_dep_device_list() call to the end of
i2c_acpi_register_devices(), so that it is once again called *after*
the i2c_client-s hanging of the adapter have been created.

This fixes the Microsoft Surface Go 2 hanging at boot.

Fixes: 21653a4181ff ("i2c: core: Call i2c_acpi_install_space_handler() before i2c_acpi_register_devices()")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=209627
Reported-by: Rainer Finke &lt;rainer@finke.cc&gt;
Reported-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Suggested-by: Maximilian Luz &lt;luzmaximilian@gmail.com&gt;
Tested-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: rcar: Auto select RESET_CONTROLLER</title>
<updated>2020-10-29T08:07:11+00:00</updated>
<author>
<name>Dirk Behme</name>
<email>dirk.behme@de.bosch.com</email>
</author>
<published>2020-08-27T09:23:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=66da98b20b580dda871983d8ef3ca518bddfdaf7'/>
<id>urn:sha1:66da98b20b580dda871983d8ef3ca518bddfdaf7</id>
<content type='text'>
[ Upstream commit 5b9bacf28a973a6b16510493416baeefa2c06289 ]

The i2c-rcar driver utilizes the Generic Reset Controller kernel
feature, so select the RESET_CONTROLLER option when the I2C_RCAR
option is selected with a Gen3 SoC.

Fixes: 2b16fd63059ab9 ("i2c: rcar: handle RXDMA HW behaviour on Gen3")
Signed-off-by: Dirk Behme &lt;dirk.behme@de.bosch.com&gt;
Signed-off-by: Andy Lowe &lt;andy_lowe@mentor.com&gt;
[erosca: Add "if ARCH_RCAR_GEN3" per Wolfram's request]
Signed-off-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: meson: fix clock setting overwrite</title>
<updated>2020-10-14T07:51:12+00:00</updated>
<author>
<name>Jerome Brunet</name>
<email>jbrunet@baylibre.com</email>
</author>
<published>2020-10-07T08:07:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=95ee9fe59ec81b2ff3205d34bf9854bdbe56a743'/>
<id>urn:sha1:95ee9fe59ec81b2ff3205d34bf9854bdbe56a743</id>
<content type='text'>
commit 28683e847e2f20eed22cdd24f185d7783db396d3 upstream.

When the slave address is written in do_start(), SLAVE_ADDR is written
completely. This may overwrite some setting related to the clock rate
or signal filtering.

Fix this by writing only the bits related to slave address. To avoid
causing unexpected changed, explicitly disable filtering or high/low
clock mode which may have been left over by the bootloader.

Fixes: 30021e3707a7 ("i2c: add support for Amlogic Meson I2C controller")
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>i2c: cpm: Fix i2c_ram structure</title>
<updated>2020-10-14T07:51:08+00:00</updated>
<author>
<name>Nicolas VINCENT</name>
<email>nicolas.vincent@vossloh.com</email>
</author>
<published>2020-09-23T14:08:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4445ef3be31af064ed1ef782fa26d0bbf2f4805a'/>
<id>urn:sha1:4445ef3be31af064ed1ef782fa26d0bbf2f4805a</id>
<content type='text'>
[ Upstream commit a2bd970aa62f2f7f80fd0d212b1d4ccea5df4aed ]

the i2c_ram structure is missing the sdmatmp field mentionned in
datasheet for MPC8272 at paragraph 36.5. With this field missing, the
hardware would write past the allocated memory done through
cpm_muram_alloc for the i2c_ram structure and land in memory allocated
for the buffers descriptors corrupting the cbd_bufaddr field. Since this
field is only set during setup(), the first i2c transaction would work
and the following would send data read from an arbitrary memory
location.

Fixes: 61045dbe9d8d ("i2c: Add support for I2C bus on Freescale CPM1/CPM2 controllers")
Signed-off-by: Nicolas VINCENT &lt;nicolas.vincent@vossloh.com&gt;
Acked-by: Jochen Friedrich &lt;jochen@scram.de&gt;
Acked-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
