<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/i2c, branch linux-7.1.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-06-09T08:13:09+00:00</updated>
<entry>
<title>i2c: imx-lpi2c: fix resource leaks switching to devm_dma_request_chan()</title>
<updated>2026-06-09T08:13:09+00:00</updated>
<author>
<name>Carlos Song</name>
<email>carlos.song@nxp.com</email>
</author>
<published>2026-05-20T09:33:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=695fcefd4a81466ef9c529790b4e96f1ea2ba051'/>
<id>urn:sha1:695fcefd4a81466ef9c529790b4e96f1ea2ba051</id>
<content type='text'>
The LPI2C driver requests DMA channels using dma_request_chan(), but
never releases them in lpi2c_imx_remove(), resulting in DMA channel
leaks every time the driver is unloaded.

Additionally, when lpi2c_dma_init() successfully requests the TX DMA
channel but fails to request the RX DMA channel, the probe falls back
to PIO mode and completes successfully. Since probe succeeds, the devres
framework will not trigger any cleanup, leaving the TX DMA channel and
the memory allocated for the dma structure held for the lifetime of the
device even though DMA is never used.

Switch to devm_dma_request_chan() to let the device core manage DMA
channel lifetime automatically. Wrap all allocations within a devres
group so that devres_release_group() can release all partially acquired
resources when DMA init fails and probe continues in PIO mode.

Fixes: a09c8b3f9047 ("i2c: imx-lpi2c: add eDMA mode support for LPI2C")
Signed-off-by: Carlos Song &lt;carlos.song@nxp.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v6.14+
Reviewed-by: Frank Li &lt;Frank.Li@nxp.com&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Link: https://lore.kernel.org/r/20260520093323.2882070-1-carlos.song@oss.nxp.com
</content>
</entry>
<entry>
<title>i2c: tegra: Fix NOIRQ suspend/resume</title>
<updated>2026-06-08T19:21:42+00:00</updated>
<author>
<name>Akhil R</name>
<email>akhilrajeev@nvidia.com</email>
</author>
<published>2026-05-18T11:40:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=656646b3847ac6a21b074a813223feef2aadd6e2'/>
<id>urn:sha1:656646b3847ac6a21b074a813223feef2aadd6e2</id>
<content type='text'>
The Tegra I2C driver relies on runtime PM to wake up the controller before
each transfer. However, runtime PM is disabled between the system suspend
and NOIRQ suspend. If an I2C device initiates a transfer during this
window, the I2C controller fails to wake up and the transfer fails. To
handle this, the controller must be kept available for this period to
allow transfers.

Rework the I2C controller's system PM callbacks such that the controller
is resumed from runtime suspend during system suspend and it stays
RPM_ACTIVE throughout the suspend-resume cycle until it is runtime
suspended back in the system resume. The clocks are disabled in NOIRQ
suspend and enabled back in NOIRQ resume by calling the controller's
runtime PM functions directly.

Fixes: 8ebf15e9c869 ("i2c: tegra: Move suspend handling to NOIRQ phase")
Assisted-by: Cursor:claude-4.6-opus
Signed-off-by: Akhil R &lt;akhilrajeev@nvidia.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v5.4+
Reviewed-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Link: https://lore.kernel.org/r/20260518114013.62065-5-akhilrajeev@nvidia.com
</content>
</entry>
<entry>
<title>i2c: tegra: Update Tegra410 I2C timing parameters</title>
<updated>2026-06-08T19:21:35+00:00</updated>
<author>
<name>Akhil R</name>
<email>akhilrajeev@nvidia.com</email>
</author>
<published>2026-05-18T11:40:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=97d0a9c6e80903d342656ab8a7743a9ec50c92e1'/>
<id>urn:sha1:97d0a9c6e80903d342656ab8a7743a9ec50c92e1</id>
<content type='text'>
Update Tegra410 I2C timing parameters based on hardware characterization
results. This adjusts the fast mode and HS mode settings to be compliant
with the I2C specification.

Fixes: 59717f260183 ("i2c: tegra: Add support for Tegra410")
Signed-off-by: Akhil R &lt;akhilrajeev@nvidia.com&gt;
Reviewed-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Link: https://lore.kernel.org/r/20260518114013.62065-4-akhilrajeev@nvidia.com
</content>
</entry>
<entry>
<title>i2c: qcom-cci: Fix NULL pointer dereference in cci_remove()</title>
<updated>2026-06-08T18:31:46+00:00</updated>
<author>
<name>Vladimir Zapolskiy</name>
<email>vladimir.zapolskiy@linaro.org</email>
</author>
<published>2026-05-15T23:41:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=729ac5a4b966aac42e08a94dea966f4429008548'/>
<id>urn:sha1:729ac5a4b966aac42e08a94dea966f4429008548</id>
<content type='text'>
On all modern platforms Qualcomm CCI controller provides two I2C masters,
and on particular boards only one I2C master may be initialized, and in
such cases the device unbinding or driver removal causes a NULL pointer
dereference, because cci_halt() is called for all two I2C masters, but
a completion is initialized only for the single enabled master:

    % rmmod i2c-qcom-cci
    Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
    &lt;snip&gt;
    Call trace:
    __wait_for_common+0x194/0x1a8 (P)
    wait_for_completion_timeout+0x20/0x2c
    cci_remove+0xc4/0x138 [i2c_qcom_cci]
    platform_remove+0x20/0x30
    device_remove+0x4c/0x80
    device_release_driver_internal+0x1c8/0x224
    driver_detach+0x50/0x98
    bus_remove_driver+0x6c/0xbc
    driver_unregister+0x30/0x60
    platform_driver_unregister+0x14/0x20
    qcom_cci_driver_exit+0x18/0x1008 [i2c_qcom_cci]
    ....

Fixes: e517526195de ("i2c: Add Qualcomm CCI I2C driver")
Signed-off-by: Vladimir Zapolskiy &lt;vladimir.zapolskiy@linaro.org&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v5.8+
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@oss.qualcomm.com&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Link: https://lore.kernel.org/r/20260515234121.1607425-2-vladimir.zapolskiy@linaro.org
</content>
</entry>
<entry>
<title>i2c: stm32f7: fix timing computation ignoring i2c-analog-filter</title>
<updated>2026-06-08T17:56:04+00:00</updated>
<author>
<name>Guillermo Rodríguez</name>
<email>guille.rodriguez@gmail.com</email>
</author>
<published>2026-05-26T09:12:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a124579c0763da7bc408f4cd7e8f606cadc94855'/>
<id>urn:sha1:a124579c0763da7bc408f4cd7e8f606cadc94855</id>
<content type='text'>
stm32f7_i2c_compute_timing() uses i2c_dev-&gt;analog_filter to pick
the analog filter delay, but i2c_dev-&gt;analog_filter is parsed from
the "i2c-analog-filter" DT property only after the compute_timing
loop in stm32f7_i2c_setup_timing(), so in practice the timing
calculations always ignore the analog filter. On an STM32MP1 board
with clock-frequency = &lt;400000&gt; and i2c-analog-filter set, measured
SCL frequency was ~382 kHz.

This also affects (widens) the computed SDADEL range. At high bus
clock speeds, this can select an SDADEL value that violates tVD;DAT
(data valid time).

Fix by parsing "i2c-analog-filter" before the compute_timing loop.

Fixes: 83c3408f7b9c ("i2c: stm32f7: support DT binding i2c-analog-filter")
Signed-off-by: Guillermo Rodríguez &lt;guille.rodriguez@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v5.13+
Acked-by: Alain Volmat &lt;alain.volmat@foss.st.com&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Link: https://lore.kernel.org/r/20260526091210.20383-1-guille.rodriguez@gmail.com
</content>
</entry>
<entry>
<title>i2c: imx: fix clock and pinctrl state inconsistency in runtime PM</title>
<updated>2026-06-08T17:43:05+00:00</updated>
<author>
<name>Carlos Song</name>
<email>carlos.song@nxp.com</email>
</author>
<published>2026-05-21T06:50:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8783fb8031799f1230997c16df8c8dce9fcd1841'/>
<id>urn:sha1:8783fb8031799f1230997c16df8c8dce9fcd1841</id>
<content type='text'>
In i2c_imx_runtime_suspend(), the clock is disabled before switching
the pinctrl state to sleep. If pinctrl_pm_select_sleep_state() fails,
the runtime suspend is aborted but the clock remains disabled, causing
a system crash when the hardware is subsequently accessed.

Fix this by switching the pinctrl state before disabling the clock so
that a pinctrl failure leaves the clock enabled and the hardware
accessible.

In i2c_imx_runtime_resume(), restore the pinctrl state back to sleep
if clk_enable() fails to keep the consistent.

Fixes: 576eba03c994 ("i2c: imx: switch different pinctrl state in different system power status")
Signed-off-by: Carlos Song &lt;carlos.song@nxp.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v6.14+
Reviewed-by: Frank Li &lt;Frank.Li@nxp.com&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Link: https://lore.kernel.org/r/20260521065038.2954998-1-carlos.song@oss.nxp.com
</content>
</entry>
<entry>
<title>i2c: riic: fix refcount leak in riic_i2c_resume_noirq()</title>
<updated>2026-06-08T15:35:03+00:00</updated>
<author>
<name>Wentao Liang</name>
<email>vulab@iscas.ac.cn</email>
</author>
<published>2026-06-08T07:11:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9c37eac31c559b079d55890d1dbe70072fec0435'/>
<id>urn:sha1:9c37eac31c559b079d55890d1dbe70072fec0435</id>
<content type='text'>
When riic_i2c_resume_noirq() is called, it deasserts the reset
using reset_control_deassert(), which for shared resets increments
a reference count. If pm_runtime_force_resume() then fails, the
function returns without calling reset_control_assert() to
decrement the count. This leaves the reset deasserted and the
reference count unbalanced, which can prevent other users of the
shared reset from properly asserting it later.

Fix the leak by calling reset_control_assert() on the error
handling path for a failed pm_runtime_force_resume().

Fixes: e383f0961422 ("i2c: riic: Move suspend handling to NOIRQ phase")
Signed-off-by: Wentao Liang &lt;vulab@iscas.ac.cn&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v6.19+
Reviewed-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Link: https://lore.kernel.org/r/20260608071123.128964-1-vulab@iscas.ac.cn
</content>
</entry>
<entry>
<title>i2c: virtio: mark device ready before registering the adapter</title>
<updated>2026-05-30T13:56:07+00:00</updated>
<author>
<name>Alexis Bouzigues</name>
<email>BouziguesAlexis@JohnDeere.com</email>
</author>
<published>2026-05-29T14:28:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1d774589f924056b8403e271fdecaf9a803a50fc'/>
<id>urn:sha1:1d774589f924056b8403e271fdecaf9a803a50fc</id>
<content type='text'>
virtio_i2c_probe() synchronously probes child i2c drivers on the bus,
but peripherals may use the bus at probe for tasks like reading a chip
id. The vhost-user-i2c backend stalls at such probes unless DRIVER_OK
is already set before the virtqueue is first kicked.

Set DRIVER_OK explicitly before i2c_add_adapter(), as done for the
same reason in commit f5866db64f34 ("virtio_console: enable VQs
early") and commit 71e4b8bf0482 ("virtio_rpmsg: set DRIVER_OK before
using device").

Signed-off-by: Alexis Bouzigues &lt;BouziguesAlexis@JohnDeere.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
</content>
</entry>
<entry>
<title>i2c: davinci: fix division by zero on missing clock-frequency</title>
<updated>2026-05-26T23:07:05+00:00</updated>
<author>
<name>Chaitanya Sabnis</name>
<email>chaitanya.msabnis@gmail.com</email>
</author>
<published>2026-05-26T10:22:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=030675aa54cf757769b3db65642433d626b3ed7c'/>
<id>urn:sha1:030675aa54cf757769b3db65642433d626b3ed7c</id>
<content type='text'>
When the 'clock-frequency' property is missing from the device tree,
the driver falls back to DAVINCI_I2C_DEFAULT_BUS_FREQ. However, this
macro was defined in kHz (100), whereas the device tree property is
expected in Hz.

The probe function divided the fallback value by 1000, causing
integer truncation that resulted in dev-&gt;bus_freq = 0. This triggered
a deterministic division-by-zero kernel panic when calculating clock
dividers later in the probe sequence.

Fix this by redefining DAVINCI_I2C_DEFAULT_BUS_FREQ in Hz (100000)
to match the expected device tree property unit, allowing the existing
division logic to work correctly for both cases.

Fixes: b04ce6385979 ("i2c: davinci: kill platform data")
Reported-by: Sashiko &lt;sashiko-bot@kernel.org&gt;
Closes: https://lore.kernel.org/all/20260514044726.57297C2BCB7@smtp.kernel.org/
Signed-off-by: Chaitanya Sabnis &lt;chaitanya.msabnis@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v6.14+
Reviewed-by: Bartosz Golaszewski &lt;bartosz.golaszewski@oss.qualcomm.com&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Link: https://lore.kernel.org/r/20260526102240.4949-1-chaitanya.msabnis@gmail.com
</content>
</entry>
<entry>
<title>i2c: smbus: fix a potential uninitialization bug</title>
<updated>2026-05-19T10:43:08+00:00</updated>
<author>
<name>Wenwen Wang</name>
<email>wang6495@umn.edu</email>
</author>
<published>2018-05-05T12:57:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=023453cb7eb0f53c5dc36babed8e706c1b0b0187'/>
<id>urn:sha1:023453cb7eb0f53c5dc36babed8e706c1b0b0187</id>
<content type='text'>
In i2c_smbus_xfer_emulated(), there are two buffers: msgbuf0 and
msgbuf1, which are used to save a series of messages, as mentioned in
the comment. According to the value of the variable 'size', msgbuf0 is
initialized to various values. In contrast, msgbuf1 is left
uninitialized until the function i2c_transfer() is invoked. However,
msgbuf1 is not always initialized on all possible execution paths
(implementation) of i2c_transfer(). Thus, it is possible that msgbuf1
may still be uninitialized even after the invocation of the function
i2c_transfer(), especially when the return value of i2c_transfer() is
not checked properly. In the following execution, the uninitialized
msgbuf1 will be used, such as for security checks. Since uninitialized
values can be random and arbitrary, this will cause undefined behaviors
or even check bypass. For example, it is expected that if the value of
'size' is I2C_SMBUS_BLOCK_PROC_CALL, the value of data-&gt;block[0] should
not be larger than I2C_SMBUS_BLOCK_MAX. This patch initializes the first
byte of msgbuf1 with 0 to avoid such undefined behaviors or security
issues.

Signed-off-by: Wenwen Wang &lt;wang6495@umn.edu&gt;
[wsa: reworded commit message a little]
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
</content>
</entry>
</feed>
