From efadd6c318531dd86466532322e9d78830b6ddbc Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Thu, 23 Jul 2015 14:44:24 +0200 Subject: 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. --- drivers/rtc/rtc-snvs.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- cgit v1.2.3