Skip to contentSkip to conversation

Revert "media: dw9768: activate runtime PM and turn off device"

PATCH In review Sakari Ailus 3 participants 3 messages Apr 13, 2022 – Apr 14, 2022

Subsystems (3)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

PATCH 1/1 Revert "media: dw9768: activate runtime PM and turn off device"

This reverts commit c09d776eaa060534a1663e3b89d842db3e1d9076.

Revert the commit as it breaks runtime PM support on OF based systems. More fixes to the driver are needed.

---
 drivers/media/i2c/dw9768.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/media/i2c/dw9768.c +0 -6
index 65c6acf3ced9a..c086580efac78 100644
@@ -469,11 +469,6 @@ static int dw9768_probe(struct i2c_client *client)
 
 	dw9768->sd.entity.function = MEDIA_ENT_F_LENS;
 
-	/*
-	 * Device is already turned on by i2c-core with ACPI domain PM.
-	 * Attempt to turn off the device to satisfy the privacy LED concerns.
-	 */
-	pm_runtime_set_active(dev);
 	pm_runtime_enable(dev);
 	if (!pm_runtime_enabled(dev)) {
 		ret = dw9768_runtime_resume(dev);
@@ -488,7 +483,6 @@ static int dw9768_probe(struct i2c_client *client)
 		dev_err(dev, "failed to register V4L2 subdev: %d", ret);
 		goto err_power_off;
 	}
-	pm_runtime_idle(dev);
 
 	return 0;
 
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 36 lines · Sakari Ailus

This reverts commit c09d776eaa060534a1663e3b89d842db3e1d9076.

Revert the commit as it breaks runtime PM support on OF based systems. More fixes to the driver are needed.

---
 drivers/media/i2c/dw9768.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/media/i2c/dw9768.c +0 -7
index 65c6acf3ced9a..c086580efac78 100644
@@ -469,11 +469,6 @@ static int dw9768_probe(struct i2c_client *client)
 
        dw9768->sd.entity.function = MEDIA_ENT_F_LENS;
 
-       /*
-        * Device is already turned on by i2c-core with ACPI domain PM.
-        * Attempt to turn off the device to satisfy the privacy LED concerns.
-        */
-       pm_runtime_set_active(dev);
        pm_runtime_enable(dev);
        if (!pm_runtime_enabled(dev)) {
                ret = dw9768_runtime_resume(dev);
@@ -488,7 +483,6 @@ static int dw9768_probe(struct i2c_client *client)
                dev_err(dev, "failed to register V4L2 subdev: %d", ret);
                goto err_power_off;
        }
-       pm_runtime_idle(dev);
 
        return 0;
 
--
Quoted 2 lines

2.30.2

Thanks for a quick response!

Best regards,
Tomasz

Reviewed-by on v1 1/1
#2 lore raw
In reply to Sakari Ailus

Sakari,

Thanks.

Quoted 35 lines · Sakari Ailus

This reverts commit c09d776eaa060534a1663e3b89d842db3e1d9076.

Revert the commit as it breaks runtime PM support on OF based systems. More fixes to the driver are needed.

---
 drivers/media/i2c/dw9768.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/media/i2c/dw9768.c +0 -6
index 65c6acf3ced9a..c086580efac78 100644
@@ -469,11 +469,6 @@ static int dw9768_probe(struct i2c_client *client)
 
 	dw9768->sd.entity.function = MEDIA_ENT_F_LENS;
 
-	/*
-	 * Device is already turned on by i2c-core with ACPI domain PM.
-	 * Attempt to turn off the device to satisfy the privacy LED concerns.
-	 */
-	pm_runtime_set_active(dev);
 	pm_runtime_enable(dev);
 	if (!pm_runtime_enabled(dev)) {
 		ret = dw9768_runtime_resume(dev);
@@ -488,7 +483,6 @@ static int dw9768_probe(struct i2c_client *client)
 		dev_err(dev, "failed to register V4L2 subdev: %d", ret);
 		goto err_power_off;
 	}
-	pm_runtime_idle(dev);
 
 	return 0;
 
Signature · 2 lines
Best regards,
Bingbu Cao