summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-snvs.c
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2015-07-23 14:44:24 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2015-07-23 14:44:24 +0200
commitefadd6c318531dd86466532322e9d78830b6ddbc (patch)
tree599c320e7dc0b4e392263e2f2737d8672a7dc279 /drivers/rtc/rtc-snvs.c
parent02110528b45ae331d89f7e7bb6a29b5494ec0be1 (diff)
rtc-snvs.c: conditionally set pm_power_off
There is a hack to use the global pm_power_off callback to switch of power with the i.MX 6 PMIC_ON_REQ signal. If one uses another power off driver the callback was already taken by the rtc-snvs driver.
Diffstat (limited to 'drivers/rtc/rtc-snvs.c')
-rw-r--r--drivers/rtc/rtc-snvs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-snvs.c b/drivers/rtc/rtc-snvs.c
index 6c6b684e52e0..ff2935a32db0 100644
--- a/drivers/rtc/rtc-snvs.c
+++ b/drivers/rtc/rtc-snvs.c
@@ -303,12 +303,14 @@ static int snvs_rtc_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "failed to register rtc: %d\n", ret);
return ret;
}
+#ifndef CONFIG_POWER_RESET_GPIO
/*
* if no specific power off function in board file, power off system by
* SNVS
*/
if (!pm_power_off)
pm_power_off = snvs_poweroff;
+#endif
return 0;
}