<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/drivers/i2c, branch linux-6.17.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-6.17.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-6.17.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2025-12-18T13:00:12+00:00</updated>
<entry>
<title>i2c: spacemit: fix detect issue</title>
<updated>2025-12-18T13:00:12+00:00</updated>
<author>
<name>Troy Mitchell</name>
<email>troy.mitchell@linux.spacemit.com</email>
</author>
<published>2025-11-13T13:21:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=fb4c487f9c93371bc27b43ea0972147830e606f3'/>
<id>urn:sha1:fb4c487f9c93371bc27b43ea0972147830e606f3</id>
<content type='text'>
[ Upstream commit 25faa5364638b86ec0d0edb4486daa9d40a0be8f ]

This commit addresses two issues causing i2c detect to fail.

The identified issues are:

1. Incorrect error handling for BED (Bus Error No ACK/NAK):
   Before this commit, Both ALD (Arbitration Loss Detected) and
   BED returned -EAGAIN.
2. Missing interrupt status clear after initialization in xfer():
   On the K1 SoC, simply fixing the first issue changed the error
   from -EAGAIN to -ETIMEOUT. Through tracing, it was determined that
   this is likely due to MSD (Master Stop Detected) latency issues.

   That means the MSD bit in the ISR may still be set on the next transfer.
   As a result, the controller won't work — we can see from the scope that
   it doesn't issue any signal.
   (This only occurs during rapid consecutive I2C transfers.
   That explains why the issue only shows up with i2cdetect.)

With these two fixes, i2c device detection now functions correctly on the K1 SoC.

Fixes: 5ea558473fa31 ("i2c: spacemit: add support for SpacemiT K1 SoC")
Tested-by: Aurelien Jarno &lt;aurelien@aurel32.net&gt;
Signed-off-by: Troy Mitchell &lt;troy.mitchell@linux.spacemit.com&gt;
Reviewed-by: Aurelien Jarno &lt;aurelien@aurel32.net&gt;
Tested-by: Michael Opdenacker &lt;michael.opdenacker@rootcommit.com&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Link: https://lore.kernel.org/r/20251113-fix-k1-detect-failure-v2-1-b02a9a74f65a@linux.spacemit.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: designware: Add disabling clocks when probe fails</title>
<updated>2025-10-15T10:03:38+00:00</updated>
<author>
<name>Kunihiko Hayashi</name>
<email>hayashi.kunihiko@socionext.com</email>
</author>
<published>2025-07-24T04:22:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a9e1f54d718b2eec7878422b011cf1301c4239e0'/>
<id>urn:sha1:a9e1f54d718b2eec7878422b011cf1301c4239e0</id>
<content type='text'>
[ Upstream commit c149841b069ccc6e480b00e11f35a57b5d88c7bb ]

After an error occurs during probing state, dw_i2c_plat_pm_cleanup() is
called. However, this function doesn't disable clocks and the clock-enable
count keeps increasing. Should disable these clocks explicitly.

Fixes: 7272194ed391f ("i2c-designware: add minimal support for runtime PM")
Co-developed-by: Kohei Ito &lt;ito.kohei@socionext.com&gt;
Signed-off-by: Kohei Ito &lt;ito.kohei@socionext.com&gt;
Signed-off-by: Kunihiko Hayashi &lt;hayashi.kunihiko@socionext.com&gt;
Acked-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: designware: Fix clock issue when PM is disabled</title>
<updated>2025-10-15T10:03:38+00:00</updated>
<author>
<name>Kunihiko Hayashi</name>
<email>hayashi.kunihiko@socionext.com</email>
</author>
<published>2025-07-24T04:22:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cc61bbea06618b2fc4317c0ec7ad5475e86c3494'/>
<id>urn:sha1:cc61bbea06618b2fc4317c0ec7ad5475e86c3494</id>
<content type='text'>
[ Upstream commit 70e633bedeeb4a7290d3b1dd9d49cc2bae25a46f ]

When the driver is removed, the clocks are first enabled by
calling pm_runtime_get_sync(), and then disabled with
pm_runtime_put_sync().

If CONFIG_PM=y, clocks for this controller are disabled when it's in
the idle state. So the clocks are properly disabled when the driver
exits.

Othewise, the clocks are always enabled and the PM functions have
no effect. Therefore, the driver exits without disabling the clocks.

    # cat /sys/kernel/debug/clk/clk-pclk/clk_enable_count
    18
    # echo 1214a000.i2c &gt; /sys/bus/platform/drivers/i2c_designware/bind
    # cat /sys/kernel/debug/clk/clk-pclk/clk_enable_count
    20
    # echo 1214a000.i2c &gt; /sys/bus/platform/drivers/i2c_designware/unbind
    # cat /sys/kernel/debug/clk/clk-pclk/clk_enable_count
    20

To ensure that the clocks can be disabled correctly even without
CONFIG_PM=y, should add the following fixes:

- Replace with pm_runtime_put_noidle(), which only decrements the runtime
  PM usage count.
- Call i2c_dw_prepare_clk(false) to explicitly disable the clocks.

Fixes: 7272194ed391f ("i2c-designware: add minimal support for runtime PM")
Co-developed-by: Kohei Ito &lt;ito.kohei@socionext.com&gt;
Signed-off-by: Kohei Ito &lt;ito.kohei@socionext.com&gt;
Signed-off-by: Kunihiko Hayashi &lt;hayashi.kunihiko@socionext.com&gt;
Tested-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Acked-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: spacemit: ensure SDA is released after bus reset</title>
<updated>2025-10-15T10:03:38+00:00</updated>
<author>
<name>Troy Mitchell</name>
<email>troy.mitchell@linux.spacemit.com</email>
</author>
<published>2025-09-25T02:02:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d116241569a7ab8ea3a985c9e07e7090d3a2b5f9'/>
<id>urn:sha1:d116241569a7ab8ea3a985c9e07e7090d3a2b5f9</id>
<content type='text'>
[ Upstream commit 0de61943244dec418d396633a587adca1c350b55 ]

After performing a conditional bus reset, the controller must ensure
that the SDA line is actually released.

Previously, the reset routine only performed a single check,
which could leave the bus in a locked state in some situations.

This patch introduces a loop that toggles the reset cycle and issues
a reset request up to SPACEMIT_BUS_RESET_CLK_CNT_MAX times, checking
SDA after each attempt. If SDA is released before the maximum count,
the function returns early. Otherwise, a warning is emitted.

This change improves bus recovery reliability.

Fixes: 5ea558473fa31 ("i2c: spacemit: add support for SpacemiT K1 SoC")
Signed-off-by: Troy Mitchell &lt;troy.mitchell@linux.spacemit.com&gt;
Reviewed-by: Aurelien Jarno &lt;aurelien@aurel32.net&gt;
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: spacemit: check SDA instead of SCL after bus reset</title>
<updated>2025-10-15T10:03:38+00:00</updated>
<author>
<name>Troy Mitchell</name>
<email>troy.mitchell@linux.spacemit.com</email>
</author>
<published>2025-09-25T02:02:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3109d76b9592c31648573b4cf6f6538a5d152f69'/>
<id>urn:sha1:3109d76b9592c31648573b4cf6f6538a5d152f69</id>
<content type='text'>
[ Upstream commit db7720ef50e0103be70a3887bc66e9c909933ad9 ]

After calling spacemit_i2c_conditionally_reset_bus(),
the controller should ensure that the SDA line is release
before proceeding.

Previously, the driver checked the SCL line instead,
which does not guarantee that the bus is truly idle.

This patch changes the check to verify SDA. This ensures
proper bus recovery and avoids potential communication errors
after a conditional reset.

Fixes: 5ea558473fa31 ("i2c: spacemit: add support for SpacemiT K1 SoC")
Reviewed-by: Aurelien Jarno &lt;aurelien@aurel32.net&gt;
Signed-off-by: Troy Mitchell &lt;troy.mitchell@linux.spacemit.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: spacemit: disable SDA glitch fix to avoid restart delay</title>
<updated>2025-10-15T10:03:38+00:00</updated>
<author>
<name>Troy Mitchell</name>
<email>troy.mitchell@linux.spacemit.com</email>
</author>
<published>2025-09-25T02:02:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ae5035b3752813961461c32a5f6c553b42579a63'/>
<id>urn:sha1:ae5035b3752813961461c32a5f6c553b42579a63</id>
<content type='text'>
[ Upstream commit 11f40684ccd84e792eced110f0a5d3d6adbdf90d ]

The K1 I2C controller has an SDA glitch fix that introduces a small
delay on restart signals. While this feature can suppress glitches
on SDA when SCL = 0, it also delays the restart signal, which may
cause unexpected behavior in some transfers.

The glitch itself does not affect normal I2C operation, because
the I2C specification allows SDA to change while SCL is low.

To ensure correct transmission for every message, we disable the
SDA glitch fix by setting the RCR.SDA_GLITCH_NOFIX bit during
initialization.

This guarantees that restarts are issued promptly without
unintended delays.

Fixes: 5ea558473fa31 ("i2c: spacemit: add support for SpacemiT K1 SoC")
Reviewed-by: Aurelien Jarno &lt;aurelien@aurel32.net&gt;
Signed-off-by: Troy Mitchell &lt;troy.mitchell@linux.spacemit.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: spacemit: remove stop function to avoid bus error</title>
<updated>2025-10-15T10:03:38+00:00</updated>
<author>
<name>Troy Mitchell</name>
<email>troy.mitchell@linux.spacemit.com</email>
</author>
<published>2025-09-25T02:02:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=abc9829e4c89011a0f6a94e6ffbd36daed68a4ab'/>
<id>urn:sha1:abc9829e4c89011a0f6a94e6ffbd36daed68a4ab</id>
<content type='text'>
[ Upstream commit 445522fe7aad6131b2747ae8c76f77266054cd84 ]

Previously, STOP handling was split into two separate steps:
  1) clear TB/STOP/START/ACK bits
  2) issue STOP by calling spacemit_i2c_stop()

This left a small window where the control register was updated
twice, which can confuse the controller. While this race has not
been observed with interrupt-driven transfers, it reliably causes
bus errors in PIO mode.

Inline the STOP sequence into the IRQ handler and ensure that
control register bits are updated atomically in a single writel().

Fixes: 5ea558473fa31 ("i2c: spacemit: add support for SpacemiT K1 SoC")
Signed-off-by: Troy Mitchell &lt;troy.mitchell@linux.spacemit.com&gt;
Reviewed-by: Aurelien Jarno &lt;aurelien@aurel32.net&gt;
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: spacemit: ensure bus release check runs when wait_bus_idle() fails</title>
<updated>2025-10-15T10:03:38+00:00</updated>
<author>
<name>Troy Mitchell</name>
<email>troy.mitchell@linux.spacemit.com</email>
</author>
<published>2025-09-25T02:02:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b39876f0fe8822c5222073a3c245ef32dcf215d3'/>
<id>urn:sha1:b39876f0fe8822c5222073a3c245ef32dcf215d3</id>
<content type='text'>
[ Upstream commit 41d6f90ef5dc2841bdd09817c63a3d6188473b9b ]

spacemit_i2c_wait_bus_idle() only returns 0 on success or a negative
error code on failure.

Since 'ret' can never be positive, the final 'else' branch was
unreachable, and spacemit_i2c_check_bus_release() was never called.

This commit guarantees we attempt to release the bus whenever waiting for
an idle bus fails.

Fixes: 5ea558473fa31 ("i2c: spacemit: add support for SpacemiT K1 SoC")
Reviewed-by: Aurelien Jarno &lt;aurelien@aurel32.net&gt;
Signed-off-by: Troy Mitchell &lt;troy.mitchell@linux.spacemit.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: mediatek: fix potential incorrect use of I2C_MASTER_WRRD</title>
<updated>2025-10-15T10:03:37+00:00</updated>
<author>
<name>Leilk.Liu</name>
<email>leilk.liu@mediatek.com</email>
</author>
<published>2025-09-06T08:24:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=96052a465dd619506da958e2c30173d84a17307c'/>
<id>urn:sha1:96052a465dd619506da958e2c30173d84a17307c</id>
<content type='text'>
[ Upstream commit b492183652808e0f389272bf63dc836241b287ff ]

The old IC does not support the I2C_MASTER_WRRD (write-then-read)
function, but the current code’s handling of i2c-&gt;auto_restart may
potentially lead to entering the I2C_MASTER_WRRD software flow,
resulting in unexpected bugs.

Instead of repurposing the auto_restart flag, add a separate flag
to signal I2C_MASTER_WRRD operations.

Also fix handling of msgs. If the operation (i2c-&gt;op) is
I2C_MASTER_WRRD, then the msgs pointer is incremented by 2.
For all other operations, msgs is simply incremented by 1.

Fixes: b2ed11e224a2 ("I2C: mediatek: Add driver for MediaTek MT8173 I2C controller")
Signed-off-by: Leilk.Liu &lt;leilk.liu@mediatek.com&gt;
Suggested-by: Chen-Yu Tsai &lt;wenst@chromium.org&gt;
Reviewed-by: Chen-Yu Tsai &lt;wenst@chromium.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: rtl9300: Drop unsupported I2C_FUNC_SMBUS_I2C_BLOCK</title>
<updated>2025-09-27T22:23:34+00:00</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2025-09-27T09:52:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=095530512152e6811278de9c30f170f0ac9705eb'/>
<id>urn:sha1:095530512152e6811278de9c30f170f0ac9705eb</id>
<content type='text'>
While applying the patch for commit ede965fd555a ("i2c: rtl9300: remove
broken SMBus Quick operation support"), a conflict was incorrectly solved
by adding the I2C_FUNC_SMBUS_I2C_BLOCK feature flag. But the code to handle
I2C_SMBUS_I2C_BLOCK_DATA requests will be added by a separate commit.

Fixes: ede965fd555a ("i2c: rtl9300: remove broken SMBus Quick operation support")
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
</content>
</entry>
</feed>
