<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/i2c/muxes, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-02-01T17:18:50Z</updated>
<entry>
<title>i2c: mux: demux-pinctrl: check initial mux selection, too</title>
<updated>2025-02-01T17:18:50Z</updated>
<author>
<name>Wolfram Sang</name>
</author>
<published>2025-01-15T07:29:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d2b25cbeee2cbff5fbe71bb8a02983ed30078fc'/>
<id>urn:sha1:5d2b25cbeee2cbff5fbe71bb8a02983ed30078fc</id>
<content type='text'>
[ Upstream commit ca89f73394daf92779ddaa37b42956f4953f3941 ]

When misconfigured, the initial setup of the current mux channel can
fail, too. It must be checked as well.

Fixes: 50a5ba876908 ("i2c: mux: demux-pinctrl: add driver")
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: muxes: i2c-demux-pinctrl: Use of_get_i2c_adapter_by_node()</title>
<updated>2023-11-08T10:23:36Z</updated>
<author>
<name>Herve Codina</name>
</author>
<published>2023-10-20T15:30:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5764f6e546a9351ccb0aa67c54eaa32556bbf679'/>
<id>urn:sha1:5764f6e546a9351ccb0aa67c54eaa32556bbf679</id>
<content type='text'>
commit 0fb118de5003028ad092a4e66fc6d07b86c3bc94 upstream.

i2c-demux-pinctrl uses the pair of_find_i2c_adapter_by_node() /
i2c_put_adapter(). These pair alone is not correct to properly lock the
I2C parent adapter.

Indeed, i2c_put_adapter() decrements the module refcount while
of_find_i2c_adapter_by_node() does not increment it. This leads to an
underflow of the parent module refcount.

Use the	dedicated function, of_get_i2c_adapter_by_node(), to handle
correctly the module refcount.

Fixes: 50a5ba876908 ("i2c: mux: demux-pinctrl: add driver")
Signed-off-by: Herve Codina &lt;herve.codina@bootlin.com&gt;
Cc: stable@vger.kernel.org
Acked-by: Peter Rosin &lt;peda@axentia.se&gt;
Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&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: muxes: i2c-mux-gpmux: Use of_get_i2c_adapter_by_node()</title>
<updated>2023-11-08T10:23:36Z</updated>
<author>
<name>Herve Codina</name>
</author>
<published>2023-10-20T15:30:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a3b9bcedd7ad97f651e5523b981ba82c38aa0b99'/>
<id>urn:sha1:a3b9bcedd7ad97f651e5523b981ba82c38aa0b99</id>
<content type='text'>
commit 3dc0ec46f6e7511fc4fdf6b6cda439382bc957f1 upstream.

i2c-mux-gpmux uses the pair of_find_i2c_adapter_by_node() /
i2c_put_adapter(). These pair alone is not correct to properly lock the
I2C parent adapter.

Indeed, i2c_put_adapter() decrements the module refcount while
of_find_i2c_adapter_by_node() does not increment it. This leads to an
underflow of the parent module refcount.

Use the dedicated function, of_get_i2c_adapter_by_node(), to handle
correctly the module refcount.

Fixes: ac8498f0ce53 ("i2c: i2c-mux-gpmux: new driver")
Signed-off-by: Herve Codina &lt;herve.codina@bootlin.com&gt;
Cc: stable@vger.kernel.org
Acked-by: Peter Rosin &lt;peda@axentia.se&gt;
Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&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: muxes: i2c-mux-pinctrl: Use of_get_i2c_adapter_by_node()</title>
<updated>2023-11-08T10:23:36Z</updated>
<author>
<name>Herve Codina</name>
</author>
<published>2023-10-20T15:30:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=07ec3d952a4a13ffcc41f17db9e96a518952f8e3'/>
<id>urn:sha1:07ec3d952a4a13ffcc41f17db9e96a518952f8e3</id>
<content type='text'>
commit 3171d37b58a76e1febbf3f4af2d06234a98cf88b upstream.

i2c-mux-pinctrl uses the pair of_find_i2c_adapter_by_node() /
i2c_put_adapter(). These pair alone is not correct to properly lock the
I2C parent adapter.

Indeed, i2c_put_adapter() decrements the module refcount while
of_find_i2c_adapter_by_node() does not increment it. This leads to an
underflow of the parent module refcount.

Use the dedicated function, of_get_i2c_adapter_by_node(), to handle
correctly the module refcount.

Fixes: c4aee3e1b0de ("i2c: mux: pinctrl: remove platform_data")
Signed-off-by: Herve Codina &lt;herve.codina@bootlin.com&gt;
Cc: stable@vger.kernel.org
Acked-by: Peter Rosin &lt;peda@axentia.se&gt;
Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&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: mux: demux-pinctrl: check the return value of devm_kstrdup()</title>
<updated>2023-10-10T19:46:38Z</updated>
<author>
<name>Xiaoke Wang</name>
</author>
<published>2022-03-03T12:39:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0926a2b7cb604ac0e588d8a607c73d7e2ccd40b0'/>
<id>urn:sha1:0926a2b7cb604ac0e588d8a607c73d7e2ccd40b0</id>
<content type='text'>
[ Upstream commit 7c0195fa9a9e263df204963f88a22b21688ffb66 ]

devm_kstrdup() returns pointer to allocated string on success,
NULL on failure. So it is better to check the return value of it.

Fixes: e35478eac030 ("i2c: mux: demux-pinctrl: run properly with multiple instances")
Signed-off-by: Xiaoke Wang &lt;xkernel.wang@foxmail.com&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: mux-gpmux: Add of_node_put() when breaking out of loop</title>
<updated>2022-08-25T09:17:47Z</updated>
<author>
<name>Liang He</name>
</author>
<published>2022-07-22T01:24:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=becbc82919bc303d86e80153ba4b0e4eac47b743'/>
<id>urn:sha1:becbc82919bc303d86e80153ba4b0e4eac47b743</id>
<content type='text'>
[ Upstream commit 6435319c34704994e19b0767f6a4e6f37439867b ]

In i2c_mux_probe(), we should call of_node_put() when breaking out
of for_each_child_of_node() which will automatically increase and
decrease the refcount.

Fixes: ac8498f0ce53 ("i2c: i2c-mux-gpmux: new driver")
Signed-off-by: Liang He &lt;windhl@126.com&gt;
Acked-by: Peter Rosin &lt;peda@axentia.se&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: mux: demux-pinctrl: do not deactivate a master that is not active</title>
<updated>2022-04-15T12:18:16Z</updated>
<author>
<name>Peter Rosin</name>
</author>
<published>2022-03-02T11:22:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c7b252a60539f6533fa9394f7f234783254725e'/>
<id>urn:sha1:1c7b252a60539f6533fa9394f7f234783254725e</id>
<content type='text'>
[ Upstream commit 1a22aabf20adf89cb216f566913196128766f25b ]

Attempting to rollback the activation of the current master when
the current master has not been activated is bad. priv-&gt;cur_chan
and priv-&gt;cur_adap are both still zeroed out and the rollback
may result in attempts to revert an of changeset that has not been
applied and do result in calls to both del and put the zeroed out
i2c_adapter. Maybe it crashes, or whatever, but it's bad in any
case.

Fixes: e9d1a0a41d44 ("i2c: mux: demux-pinctrl: Fix an error handling path in 'i2c_demux_pinctrl_probe()'")
Signed-off-by: Peter Rosin &lt;peda@axentia.se&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: mux: demux-pinctrl: Fix an error handling path in 'i2c_demux_pinctrl_probe()'</title>
<updated>2020-05-27T15:46:18Z</updated>
<author>
<name>Christophe JAILLET</name>
</author>
<published>2020-05-06T19:21:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=274cd3c7b5d3e11e7dd724e31e8ff7ddf82e5694'/>
<id>urn:sha1:274cd3c7b5d3e11e7dd724e31e8ff7ddf82e5694</id>
<content type='text'>
[ Upstream commit e9d1a0a41d4486955e96552293c1fcf1fce61602 ]

A call to 'i2c_demux_deactivate_master()' is missing in the error handling
path, as already done in the remove function.

Fixes: 50a5ba876908 ("i2c: mux: demux-pinctrl: add driver")
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>Merge branch 'i2c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux</title>
<updated>2019-07-16T04:10:39Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2019-07-16T04:10:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=273cbf61c3ddee9574ef1f4959b9bc6db5b24271'/>
<id>urn:sha1:273cbf61c3ddee9574ef1f4959b9bc6db5b24271</id>
<content type='text'>
Pull i2c updates from Wolfram Sang:
 "New stuff from the I2C world:

   - in the core, getting irqs from ACPI is now similar to OF

   - new driver for MediaTek MT7621/7628/7688 SoCs

   - bcm2835, i801, and tegra drivers got some more attention

   - GPIO API cleanups

   - cleanups in the core headers

   - lots of usual driver updates"

* 'i2c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (74 commits)
  i2c: mt7621: Fix platform_no_drv_owner.cocci warnings
  i2c: cpm: remove casting dma_alloc
  dt-bindings: i2c: sun6i-p2wi: Fix the binding example
  dt-bindings: i2c: mv64xxx: Fix the example compatible
  i2c: i801: Documentation update
  i2c: i801: Add support for Intel Tiger Lake
  i2c: i801: Fix PCI ID sorting
  dt-bindings: i2c-stm32: document optional dmas
  i2c: i2c-stm32f7: Add I2C_SMBUS_I2C_BLOCK_DATA support
  i2c: core: Tidy up handling of init_irq
  i2c: core: Move ACPI gpio IRQ handling into i2c_acpi_get_irq
  i2c: core: Move ACPI IRQ handling to probe time
  i2c: acpi: Factor out getting the IRQ from ACPI
  i2c: acpi: Use available IRQ helper functions
  i2c: core: Allow whole core to use i2c_dev_irq_from_resources
  eeprom: at24: modify a comment referring to platform data
  dt-bindings: i2c: omap: Add new compatible for J721E SoCs
  dt-bindings: i2c: mv64xxx: Add YAML schemas
  dt-bindings: i2c: sun6i-p2wi: Add YAML schemas
  i2c: mt7621: Add MediaTek MT7621/7628/7688 I2C driver
  ...
</content>
</entry>
<entry>
<title>i2c: mux/i801: Switch to use descriptor passing</title>
<updated>2019-06-22T05:01:34Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2019-06-18T10:58:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d308dfbf62eff897d71968d764f21a78678ee0a5'/>
<id>urn:sha1:d308dfbf62eff897d71968d764f21a78678ee0a5</id>
<content type='text'>
This switches the i801 GPIO mux to use GPIO descriptors for
handling the GPIO lines. The previous hack which was reaching
inside the GPIO chips etc cannot live on. We pass descriptors
along with the GPIO mux device at creation instead.

The GPIO mux was only used by way of platform data with a
platform device from one place in the kernel: the i801 i2c bus
driver. Let's just associate the GPIO descriptor table with
the actual device like everyone else and dynamically create
a descriptor table passed along with the GPIO i2c mux.

This enables simplification of the GPIO i2c mux driver to
use only the descriptor API and the OF probe path gets
simplified in the process.

The i801 driver was registering the GPIO i2c mux with
PLATFORM_DEVID_AUTO which would make it hard to predict the
device name and assign the descriptor table properly, but
this seems to be a mistake to begin with: all of the
GPIO mux devices are hardcoded to look up GPIO lines from
the "gpio_ich" GPIO chip. If there are more than one mux,
there is certainly more than one gpio chip as well, and
then we have more serious problems. Switch to
PLATFORM_DEVID_NONE instead. There can be only one.

Cc: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Cc: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: Peter Rosin &lt;peda@axentia.se&gt;
Cc: Jean Delvare &lt;jdelvare@suse.com&gt;
Signed-off-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
[Removed a newline, suggested by Andy. /Peter]
Signed-off-by: Peter Rosin &lt;peda@axentia.se&gt;
</content>
</entry>
</feed>
