i2c-for-6.11-rc4

I2C core needs to fix a fix from rc3 by replacing IS_ENABLED() with
 IS_REACHABLE().
 
 For host drivers, there are two fixes in this update:
 
 Tegra I2C Controller: Addresses a potential double-locking issue
 during probe. ACPI devices are not IRQ-safe when invoking runtime
 suspend and resume functions, so the irq_safe flag should not be
 set.
 
 Qualcomm GENI I2C Controller: Fixes an oversight in the exit path
 of the runtime_resume() function, which was missed in the
 previous release.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmbBAJEACgkQFA3kzBSg
 Kbb5cQ//d21ErODuoWCR0EQZ91cxpF/sNUle4FxJcPGPxoARBILFmXslJj9wfD6H
 pXpk58XKxV0nFoMaUWdAWy3L5eBuZNEkbZfYeZ7dWr5LiCOmH7owjGwnALpBRYgI
 kdYZg0YV82M7qH7UeKq5hpQWnhp1WhwHUtD1N2iGjvpW8knVLs2ZrEj1OYehKKI7
 PFLKQYSILQdMpixJLJqx6X/7rLLutSR0uEjVTrzghV843IG/3aq8NZGBzqFJegUp
 R9lA0tqiK8L/Ux4OZ6LTnpabRbBupzMiTrpr5Yv7ZnpYUtGq7wninNYvJtY6mraJ
 BId1svmfkqN3WIi2l+A+KA8AoOYCbG6sOLfNa0V2Nu4r/+0aKrwkyY3g+mFPhtfg
 Ib1GBW2J0aR45Ni8tiZr0Qs9hWiwd9gjPUToElL/OE75Ocki5nrbYETOyfoiTsHn
 k+72z9pTbhZGVQDmU6Z5HOTFmEqUSu/lnnh71N7LB2u3mi4xDRr8Hj1w+uGZ3Ql6
 Uf65zIszZdXAsDUnwfgQWjPCwtMNPKI8lWNhgoNlxlTlRXFBp3ifXDhF2cPBKtOV
 u62cIDe2ygGVrIfOd4aqWWAmWlh6mPxQANvwDXEk01xnrhhXlsFwuNGP7C3VDBy7
 JMgyBZPTFejbesysDWKlD21NFsvZ2m+ddV8sOPUyXdwcQApuleY=
 =xSb+
 -----END PGP SIGNATURE-----

Merge tag 'i2c-for-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "I2C core fix replacing IS_ENABLED() with IS_REACHABLE()

  For host drivers, there are two fixes:

   - Tegra I2C Controller: Addresses a potential double-locking issue
     during probe. ACPI devices are not IRQ-safe when invoking runtime
     suspend and resume functions, so the irq_safe flag should not be
     set.

   - Qualcomm GENI I2C Controller: Fixes an oversight in the exit path
     of the runtime_resume() function, which was missed in the previous
     release"

* tag 'i2c-for-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: tegra: Do not mark ACPI devices as irq safe
  i2c: Use IS_REACHABLE() for substituting empty ACPI functions
  i2c: qcom-geni: Add missing geni_icc_disable in geni_i2c_runtime_resume
This commit is contained in:
Linus Torvalds 2024-08-17 16:23:05 -07:00
commit 98a1b2d71f
3 changed files with 6 additions and 4 deletions

View file

@ -986,8 +986,10 @@ static int __maybe_unused geni_i2c_runtime_resume(struct device *dev)
return ret;
ret = clk_prepare_enable(gi2c->core_clk);
if (ret)
if (ret) {
geni_icc_disable(&gi2c->se);
return ret;
}
ret = geni_se_resources_on(&gi2c->se);
if (ret) {

View file

@ -1802,9 +1802,9 @@ static int tegra_i2c_probe(struct platform_device *pdev)
* domain.
*
* VI I2C device shouldn't be marked as IRQ-safe because VI I2C won't
* be used for atomic transfers.
* be used for atomic transfers. ACPI device is not IRQ safe also.
*/
if (!IS_VI(i2c_dev))
if (!IS_VI(i2c_dev) && !has_acpi_companion(i2c_dev->dev))
pm_runtime_irq_safe(i2c_dev->dev);
pm_runtime_enable(i2c_dev->dev);

View file

@ -1066,7 +1066,7 @@ static inline int of_i2c_get_board_info(struct device *dev,
struct acpi_resource;
struct acpi_resource_i2c_serialbus;
#if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_I2C)
#if IS_REACHABLE(CONFIG_ACPI) && IS_REACHABLE(CONFIG_I2C)
bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares,
struct acpi_resource_i2c_serialbus **i2c);
int i2c_acpi_client_count(struct acpi_device *adev);