<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/i2c, branch v5.19</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-07-16T12:44:12Z</updated>
<entry>
<title>i2c: cadence: Change large transfer count reset logic to be unconditional</title>
<updated>2022-07-16T12:44:12Z</updated>
<author>
<name>Robert Hancock</name>
<email>robert.hancock@calian.com</email>
</author>
<published>2022-06-14T23:29:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4ca8ca873d454635c20d508261bfc0081af75cf8'/>
<id>urn:sha1:4ca8ca873d454635c20d508261bfc0081af75cf8</id>
<content type='text'>
Problems were observed on the Xilinx ZynqMP platform with large I2C reads.
When a read of 277 bytes was performed, the controller NAKed the transfer
after only 252 bytes were transferred and returned an ENXIO error on the
transfer.

There is some code in cdns_i2c_master_isr to handle this case by resetting
the transfer count in the controller before it reaches 0, to allow larger
transfers to work, but it was conditional on the CDNS_I2C_BROKEN_HOLD_BIT
quirk being set on the controller, and ZynqMP uses the r1p14 version of
the core where this quirk is not being set. The requirement to do this to
support larger reads seems like an inherently required workaround due to
the core only having an 8-bit transfer size register, so it does not
appear that this should be conditional on the broken HOLD bit quirk which
is used elsewhere in the driver.

Remove the dependency on the CDNS_I2C_BROKEN_HOLD_BIT for this transfer
size reset logic to fix this problem.

Fixes: 63cab195bf49 ("i2c: removed work arounds in i2c driver for Zynq Ultrascale+ MPSoC")
Signed-off-by: Robert Hancock &lt;robert.hancock@calian.com&gt;
Reviewed-by: Shubhrajyoti Datta &lt;Shubhrajyoti.datta@amd.com&gt;
Acked-by: Michal Simek &lt;michal.simek@amd.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: imx: fix typo in comment</title>
<updated>2022-07-16T12:18:49Z</updated>
<author>
<name>Flavio Suligoi</name>
<email>f.suligoi@asem.it</email>
</author>
<published>2022-07-15T13:42:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=824a826e2e767ae1051a4c5c8ea44ec7a0c1dd26'/>
<id>urn:sha1:824a826e2e767ae1051a4c5c8ea44ec7a0c1dd26</id>
<content type='text'>
to provid --&gt; to provide

Signed-off-by: Flavio Suligoi &lt;f.suligoi@asem.it&gt;
Acked-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: mlxcpld: Fix register setting for 400KHz frequency</title>
<updated>2022-07-16T12:17:11Z</updated>
<author>
<name>Vadim Pasternak</name>
<email>vadimp@nvidia.com</email>
</author>
<published>2022-07-13T09:14:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e1f77ecc75aaee6bed04e8fd7830e00032af012e'/>
<id>urn:sha1:e1f77ecc75aaee6bed04e8fd7830e00032af012e</id>
<content type='text'>
Fix setting of 'Half Cycle' register for 400KHz frequency.

Fixes: fa1049135c15 ("i2c: mlxcpld: Modify register setting for 400KHz frequency")
Signed-off-by: Vadim Pasternak &lt;vadimp@nvidia.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: cadence: Unregister the clk notifier in error path</title>
<updated>2022-07-07T21:06:34Z</updated>
<author>
<name>Satish Nagireddy</name>
<email>satish.nagireddy@getcruise.com</email>
</author>
<published>2022-06-28T19:12:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3501f0c663063513ad604fb1b3f06af637d3396d'/>
<id>urn:sha1:3501f0c663063513ad604fb1b3f06af637d3396d</id>
<content type='text'>
This patch ensures that the clock notifier is unregistered
when driver probe is returning error.

Fixes: df8eb5691c48 ("i2c: Add driver for Cadence I2C controller")
Signed-off-by: Satish Nagireddy &lt;satish.nagireddy@getcruise.com&gt;
Tested-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Reviewed-by: Michal Simek &lt;michal.simek@amd.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: piix4: Fix a memory leak in the EFCH MMIO support</title>
<updated>2022-06-29T19:35:44Z</updated>
<author>
<name>Jean Delvare</name>
<email>jdelvare@suse.de</email>
</author>
<published>2022-06-22T06:37:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8ad59b397f86a4d8014966fdc0552095a0c4fb2b'/>
<id>urn:sha1:8ad59b397f86a4d8014966fdc0552095a0c4fb2b</id>
<content type='text'>
The recently added support for EFCH MMIO regions introduced a memory
leak in that code path. The leak is caused by the fact that
release_resource() merely removes the resource from the tree but does
not free its memory. We need to call release_mem_region() instead,
which does free the memory. As a nice side effect, this brings back
some symmetry between the legacy and MMIO paths.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Reported-by: Yi Zhang &lt;yi.zhang@redhat.com&gt;
Tested-by: Yi Zhang &lt;yi.zhang@redhat.com&gt;
Reviewed-by: Terry Bowman &lt;terry.bowman@amd.com&gt;
Tested-by: Terry Bowman &lt;Terry.Bowman@amd.com&gt;
Fixes: 7c148722d074 ("i2c: piix4: Add EFCH MMIO support to region request and release")
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: mediatek: Fix an error handling path in mtk_i2c_probe()</title>
<updated>2022-06-14T20:11:54Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2022-05-22T12:22:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=de87b603b0919e31578c8fa312a3541f1fb37e1c'/>
<id>urn:sha1:de87b603b0919e31578c8fa312a3541f1fb37e1c</id>
<content type='text'>
The clsk are prepared, enabled, then disabled. So if an error occurs after
the disable step, they are still prepared.

Add an error handling path to unprepare the clks in such a case, as already
done in the .remove function.

Fixes: 8b4fc246c3ff ("i2c: mediatek: Optimize master_xfer() and avoid circular locking")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: Qii Wang &lt;qii.wang@mediatek.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: designware: Use standard optional ref clock implementation</title>
<updated>2022-06-13T14:50:27Z</updated>
<author>
<name>Serge Semin</name>
<email>Sergey.Semin@baikalelectronics.ru</email>
</author>
<published>2022-06-10T07:42:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=27071b5cbca59d8e8f8750c199a6cbf8c9799963'/>
<id>urn:sha1:27071b5cbca59d8e8f8750c199a6cbf8c9799963</id>
<content type='text'>
Even though the DW I2C controller reference clock source is requested by
the method devm_clk_get() with non-optional clock requirement the way the
clock handler is used afterwards has a pure optional clock semantic
(though in some circumstances we can get a warning about the clock missing
printed in the system console). There is no point in reimplementing that
functionality seeing the kernel clock framework already supports the
optional interface from scratch. Thus let's convert the platform driver to
using it.

Note by providing this commit we get to fix two problems. The first one
was introduced in commit c62ebb3d5f0d ("i2c: designware: Add support for
an interface clock"). It causes not having the interface clock (pclk)
enabled/disabled in case if the reference clock isn't provided. The second
problem was first introduced in commit b33af11de236 ("i2c: designware: Do
not require clock when SSCN and FFCN are provided"). Since that
modification the deferred probe procedure has been unsupported in case if
the interface clock isn't ready.

Fixes: c62ebb3d5f0d ("i2c: designware: Add support for an interface clock")
Fixes: b33af11de236 ("i2c: designware: Do not require clock when SSCN and FFCN are provided")
Signed-off-by: Serge Semin &lt;Sergey.Semin@baikalelectronics.ru&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Acked-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: npcm7xx: Add check for platform_driver_register</title>
<updated>2022-06-08T20:15:37Z</updated>
<author>
<name>Jiasheng Jiang</name>
<email>jiasheng@iscas.ac.cn</email>
</author>
<published>2022-05-26T09:41:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6ba12b56b9b844b83ed54fb7ed59fb0eb41e4045'/>
<id>urn:sha1:6ba12b56b9b844b83ed54fb7ed59fb0eb41e4045</id>
<content type='text'>
As platform_driver_register() could fail, it should be better
to deal with the return value in order to maintain the code
consisitency.

Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver")
Signed-off-by: Jiasheng Jiang &lt;jiasheng@iscas.ac.cn&gt;
Acked-by: Tali Perry &lt;tali.perry1@gmail.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: ismt: prevent memory corruption in ismt_access()</title>
<updated>2022-06-02T15:40:56Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2022-06-02T11:02:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=690b2549b19563ec5ad53e5c82f6a944d910086e'/>
<id>urn:sha1:690b2549b19563ec5ad53e5c82f6a944d910086e</id>
<content type='text'>
The "data-&gt;block[0]" variable comes from the user and is a number
between 0-255.  It needs to be capped to prevent writing beyond the end
of dma_buffer[].

Fixes: 5e9a97b1f449 ("i2c: ismt: Adding support for I2C_SMBUS_BLOCK_PROC_CALL")
Reported-and-tested-by: Zheyu Ma &lt;zheyuma97@gmail.com&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'i2c-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux</title>
<updated>2022-05-31T21:34:00Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-05-31T21:34:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f8a52af9d00d59fd887d8ad1fa0c2c88a5d775b9'/>
<id>urn:sha1:f8a52af9d00d59fd887d8ad1fa0c2c88a5d775b9</id>
<content type='text'>
Pull i2c updates from Wolfram Sang:
 "Only driver updates for 5.19.

  Bigger changes are for Meson, NPCM, and R-Car, but there are also
  changes all over the place"

* tag 'i2c-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (34 commits)
  i2c: meson: fix typo in comment
  i2c: rcar: use flags instead of atomic_xfer
  i2c: rcar: REP_AFTER_RD is not a persistent flag
  i2c: rcar: use BIT macro consistently
  i2c: qcom-geni: remove unnecessary conditions
  i2c: mt7621: Use devm_platform_get_and_ioremap_resource()
  i2c: rcar: refactor handling of first message
  i2c: rcar: avoid race condition with SMIs
  i2c: xiic: Correct the datatype for rx_watermark
  i2c: rcar: fix PM ref counts in probe error paths
  i2c: npcm: Handle spurious interrupts
  i2c: npcm: Correct register access width
  i2c: npcm: Add tx complete counter
  i2c: npcm: Fix timeout calculation
  i2c: npcm: Remove unused variable clk_regmap
  i2c: npcm: Change the way of getting GCR regmap
  i2c: xiic: Fix Tx Interrupt path for grouped messages
  i2c: xiic: Fix coding style issues
  i2c: xiic: return value of xiic_reinit
  i2c: cadence: Increase timeout per message if necessary
  ...
</content>
</entry>
</feed>
