summaryrefslogtreecommitdiff
path: root/drivers/i2c/i2c-core-base.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-10-01 15:11:00 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2025-10-01 15:11:00 -0700
commitcf8da11679ec4e54e2dd3cb147fb310a2230be52 (patch)
tree1b3b27ba6282fd40a8d587b754ce8c2448c22fbf /drivers/i2c/i2c-core-base.c
parent5fb024931949f3475260c84a0e4b0997af9c5530 (diff)
parentcb3005d4c490fe2489accd5408592683d705b455 (diff)
Merge tag 'i2c-for-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c updates from Wolfram Sang: "Mostly DT bindings additions this time because Andi was super busy and I also could only partly cover it. - new ids for qcom-cci, mt65xx, exynos5, apple, tegra20, k1, i801 - drop support for already removed S3C2410 - introduce and use fwnode_for_each_child_node_scoped() - mmt65xx: improve write-then-read transactions - k1: various fixes around bus errors and resets - usual share of cleanups, minor improvements, PM fixes... at24 updates: - add the compatible for Giantec GT24C256C to the device-tree bindings" * tag 'i2c-for-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (33 commits) i2c: i801: Add support for Intel Wildcat Lake-U dt-bindings: i2c: i2c-mt65xx: Add MediaTek MT8196/6991 compatibles i2c: designware: Add disabling clocks when probe fails i2c: designware: Fix clock issue when PM is disabled i2c: busses: Fix some spelling errors i2c: mux: Simplify boolean assignment in i2c_mux_alloc i2c: designware: use dev_err_probe() when probing platform device i2c: designware: convert to dev_err_probe() on request IRQ error i2c: spacemit: ensure SDA is released after bus reset i2c: spacemit: check SDA instead of SCL after bus reset i2c: spacemit: disable SDA glitch fix to avoid restart delay i2c: spacemit: remove stop function to avoid bus error i2c: spacemit: ensure bus release check runs when wait_bus_idle() fails i2c: mediatek: fix potential incorrect use of I2C_MASTER_WRRD i2c: boardinfo: Annotate code used in init phase only dt-bindings: i2c: i2c-mt65xx: Document MediaTek MT6878 I2C dt-bindings: i2c: samsung,s3c2410-i2c: Drop S3C2410 i2c: s3c2410: Drop S3C2410 OF support dt-bindings: i2c: spacemit,k1-i2c: Minor whitespace cleanup in example dt-bindings: i2c: exynos5: add samsung,exynos8890-hsi2c compatible ...
Diffstat (limited to 'drivers/i2c/i2c-core-base.c')
-rw-r--r--drivers/i2c/i2c-core-base.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index ecca8c006b02..ae7e9c8b65a6 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -573,7 +573,8 @@ static int i2c_device_probe(struct device *dev)
goto err_clear_wakeup_irq;
do_power_on = !i2c_acpi_waive_d0_probe(dev);
- status = dev_pm_domain_attach(&client->dev, do_power_on ? PD_FLAG_ATTACH_POWER_ON : 0);
+ status = dev_pm_domain_attach(&client->dev, PD_FLAG_DETACH_POWER_OFF |
+ (do_power_on ? PD_FLAG_ATTACH_POWER_ON : 0));
if (status)
goto err_clear_wakeup_irq;
@@ -581,7 +582,7 @@ static int i2c_device_probe(struct device *dev)
GFP_KERNEL);
if (!client->devres_group_id) {
status = -ENOMEM;
- goto err_detach_pm_domain;
+ goto err_clear_wakeup_irq;
}
client->debugfs = debugfs_create_dir(dev_name(&client->dev),
@@ -608,8 +609,6 @@ static int i2c_device_probe(struct device *dev)
err_release_driver_resources:
debugfs_remove_recursive(client->debugfs);
devres_release_group(&client->dev, client->devres_group_id);
-err_detach_pm_domain:
- dev_pm_domain_detach(&client->dev, do_power_on);
err_clear_wakeup_irq:
dev_pm_clear_wake_irq(&client->dev);
device_init_wakeup(&client->dev, false);
@@ -636,8 +635,6 @@ static void i2c_device_remove(struct device *dev)
devres_release_group(&client->dev, client->devres_group_id);
- dev_pm_domain_detach(&client->dev, true);
-
dev_pm_clear_wake_irq(&client->dev);
device_init_wakeup(&client->dev, false);