[PATCH 3/3] power: reset: qcom-pon: Add support for 'qcom,pon-reboot-not-used'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Check property 'qcom,pon-reboot-not-used' and skip reboot-mode setup
if the property is present.  This is useful for devices that use IMEM
instead of PON register to pass reboot mode, but still want to populate
pwrkey and resin devices.

Signed-off-by: Shawn Guo <shawn.guo@xxxxxxxxxx>
---
 drivers/power/reset/qcom-pon.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/power/reset/qcom-pon.c b/drivers/power/reset/qcom-pon.c
index 4a688741a88a..85fae9e85878 100644
--- a/drivers/power/reset/qcom-pon.c
+++ b/drivers/power/reset/qcom-pon.c
@@ -47,6 +47,14 @@ static int pm8916_pon_probe(struct platform_device *pdev)
 	struct pm8916_pon *pon;
 	int error;
 
+	if (device_property_present(&pdev->dev, "qcom,pon-reboot-not-used")) {
+		/*
+		 * Skip reboot-mode setup and registration if PON is not used
+		 * for passing reboot mode at all.
+		 */
+		goto done;
+	}
+
 	pon = devm_kzalloc(&pdev->dev, sizeof(*pon), GFP_KERNEL);
 	if (!pon)
 		return -ENOMEM;
@@ -75,6 +83,7 @@ static int pm8916_pon_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, pon);
 
+done:
 	return devm_of_platform_populate(&pdev->dev);
 }
 
-- 
2.17.1




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux