<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/i2c, branch v6.8</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=v6.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2024-03-08T09:10:27Z</updated>
<entry>
<title>i2c: aspeed: Fix the dummy irq expected print</title>
<updated>2024-03-08T09:10:27Z</updated>
<author>
<name>Tommy Huang</name>
<email>tommy_huang@aspeedtech.com</email>
</author>
<published>2024-03-05T01:19:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ac168d6770aa12ee201c7474e1361810d5fc723a'/>
<id>urn:sha1:ac168d6770aa12ee201c7474e1361810d5fc723a</id>
<content type='text'>
When the i2c error condition occurred and master state was not
idle, the master irq function will goto complete state without any
other interrupt handling. It would cause dummy irq expected print.
Under this condition, assign the irq_status into irq_handle.

For example, when the abnormal start / stop occurred (bit 5) with
normal stop status (bit 4) at same time. Then the normal stop status
would not be handled and it would cause irq expected print in
the aspeed_i2c_bus_irq.

...
aspeed-i2c-bus x. i2c-bus: irq handled != irq.
Expected 0x00000030, but was 0x00000020
...

Fixes: 3e9efc3299dd ("i2c: aspeed: Handle master/slave combined irq events properly")
Cc: Jae Hyun Yoo &lt;jae.hyun.yoo@linux.intel.com&gt;
Signed-off-by: Tommy Huang &lt;tommy_huang@aspeedtech.com&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: wmt: Fix an error handling path in wmt_i2c_probe()</title>
<updated>2024-03-08T09:10:26Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2024-01-05T14:39:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=97fd62e3269d2d47cefd421ffe144f9eafab8315'/>
<id>urn:sha1:97fd62e3269d2d47cefd421ffe144f9eafab8315</id>
<content type='text'>
wmt_i2c_reset_hardware() calls clk_prepare_enable(). So, should an error
occur after it, it should be undone by a corresponding
clk_disable_unprepare() call, as already done in the remove function.

Fixes: 560746eb79d3 ("i2c: vt8500: Add support for I2C bus on Wondermedia SoCs")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: i801: Avoid potential double call to gpiod_remove_lookup_table</title>
<updated>2024-03-08T09:10:26Z</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2024-03-04T20:31:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ceb013b2d9a2946035de5e1827624edc85ae9484'/>
<id>urn:sha1:ceb013b2d9a2946035de5e1827624edc85ae9484</id>
<content type='text'>
If registering the platform device fails, the lookup table is
removed in the error path. On module removal we would try to
remove the lookup table again. Fix this by setting priv-&gt;lookup
only if registering the platform device was successful.
In addition free the memory allocated for the lookup table in
the error path.

Fixes: d308dfbf62ef ("i2c: mux/i801: Switch to use descriptor passing")
Cc: stable@vger.kernel.org
Reviewed-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: i801: Fix using mux_pdev before it's set</title>
<updated>2024-03-08T09:10:26Z</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2024-03-03T10:45:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=09f02902eb9cd41d4b88f4a5b93696297b57a3b0'/>
<id>urn:sha1:09f02902eb9cd41d4b88f4a5b93696297b57a3b0</id>
<content type='text'>
i801_probe_optional_slaves() is called before i801_add_mux().
This results in mux_pdev being checked before it's set by
i801_add_mux(). Fix this by changing the order of the calls.
I consider this safe as I see no dependencies.

Fixes: 80e56b86b59e ("i2c: i801: Simplify class-based client device instantiation")
Cc: stable@vger.kernel.org
Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Reviewed-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: imx: when being a target, mark the last read as processed</title>
<updated>2024-02-23T22:39:35Z</updated>
<author>
<name>Corey Minyard</name>
<email>minyard@acm.org</email>
</author>
<published>2024-02-21T19:27:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=87aec499368d488c20292952d6d4be7cb9e49c5e'/>
<id>urn:sha1:87aec499368d488c20292952d6d4be7cb9e49c5e</id>
<content type='text'>
When being a target, NAK from the controller means that all bytes have
been transferred. So, the last byte needs also to be marked as
'processed'. Otherwise index registers of backends may not increase.

Fixes: f7414cd6923f ("i2c: imx: support slave mode for imx I2C driver")
Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
Tested-by: Andrew Manley &lt;andrew.manley@sealingtech.com&gt;
Reviewed-by: Andrew Manley &lt;andrew.manley@sealingtech.com&gt;
Reviewed-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
[wsa: fixed comment and commit message to properly describe the case]
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: i801: Fix block process call transactions</title>
<updated>2024-02-14T21:15:38Z</updated>
<author>
<name>Jean Delvare</name>
<email>jdelvare@suse.de</email>
</author>
<published>2024-02-14T14:59:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c1c9d0f6f7f1dbf29db996bd8e166242843a5f21'/>
<id>urn:sha1:c1c9d0f6f7f1dbf29db996bd8e166242843a5f21</id>
<content type='text'>
According to the Intel datasheets, software must reset the block
buffer index twice for block process call transactions: once before
writing the outgoing data to the buffer, and once again before
reading the incoming data from the buffer.

The driver is currently missing the second reset, causing the wrong
portion of the block buffer to be read.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Reported-by: Piotr Zakowski &lt;piotr.zakowski@intel.com&gt;
Closes: https://lore.kernel.org/linux-i2c/20240213120553.7b0ab120@endymion.delvare/
Fixes: 315cd67c9453 ("i2c: i801: Add Block Write-Block Read Process Call support")
Reviewed-by: Alexander Sverdlin &lt;alexander.sverdlin@gmail.com&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: pasemi: split driver into two separate modules</title>
<updated>2024-02-14T21:15:07Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2024-02-12T11:19:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f44bff19268517ee98e80e944cad0f04f1db72e3'/>
<id>urn:sha1:f44bff19268517ee98e80e944cad0f04f1db72e3</id>
<content type='text'>
On powerpc, it is possible to compile test both the new apple (arm) and
old pasemi (powerpc) drivers for the i2c hardware at the same time,
which leads to a warning about linking the same object file twice:

scripts/Makefile.build:244: drivers/i2c/busses/Makefile: i2c-pasemi-core.o is added to multiple modules: i2c-apple i2c-pasemi

Rework the driver to have an explicit helper module, letting Kbuild
take care of whether this should be built-in or a loadable driver.

Fixes: 9bc5f4f660ff ("i2c: pasemi: Split pci driver to its own file")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: qcom-geni: Correct I2C TRE sequence</title>
<updated>2024-02-12T16:04:32Z</updated>
<author>
<name>Viken Dadhaniya</name>
<email>quic_vdadhani@quicinc.com</email>
</author>
<published>2024-02-12T12:52:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=83ef106fa732aea8558253641cd98e8a895604d7'/>
<id>urn:sha1:83ef106fa732aea8558253641cd98e8a895604d7</id>
<content type='text'>
For i2c read operation in GSI mode, we are getting timeout
due to malformed TRE basically incorrect TRE sequence
in gpi(drivers/dma/qcom/gpi.c) driver.

I2C driver has geni_i2c_gpi(I2C_WRITE) function which generates GO TRE and
geni_i2c_gpi(I2C_READ)generates DMA TRE. Hence to generate GO TRE before
DMA TRE, we should move geni_i2c_gpi(I2C_WRITE) before
geni_i2c_gpi(I2C_READ) inside the I2C GSI mode transfer function
i.e. geni_i2c_gpi_xfer().

TRE stands for Transfer Ring Element - which is basically an element with
size of 4 words. It contains all information like slave address,
clk divider, dma address value data size etc).

Mainly we have 3 TREs(Config, GO and DMA tre).
- CONFIG TRE : consists of internal register configuration which is
               required before start of the transfer.
- DMA TRE :    contains DDR/Memory address, called as DMA descriptor.
- GO TRE :     contains Transfer directions, slave ID, Delay flags, Length
               of the transfer.

I2c driver calls GPI driver API to config each TRE depending on the
protocol.

For read operation tre sequence will be as below which is not aligned
to hardware programming guide.

- CONFIG tre
- DMA tre
- GO tre

As per Qualcomm's internal Hardware Programming Guide, we should configure
TREs in below sequence for any RX only transfer.

- CONFIG tre
- GO tre
- DMA tre

Fixes: d8703554f4de ("i2c: qcom-geni: Add support for GPI DMA")
Reviewed-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Reviewed-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Tested-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt; # qrb5165-rb5
Co-developed-by: Mukesh Kumar Savaliya &lt;quic_msavaliy@quicinc.com&gt;
Signed-off-by: Mukesh Kumar Savaliya &lt;quic_msavaliy@quicinc.com&gt;
Signed-off-by: Viken Dadhaniya &lt;quic_vdadhani@quicinc.com&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Signed-off-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'i2c-for-6.8-rc1-rebased' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux</title>
<updated>2024-01-19T01:29:01Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-01-19T01:29:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ed8d84530ab0a3b7b370e8b28f12179314dcfcc3'/>
<id>urn:sha1:ed8d84530ab0a3b7b370e8b28f12179314dcfcc3</id>
<content type='text'>
Pull i2c updates from Wolfram Sang:
 "This removes the currently unused CLASS_DDC support (controllers set
  the flag, but there is no client to use it).

  Also, CLASS_SPD support gets simplified to prepare removal in the
  future. Class based instantiation is not recommended these days
  anyhow.

  Furthermore, I2C core now creates a debugfs directory per I2C adapter.
  Current bus driver users were converted to use it.

  Finally, quite some driver updates. Standing out are patches for the
  wmt-driver which is refactored to support more variants.

  This is the rebased pull request where a large series for the
  designware driver was dropped"

* tag 'i2c-for-6.8-rc1-rebased' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (38 commits)
  MAINTAINERS: use proper email for my I2C work
  i2c: stm32f7: add support for stm32mp25 soc
  i2c: stm32f7: perform I2C_ISR read once at beginning of event isr
  dt-bindings: i2c: document st,stm32mp25-i2c compatible
  i2c: stm32f7: simplify status messages in case of errors
  i2c: stm32f7: perform most of irq job in threaded handler
  i2c: stm32f7: use dev_err_probe upon calls of devm_request_irq
  i2c: i801: Add lis3lv02d for Dell XPS 15 7590
  i2c: i801: Add lis3lv02d for Dell Precision 3540
  i2c: wmt: Reduce redundant: REG_CR setting
  i2c: wmt: Reduce redundant: function parameter
  i2c: wmt: Reduce redundant: clock mode setting
  i2c: wmt: Reduce redundant: wait event complete
  i2c: wmt: Reduce redundant: bus busy check
  i2c: mux: reg: Remove class-based device auto-detection support
  i2c: make i2c_bus_type const
  dt-bindings: at24: add ROHM BR24G04
  eeprom: at24: use of_match_ptr()
  i2c: cpm: Remove linux,i2c-index conversion from be32
  i2c: imx: Make SDA actually optional for bus recovering
  ...
</content>
</entry>
<entry>
<title>i2c: stm32f7: add support for stm32mp25 soc</title>
<updated>2024-01-18T20:10:44Z</updated>
<author>
<name>Alain Volmat</name>
<email>alain.volmat@foss.st.com</email>
</author>
<published>2023-12-15T17:06:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=90f9b1406236853bd524ddde86cc5a945690c6b7'/>
<id>urn:sha1:90f9b1406236853bd524ddde86cc5a945690c6b7</id>
<content type='text'>
The stm32mp25 has only a single interrupt line used for both
events and errors. In order to cope with that, reorganise the
error handling code so that it can be called either from the
common handler (used in case of SoC having only a single IT line)
and the error handler for others.
The CR1 register also embeds a new FMP bit, necessary when running
at Fast Mode Plus frequency. This bit should be used instead of
the SYSCFG bit used on other platforms.
Add a new compatible to distinguish between the SoCs and two
boolean within the setup structure in order to know if the
platform has a single/multiple IT lines and if the FMP bit
within CR1 is available or not.

Signed-off-by: Valentin Caron &lt;valentin.caron@foss.st.com&gt;
Signed-off-by: Alain Volmat &lt;alain.volmat@foss.st.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
</feed>
