<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/i2c, branch v5.9.12</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.9.12</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.9.12'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-11-18T18:22:15+00:00</updated>
<entry>
<title>i2c: designware: slave should do WRITE_REQUESTED before WRITE_RECEIVED</title>
<updated>2020-11-18T18:22:15+00:00</updated>
<author>
<name>Michael Wu</name>
<email>michael.wu@vatics.com</email>
</author>
<published>2020-10-30T08:04:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=56cbb085945380057a519adc1e00eb44428a129f'/>
<id>urn:sha1:56cbb085945380057a519adc1e00eb44428a129f</id>
<content type='text'>
[ Upstream commit 3b5f7f10ff6e6b66f553e12cc50d9bb751ce60ad ]

Sometimes we would get the following flow when doing an i2cset:

0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x514 : INTR_STAT=0x4
I2C_SLAVE_WRITE_RECEIVED
0x1 STATUS SLAVE_ACTIVITY=0x0 : RAW_INTR_STAT=0x714 : INTR_STAT=0x204
I2C_SLAVE_WRITE_REQUESTED
I2C_SLAVE_WRITE_RECEIVED

Documentation/i2c/slave-interface.rst says that I2C_SLAVE_WRITE_REQUESTED,
which is mandatory, should be sent while the data did not arrive yet. It
means in a write-request I2C_SLAVE_WRITE_REQUESTED should be reported
before any I2C_SLAVE_WRITE_RECEIVED.

By the way, I2C_SLAVE_STOP didn't be reported in the above case because
DW_IC_INTR_STAT was not 0x200.

dev-&gt;status can be used to record the current state, especially Designware
I2C controller has no interrupts to identify a write-request. This patch
makes not only I2C_SLAVE_WRITE_REQUESTED been reported first when
IC_INTR_RX_FULL is rising and dev-&gt;status isn't STATUS_WRITE_IN_PROGRESS
but also I2C_SLAVE_STOP been reported when a STOP condition is received.

Signed-off-by: Michael Wu &lt;michael.wu@vatics.com&gt;
Acked-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.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: designware: call i2c_dw_read_clear_intrbits_slave() once</title>
<updated>2020-11-18T18:22:15+00:00</updated>
<author>
<name>Michael Wu</name>
<email>michael.wu@vatics.com</email>
</author>
<published>2020-10-30T08:04:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0df649e55193ceb9601d0d903ef498f61e649047'/>
<id>urn:sha1:0df649e55193ceb9601d0d903ef498f61e649047</id>
<content type='text'>
[ Upstream commit 66b92313e2ca9208b5f3ebf5d86e9a818299d8fa ]

If some bits were cleared by i2c_dw_read_clear_intrbits_slave() in
i2c_dw_isr_slave() and not handled immediately, those cleared bits would
not be shown again by later i2c_dw_read_clear_intrbits_slave(). They
therefore were forgotten to be handled.

i2c_dw_read_clear_intrbits_slave() should be called once in an ISR and take
its returned state for all later handlings.

Signed-off-by: Michael Wu &lt;michael.wu@vatics.com&gt;
Acked-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.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: sh_mobile: implement atomic transfers</title>
<updated>2020-11-18T18:22:14+00:00</updated>
<author>
<name>Ulrich Hecht</name>
<email>uli+renesas@fpond.eu</email>
</author>
<published>2020-09-28T15:59:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=168b746c3de0b6e54cf58ca39e3afb9bda6d82ce'/>
<id>urn:sha1:168b746c3de0b6e54cf58ca39e3afb9bda6d82ce</id>
<content type='text'>
[ Upstream commit a49cc1fe9d64a2dc4e19b599204f403e5d25f44b ]

Implements atomic transfers to fix reboot/shutdown on r8a7790 Lager and
similar boards.

Signed-off-by: Ulrich Hecht &lt;uli+renesas@fpond.eu&gt;
Tested-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Tested-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
[wsa: some whitespace fixing]
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: mediatek: move dma reset before i2c reset</title>
<updated>2020-11-18T18:22:14+00:00</updated>
<author>
<name>Qii Wang</name>
<email>qii.wang@mediatek.com</email>
</author>
<published>2020-10-30T11:58:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6a1d0696c878990360239ff5b466260046b838b6'/>
<id>urn:sha1:6a1d0696c878990360239ff5b466260046b838b6</id>
<content type='text'>
[ Upstream commit aafced673c06b7c77040c1df42e2e965be5d0376 ]

The i2c driver default do dma reset after i2c reset, but sometimes
i2c reset will trigger dma tx2rx, then apdma write data to dram
which has been i2c_put_dma_safe_msg_buf(kfree). Move dma reset
before i2c reset in mtk_i2c_init_hw to fix it.

Signed-off-by: Qii Wang &lt;qii.wang@mediatek.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: imx: Fix external abort on interrupt in exit paths</title>
<updated>2020-11-05T10:51:48+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=ff2d398534a8dfd14b15e1e029be9d2b0d2c381f'/>
<id>urn:sha1:ff2d398534a8dfd14b15e1e029be9d2b0d2c381f</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: 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-29T09:12:07+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=c60acf07aae2492b7011626e1fd2710f117dff11'/>
<id>urn:sha1:c60acf07aae2492b7011626e1fd2710f117dff11</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-29T09:11:52+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=a09dc892cf65ae8da44d6d9a72749fc5c6e19757'/>
<id>urn:sha1:a09dc892cf65ae8da44d6d9a72749fc5c6e19757</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: owl: Clear NACK and BUS error bits</title>
<updated>2020-10-10T11:15:46+00:00</updated>
<author>
<name>Cristian Ciocaltea</name>
<email>cristian.ciocaltea@gmail.com</email>
</author>
<published>2020-10-08T21:44:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f5b3f433641c543ebe5171285a42aa6adcdb2d22'/>
<id>urn:sha1:f5b3f433641c543ebe5171285a42aa6adcdb2d22</id>
<content type='text'>
When the NACK and BUS error bits are set by the hardware, the driver is
responsible for clearing them by writing "1" into the corresponding
status registers.

Hence perform the necessary operations in owl_i2c_interrupt().

Fixes: d211e62af466 ("i2c: Add Actions Semiconductor Owl family S900 I2C driver")
Reported-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Signed-off-by: Cristian Ciocaltea &lt;cristian.ciocaltea@gmail.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>Revert "i2c: imx: Fix reset of I2SR_IAL flag"</title>
<updated>2020-10-10T11:03:54+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa@kernel.org</email>
</author>
<published>2020-10-10T11:03:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5a02e7c429cb5e082e5d7be6e5b768828014ba70'/>
<id>urn:sha1:5a02e7c429cb5e082e5d7be6e5b768828014ba70</id>
<content type='text'>
This reverts commit fa4d30556883f2eaab425b88ba9904865a4d00f3. An updated
version was sent. So, revert this version and give the new version more
time for testing.

Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: meson: fixup rate calculation with filter delay</title>
<updated>2020-10-08T09:57:23+00:00</updated>
<author>
<name>Nicolas Belin</name>
<email>nbelin@baylibre.com</email>
</author>
<published>2020-10-07T08:07:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1334d3b4e49e35d8912a7c37ffca4c5afb9a0516'/>
<id>urn:sha1:1334d3b4e49e35d8912a7c37ffca4c5afb9a0516</id>
<content type='text'>
Apparently, 15 cycles of the peripheral clock are used by the controller
for sampling and filtering. Because this was not known before, the rate
calculation is slightly off.

Clean up and fix the calculation taking this filtering delay into account.

Fixes: 30021e3707a7 ("i2c: add support for Amlogic Meson I2C controller")
Signed-off-by: Nicolas Belin &lt;nbelin@baylibre.com&gt;
Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
</feed>
