<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/include/linux/i2c.h, branch linux-6.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-10-10T10:00:46Z</updated>
<entry>
<title>i2c: core: Lock address during client device instantiation</title>
<updated>2024-10-10T10:00:46Z</updated>
<author>
<name>Heiner Kallweit</name>
</author>
<published>2024-08-15T19:44:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=24781e20fcdf678954637b866da85f7eef1c13e7'/>
<id>urn:sha1:24781e20fcdf678954637b866da85f7eef1c13e7</id>
<content type='text'>
commit 8d3cefaf659265aa82b0373a563fdb9d16a2b947 upstream.

Krzysztof reported an issue [0] which is caused by parallel attempts to
instantiate the same I2C client device. This can happen if driver
supports auto-detection, but certain devices are also instantiated
explicitly.
The original change isn't actually wrong, it just revealed that I2C core
isn't prepared yet to handle this scenario.
Calls to i2c_new_client_device() can be nested, therefore we can't use a
simple mutex here. Parallel instantiation of devices at different addresses
is ok, so we just have to prevent parallel instantiation at the same address.
We can use a bitmap with one bit per 7-bit I2C client address, and atomic
bit operations to set/check/clear bits.
Now a parallel attempt to instantiate a device at the same address will
result in -EBUSY being returned, avoiding the "sysfs: cannot create duplicate
filename" splash.

Note: This patch version includes small cosmetic changes to the Tested-by
      version, only functional change is that address locking is supported
      for slave addresses too.

[0] https://lore.kernel.org/linux-i2c/9479fe4e-eb0c-407e-84c0-bd60c15baf74@ans.pl/T/#m12706546e8e2414d8f1a0dc61c53393f731685cc

Fixes: caba40ec3531 ("eeprom: at24: Probe for DDR3 thermal sensor in the SPD case")
Cc: stable@vger.kernel.org
Tested-by: Krzysztof Piotr Oledzki &lt;ole@ans.pl&gt;
Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>i2c: Use IS_REACHABLE() for substituting empty ACPI functions</title>
<updated>2024-09-08T05:56:41Z</updated>
<author>
<name>Richard Fitzgerald</name>
</author>
<published>2024-08-14T12:16:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5c8dc61a17f4ab1fa4db33e4a51bf58ef6e8f1eb'/>
<id>urn:sha1:5c8dc61a17f4ab1fa4db33e4a51bf58ef6e8f1eb</id>
<content type='text'>
commit 71833e79a42178d8a50b5081c98c78ace9325628 upstream.

Replace IS_ENABLED() with IS_REACHABLE() to substitute empty stubs for:
    i2c_acpi_get_i2c_resource()
    i2c_acpi_client_count()
    i2c_acpi_find_bus_speed()
    i2c_acpi_new_device_by_fwnode()
    i2c_adapter *i2c_acpi_find_adapter_by_handle()
    i2c_acpi_waive_d0_probe()

commit f17c06c6608a ("i2c: Fix conditional for substituting empty ACPI
functions") partially fixed this conditional to depend on CONFIG_I2C,
but used IS_ENABLED(), which is wrong since CONFIG_I2C is tristate.

CONFIG_ACPI is boolean but let's also change it to use IS_REACHABLE()
to future-proof it against becoming tristate.

Somehow despite testing various combinations of CONFIG_I2C and CONFIG_ACPI
we missed the combination CONFIG_I2C=m, CONFIG_ACPI=y.

Signed-off-by: Richard Fitzgerald &lt;rf@opensource.cirrus.com&gt;
Fixes: f17c06c6608a ("i2c: Fix conditional for substituting empty ACPI functions")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202408141333.gYnaitcV-lkp@intel.com/
Reviewed-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>i2c: Fix conditional for substituting empty ACPI functions</title>
<updated>2024-09-08T05:56:16Z</updated>
<author>
<name>Richard Fitzgerald</name>
</author>
<published>2024-08-02T15:22:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7ced32ce3a7a2a12523622da556f90910ef5e0ca'/>
<id>urn:sha1:7ced32ce3a7a2a12523622da556f90910ef5e0ca</id>
<content type='text'>
[ Upstream commit f17c06c6608ad4ecd2ccf321753fb511812d821b ]

Add IS_ENABLED(CONFIG_I2C) to the conditional around a bunch of ACPI
functions.

The conditional around these functions depended only on CONFIG_ACPI.
But the functions are implemented in I2C core, so are only present if
CONFIG_I2C is enabled.

Signed-off-by: Richard Fitzgerald &lt;rf@opensource.cirrus.com&gt;
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: Add nop fwnode operations</title>
<updated>2024-06-21T11:33:17Z</updated>
<author>
<name>Sakari Ailus</name>
</author>
<published>2024-06-14T08:14:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1cbf347288702af0fe8667c0ce760afbe982a2f1'/>
<id>urn:sha1:1cbf347288702af0fe8667c0ce760afbe982a2f1</id>
<content type='text'>
Add nop variants of i2c_find_device_by_fwnode(),
i2c_find_adapter_by_fwnode() and i2c_get_adapter_by_fwnode() for use
without CONFIG_I2C.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
</content>
</entry>
<entry>
<title>i2c: Remove I2C_CLASS_SPD</title>
<updated>2024-05-23T11:38:15Z</updated>
<author>
<name>Heiner Kallweit</name>
</author>
<published>2024-04-15T20:50:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e61bcf42d290e73025bab38e0e55a5586c2d8ad5'/>
<id>urn:sha1:e61bcf42d290e73025bab38e0e55a5586c2d8ad5</id>
<content type='text'>
Remove this class after all users have been gone.

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: remove redundant condition</title>
<updated>2024-03-07T08:36:08Z</updated>
<author>
<name>Hsin-Yu.Chen</name>
</author>
<published>2024-03-06T04:19:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f311507c5336ad6b9ca7687c35c3bd7a4fe2868c'/>
<id>urn:sha1:f311507c5336ad6b9ca7687c35c3bd7a4fe2868c</id>
<content type='text'>
I2C_M_RD is defined as and guaranteed to be 1 and 'flag &amp; I2C_M_RD' is
one or zero. No need for an additional condition to obtain the value.

Signed-off-by: Hsin-Yu.Chen &lt;harry021633@gmail.com&gt;
Reviewed-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
[wsa: slightly updated commit message]
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
</content>
</entry>
<entry>
<title>i2c: constify the struct device_type usage</title>
<updated>2024-03-04T13:28:25Z</updated>
<author>
<name>Ricardo B. Marliere</name>
</author>
<published>2024-02-19T12:38:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eb52034436a58e742ceea0dcf2f003f83a3449a5'/>
<id>urn:sha1:eb52034436a58e742ceea0dcf2f003f83a3449a5</id>
<content type='text'>
Since commit aed65af1cc2f ("drivers: make device_type const"), the driver
core can properly handle constant struct device_type. Move the
i2c_adapter_type and i2c_client_type variables to be constant structures as
well, placing it into read-only memory which can not be modified at
runtime.

Signed-off-by: Ricardo B. Marliere &lt;ricardo@marliere.net&gt;
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
</content>
</entry>
<entry>
<title>i2c: make i2c_bus_type const</title>
<updated>2024-01-18T20:10:43Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2023-12-19T15:22:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=94959c0e796e41128483588d133b9a7003b409f9'/>
<id>urn:sha1:94959c0e796e41128483588d133b9a7003b409f9</id>
<content type='text'>
Now that the driver core can properly handle constant struct bus_type,
move the i2c_bus_type variable to be a constant structure as well, placing
it into read-only memory which can not be modified at runtime.

Note, the sound/soc/rockchip/rk3399_gru_sound.c also needed tweaking as
it decided to save off a pointer to a bus type for internal stuff, and
it was using the i2c_bus_type as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>i2c: create debugfs entry per adapter</title>
<updated>2024-01-18T20:10:41Z</updated>
<author>
<name>Wolfram Sang</name>
</author>
<published>2023-11-12T22:54:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=73febd775bdbdb98c81255ff85773ac410ded5c4'/>
<id>urn:sha1:73febd775bdbdb98c81255ff85773ac410ded5c4</id>
<content type='text'>
Two drivers already implement custom debugfs handling for their
i2c_adapter and more will come. So, let the core create a debugfs
directory per adapter and pass that to drivers for their debugfs files.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>include/linux/i2c.h: remove I2C_CLASS_DDC support</title>
<updated>2024-01-18T20:10:41Z</updated>
<author>
<name>Heiner Kallweit</name>
</author>
<published>2023-11-23T09:40:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b60db383e2ba64a18e49b6bef3be1ab18aa159f1'/>
<id>urn:sha1:b60db383e2ba64a18e49b6bef3be1ab18aa159f1</id>
<content type='text'>
After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in
olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC.
Class-based device auto-detection is a legacy mechanism and shouldn't
be used in new code. So we can remove this class completely now.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
</feed>
