<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/drivers/i2c, branch linux-6.4.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.4.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-6.4.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2023-09-13T07:47:55+00:00</updated>
<entry>
<title>i2c: imx-lpi2c: return -EINVAL when i2c peripheral clk doesn't work</title>
<updated>2023-09-13T07:47:55+00:00</updated>
<author>
<name>Carlos Song</name>
<email>carlos.song@nxp.com</email>
</author>
<published>2023-07-26T09:22:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d1e1bdd30ae089b9b79cc3ec6daf4ff8827b6777'/>
<id>urn:sha1:d1e1bdd30ae089b9b79cc3ec6daf4ff8827b6777</id>
<content type='text'>
[ Upstream commit b610c4bbd153c2cde548db48559e170905d7c369 ]

On MX8X platforms, the default clock rate is 0 if without explicit
clock setting in dts nodes. I2c can't work when i2c peripheral clk
rate is 0.

Add a i2c peripheral clk rate check before configuring the clock
register. When i2c peripheral clk rate is 0 and directly return
-EINVAL.

Signed-off-by: Carlos Song &lt;carlos.song@nxp.com&gt;
Acked-by: Dong Aisheng &lt;Aisheng.dong@nxp.com&gt;
Reviewed-by: Andi Shyti &lt;andi.shyti@kernel.org&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: Handle invalid SMBus block data response length value</title>
<updated>2023-08-23T15:32:39+00:00</updated>
<author>
<name>Tam Nguyen</name>
<email>tamnguyenchi@os.amperecomputing.com</email>
</author>
<published>2023-07-26T08:00:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=385f438b580779067ab1169d7516425b8c6aeffe'/>
<id>urn:sha1:385f438b580779067ab1169d7516425b8c6aeffe</id>
<content type='text'>
commit 69f035c480d76f12bf061148ccfd578e1099e5fc upstream.

In the I2C_FUNC_SMBUS_BLOCK_DATA case, the invalid length byte value
(outside of 1-32) of the SMBus block data response from the Slave device
is not correctly handled by the I2C Designware driver.

In case IC_EMPTYFIFO_HOLD_MASTER_EN==1, which cannot be detected
from the registers, the Master can be disabled only if the STOP bit
is set. Without STOP bit set, the Master remains active, holding the bus
until receiving a block data response length. This hangs the bus and
is unrecoverable.

Avoid this by issuing another dump read to reach the stop condition when
an invalid length byte is received.

Cc: stable@vger.kernel.org
Signed-off-by: Tam Nguyen &lt;tamnguyenchi@os.amperecomputing.com&gt;
Acked-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230726080001.337353-3-tamnguyenchi@os.amperecomputing.com
Reviewed-by: Andi Shyti &lt;andi.shyti@kernel.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: designware: Correct length byte validation logic</title>
<updated>2023-08-23T15:32:39+00:00</updated>
<author>
<name>Quan Nguyen</name>
<email>quan@os.amperecomputing.com</email>
</author>
<published>2023-07-26T08:00:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b2ef640ff40de47e42c69c1c6a4592d0205034f2'/>
<id>urn:sha1:b2ef640ff40de47e42c69c1c6a4592d0205034f2</id>
<content type='text'>
commit 49d4db3953cb9004ff94efc0c176e026c820af5a upstream.

Commit 0daede80f870 ("i2c: designware: Convert driver to using regmap API")
changes the logic to validate the whole 32-bit return value of
DW_IC_DATA_CMD register instead of 8-bit LSB without reason.

Later, commit f53f15ba5a85 ("i2c: designware: Get right data length"),
introduced partial fix but not enough because the "tmp &gt; 0" still test
tmp as 32-bit value and is wrong in case the IC_DATA_CMD[11] is set.

Revert the logic to just before commit 0daede80f870
("i2c: designware: Convert driver to using regmap API").

Fixes: f53f15ba5a85 ("i2c: designware: Get right data length")
Fixes: 0daede80f870 ("i2c: designware: Convert driver to using regmap API")
Cc: stable@vger.kernel.org
Signed-off-by: Tam Nguyen &lt;tamnguyenchi@os.amperecomputing.com&gt;
Signed-off-by: Quan Nguyen &lt;quan@os.amperecomputing.com&gt;
Acked-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230726080001.337353-2-tamnguyenchi@os.amperecomputing.com
Reviewed-by: Andi Shyti &lt;andi.shyti@kernel.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: tegra: Fix i2c-tegra DMA config option processing</title>
<updated>2023-08-23T15:32:36+00:00</updated>
<author>
<name>Parker Newman</name>
<email>pnewman@connecttech.com</email>
</author>
<published>2023-08-08T14:01: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=3c38774dbaaa7a71209cd19f839160d09b17fe48'/>
<id>urn:sha1:3c38774dbaaa7a71209cd19f839160d09b17fe48</id>
<content type='text'>
commit 27ec43c77b5db780a56fc3a6d6de6bf2f74614f7 upstream.

Tegra processors prior to Tegra186 used APB DMA for I2C requiring
CONFIG_TEGRA20_APB_DMA=y while Tegra186 and later use GPC DMA requiring
CONFIG_TEGRA186_GPC_DMA=y.

The check for if the processor uses APB DMA is inverted and so the wrong
DMA config options are checked.

This means if CONFIG_TEGRA20_APB_DMA=y but CONFIG_TEGRA186_GPC_DMA=n
with a Tegra186 or later processor the driver will incorrectly think DMA is
enabled and attempt to request DMA channels that will never be availible,
leaving the driver in a perpetual EPROBE_DEFER state.

Fixes: 48cb6356fae1 ("i2c: tegra: Add GPCDMA support")
Signed-off-by: Parker Newman &lt;pnewman@connecttech.com&gt;
Acked-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Acked-by: Akhil R &lt;akhilrajeev@nvidia.com&gt;
Link: https://lore.kernel.org/r/fcfcf9b3-c8c4-9b34-2ff8-cd60a3d490bd@connecttech.com
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: hisi: Only handle the interrupt of the driver's transfer</title>
<updated>2023-08-23T15:32:36+00:00</updated>
<author>
<name>Yicong Yang</name>
<email>yangyicong@hisilicon.com</email>
</author>
<published>2023-08-01T12:46: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=4c07b591014e9cf572e52a3130c8d9b613f0e5fa'/>
<id>urn:sha1:4c07b591014e9cf572e52a3130c8d9b613f0e5fa</id>
<content type='text'>
commit fff67c1b17ee093947bdcbac6f64d072e644159a upstream.

The controller may be shared with other port, for example the firmware.
Handle the interrupt from other sources will cause crash since some
data are not initialized. So only handle the interrupt of the driver's
transfer and discard others.

Fixes: d62fbdb99a85 ("i2c: add support for HiSilicon I2C controller")
Signed-off-by: Yicong Yang &lt;yangyicong@hisilicon.com&gt;
Reviewed-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Link: https://lore.kernel.org/r/20230801124625.63587-1-yangyicong@huawei.com
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: bcm-iproc: Fix bcm_iproc_i2c_isr deadlock issue</title>
<updated>2023-08-23T15:32:36+00:00</updated>
<author>
<name>Chengfeng Ye</name>
<email>dg573847474@gmail.com</email>
</author>
<published>2023-07-07T08:49:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=64d83e2c2fcba225020706ce7cc22f9eebbe1d99'/>
<id>urn:sha1:64d83e2c2fcba225020706ce7cc22f9eebbe1d99</id>
<content type='text'>
commit 4caf4cb1eaed469742ef719f2cc024b1ec3fa9e6 upstream.

iproc_i2c_rd_reg() and iproc_i2c_wr_reg() are called from both
interrupt context (e.g. bcm_iproc_i2c_isr) and process context
(e.g. bcm_iproc_i2c_suspend). Therefore, interrupts should be
disabled to avoid potential deadlock. To prevent this scenario,
use spin_lock_irqsave().

Fixes: 9a1038728037 ("i2c: iproc: add NIC I2C support")
Signed-off-by: Chengfeng Ye &lt;dg573847474@gmail.com&gt;
Acked-by: Ray Jui &lt;ray.jui@broadcom.com&gt;
Reviewed-by: Andi Shyti &lt;andi.shyti@kernel.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: nomadik: Remove a useless call in the remove function</title>
<updated>2023-08-03T08:25:44+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2023-07-04T19:50: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=fb0c501d7293fcc63b010dfadc5ea64f11a95975'/>
<id>urn:sha1:fb0c501d7293fcc63b010dfadc5ea64f11a95975</id>
<content type='text'>
[ Upstream commit 05f933d5f7318b03ff2028c1704dc867ac16f2c7 ]

Since commit 235602146ec9 ("i2c-nomadik: turn the platform driver to an amba
driver"), there is no more request_mem_region() call in this driver.

So remove the release_mem_region() call from the remove function which is
likely a left over.

Fixes: 235602146ec9 ("i2c-nomadik: turn the platform driver to an amba driver")
Cc: &lt;stable@vger.kernel.org&gt; # v3.6+
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&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: nomadik: Use devm_clk_get_enabled()</title>
<updated>2023-08-03T08:25:43+00:00</updated>
<author>
<name>Andi Shyti</name>
<email>andi.shyti@kernel.org</email>
</author>
<published>2023-06-11T01:37:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=fc491dad925fca04f851f6ff8d1abd5bb023e207'/>
<id>urn:sha1:fc491dad925fca04f851f6ff8d1abd5bb023e207</id>
<content type='text'>
[ Upstream commit 9c7174db4cdd111e10d19eed5c36fd978a14c8a2 ]

Replace the pair of functions, devm_clk_get() and
clk_prepare_enable(), with a single function
devm_clk_get_enabled().

Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
Stable-dep-of: 05f933d5f731 ("i2c: nomadik: Remove a useless call in the remove function")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: nomadik: Remove unnecessary goto label</title>
<updated>2023-08-03T08:25:43+00:00</updated>
<author>
<name>Andi Shyti</name>
<email>andi.shyti@kernel.org</email>
</author>
<published>2023-06-11T01:36:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b6014022b64a1987a5bf48f6e26443338769a395'/>
<id>urn:sha1:b6014022b64a1987a5bf48f6e26443338769a395</id>
<content type='text'>
[ Upstream commit 1c5d33fff0d375e4ab7c4261dc62a286babbb4c6 ]

The err_no_mem goto label doesn't do anything. Remove it.

Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
Stable-dep-of: 05f933d5f731 ("i2c: nomadik: Remove a useless call in the remove function")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: Improve size determinations</title>
<updated>2023-08-03T08:25:43+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2018-02-02T13:50:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=00f38672ef5a1dcc871992a6b13d5c4a095bc53a'/>
<id>urn:sha1:00f38672ef5a1dcc871992a6b13d5c4a095bc53a</id>
<content type='text'>
[ Upstream commit 06e989578232da33a7fe96b04191b862af8b2cec ]

Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding
size determination a bit safer according to the Linux coding style
convention.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
Stable-dep-of: 05f933d5f731 ("i2c: nomadik: Remove a useless call in the remove function")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
