<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/i2c/muxes, branch v6.3.2</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.3.2</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.3.2'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-03-09T20:59:18+00:00</updated>
<entry>
<title>i2c: mux: Convert all drivers to new .probe() callback</title>
<updated>2023-03-09T20:59:18+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-02-26T22:26:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f2afad9d35ff762028de7497dac60aa32be9f0f'/>
<id>urn:sha1:2f2afad9d35ff762028de7497dac60aa32be9f0f</id>
<content type='text'>
Now that .probe() was changed not to get the id parameter, drivers can
be converted back to that with the eventual goal to drop .probe_new().

Implement that for the i2c mux drivers.

Acked-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: mux: reg: check return value after calling platform_get_resource()</title>
<updated>2022-12-07T20:19:32+00:00</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-10-29T09:38:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2d47b79d2bd39cc6369eccf94a06568d84c906ae'/>
<id>urn:sha1:2d47b79d2bd39cc6369eccf94a06568d84c906ae</id>
<content type='text'>
It will cause null-ptr-deref in resource_size(), if platform_get_resource()
returns NULL, move calling resource_size() after devm_ioremap_resource() that
will check 'res' to avoid null-ptr-deref.
And use devm_platform_get_and_ioremap_resource() to simplify code.

Fixes: b3fdd32799d8 ("i2c: mux: Add register-based mux i2c-mux-reg")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: mux: pca954x: Convert to i2c's .probe_new()</title>
<updated>2022-12-05T09:49:32+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2022-11-18T22:36:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a5eacd2e3790ecf1cbc0be2e53a6f3d1ce3bb719'/>
<id>urn:sha1:a5eacd2e3790ecf1cbc0be2e53a6f3d1ce3bb719</id>
<content type='text'>
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: mux: pca9541: switch to using .probe_new</title>
<updated>2022-12-05T09:36:18+00:00</updated>
<author>
<name>Peter Rosin</name>
<email>peda@axentia.se</email>
</author>
<published>2018-04-17T14:32:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=99c4ec2397bb88c3325676a308b93aa8ba362de8'/>
<id>urn:sha1:99c4ec2397bb88c3325676a308b93aa8ba362de8</id>
<content type='text'>
Use the new probe style for i2c drivers.

Signed-off-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: muxes: Drop obsolete dependency on COMPILE_TEST</title>
<updated>2022-08-22T22:15:01+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>jdelvare@suse.de</email>
</author>
<published>2022-08-04T11:45:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=874765c9251f602ccc43b05d05b2e0525c1f7d21'/>
<id>urn:sha1:874765c9251f602ccc43b05d05b2e0525c1f7d21</id>
<content type='text'>
Since commit 0166dc11be91 ("of: make CONFIG_OF user selectable"), it
is possible to test-build any driver which depends on OF on any
architecture by explicitly selecting OF. Therefore depending on
COMPILE_TEST as an alternative is no longer needed.

It is actually better to always build such drivers with OF enabled,
so that the test builds are closer to how each driver will actually be
built on its intended target. Building them without OF may not test
much as the compiler will optimize out potentially large parts of the
code. In the worst case, this could even pop false positive warnings.
Dropping COMPILE_TEST here improves the quality of our testing and
avoids wasting time on non-existent issues.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Acked-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: Make remove callback return void</title>
<updated>2022-08-16T10:46:26+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2022-08-15T08:02:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ed5c2f5fd10dda07263f79f338a512c0f49f76f5'/>
<id>urn:sha1:ed5c2f5fd10dda07263f79f338a512c0f49f76f5</id>
<content type='text'>
The value returned by an i2c driver's remove function is mostly ignored.
(Only an error message is printed if the value is non-zero that the
error is ignored.)

So change the prototype of the remove function to return no value. This
way driver authors are not tempted to assume that passing an error to
the upper layer is a good idea. All drivers are adapted accordingly.
There is no intended change of behaviour, all callbacks were prepared to
return 0 before.

Reviewed-by: Peter Senna Tschudin &lt;peter.senna@gmail.com&gt;
Reviewed-by: Jeremy Kerr &lt;jk@codeconstruct.com.au&gt;
Reviewed-by: Benjamin Mugnier &lt;benjamin.mugnier@foss.st.com&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: Crt Mori &lt;cmo@melexis.com&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Marek Behún &lt;kabel@kernel.org&gt; # for leds-turris-omnia
Acked-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Petr Machata &lt;petrm@nvidia.com&gt; # for mlxsw
Reviewed-by: Maximilian Luz &lt;luzmaximilian@gmail.com&gt; # for surface3_power
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt; # for bmc150-accel-i2c + kxcjk-1013
Reviewed-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt; # for media/* + staging/media/*
Acked-by: Miguel Ojeda &lt;ojeda@kernel.org&gt; # for auxdisplay/ht16k33 + auxdisplay/lcd2s
Reviewed-by: Luca Ceresoli &lt;luca.ceresoli@bootlin.com&gt; # for versaclock5
Reviewed-by: Ajay Gupta &lt;ajayg@nvidia.com&gt; # for ucsi_ccg
Acked-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt; # for iio
Acked-by: Peter Rosin &lt;peda@axentia.se&gt; # for i2c-mux-*, max9860
Acked-by: Adrien Grassein &lt;adrien.grassein@gmail.com&gt; # for lontium-lt8912b
Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt; # for hwmon, i2c-core and i2c/muxes
Acked-by: Corey Minyard &lt;cminyard@mvista.com&gt; # for IPMI
Reviewed-by: Vladimir Oltean &lt;olteanv@gmail.com&gt;
Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Acked-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt; # for drivers/power
Acked-by: Krzysztof Hałasa &lt;khalasa@piap.pl&gt;
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: mux-gpmux: Add of_node_put() when breaking out of loop</title>
<updated>2022-07-26T21:10:59+00:00</updated>
<author>
<name>Liang He</name>
<email>windhl@126.com</email>
</author>
<published>2022-07-22T01:24:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6435319c34704994e19b0767f6a4e6f37439867b'/>
<id>urn:sha1:6435319c34704994e19b0767f6a4e6f37439867b</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>i2c: mux: demux-pinctrl: do not deactivate a master that is not active</title>
<updated>2022-03-19T23:49:43+00:00</updated>
<author>
<name>Peter Rosin</name>
<email>peda@axentia.se</email>
</author>
<published>2022-03-02T11:22:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1a22aabf20adf89cb216f566913196128766f25b'/>
<id>urn:sha1:1a22aabf20adf89cb216f566913196128766f25b</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>i2c: mux: gpio: Use array_size() helper</title>
<updated>2021-11-23T10:54:41+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2021-11-15T15:42:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a2fd6f6bc07f525eb5064ac8f0c2286a1138d59c'/>
<id>urn:sha1:a2fd6f6bc07f525eb5064ac8f0c2286a1138d59c</id>
<content type='text'>
Use array_size() helper to aid in 2-factor allocation instances.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Evan Green &lt;evgreen@chromium.org&gt;
Acked-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: mux: gpio: Don't dereference fwnode from struct device</title>
<updated>2021-11-23T10:54:41+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2021-11-15T15:42:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=533f05f0abc05250dc82416863de711ca5550bd4'/>
<id>urn:sha1:533f05f0abc05250dc82416863de711ca5550bd4</id>
<content type='text'>
We have a special helper to get fwnode out of struct device.
Moreover, dereferencing it directly prevents the fwnode
modifications in the future.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Evan Green &lt;evgreen@chromium.org&gt;
Acked-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
</feed>
