Skip to content

Commit 98a1b2d

Browse files
committed
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
2 parents df6cbc6 + 87cea48 commit 98a1b2d

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

drivers/i2c/busses/i2c-qcom-geni.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,8 +986,10 @@ static int __maybe_unused geni_i2c_runtime_resume(struct device *dev)
986986
return ret;
987987

988988
ret = clk_prepare_enable(gi2c->core_clk);
989-
if (ret)
989+
if (ret) {
990+
geni_icc_disable(&gi2c->se);
990991
return ret;
992+
}
991993

992994
ret = geni_se_resources_on(&gi2c->se);
993995
if (ret) {

drivers/i2c/busses/i2c-tegra.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1802,9 +1802,9 @@ static int tegra_i2c_probe(struct platform_device *pdev)
18021802
* domain.
18031803
*
18041804
* VI I2C device shouldn't be marked as IRQ-safe because VI I2C won't
1805-
* be used for atomic transfers.
1805+
* be used for atomic transfers. ACPI device is not IRQ safe also.
18061806
*/
1807-
if (!IS_VI(i2c_dev))
1807+
if (!IS_VI(i2c_dev) && !has_acpi_companion(i2c_dev->dev))
18081808
pm_runtime_irq_safe(i2c_dev->dev);
18091809

18101810
pm_runtime_enable(i2c_dev->dev);

include/linux/i2c.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ static inline int of_i2c_get_board_info(struct device *dev,
10661066
struct acpi_resource;
10671067
struct acpi_resource_i2c_serialbus;
10681068

1069-
#if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_I2C)
1069+
#if IS_REACHABLE(CONFIG_ACPI) && IS_REACHABLE(CONFIG_I2C)
10701070
bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares,
10711071
struct acpi_resource_i2c_serialbus **i2c);
10721072
int i2c_acpi_client_count(struct acpi_device *adev);

0 commit comments

Comments
 (0)