Commit fd8b8f17 authored by Bjorn Andersson's avatar Bjorn Andersson Committed by Sebastian Reichel

power: reset: msm: Clarify restart and poweroff

When PSHOLD in a Qualcomm platform is deasserted the PMIC will perform
either a power off or a restart of the system. The action to take is
configured in the PON block, which is controlled by a separate driver.

As the configuration logic was added to the pm8941-pwrkey driver the
comment in do_msm_poweroff() is no longer valid and the name
do_msm_restart() is misleading. Update the naming and drop the comment.
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
parent 70a39e10
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <linux/pm.h> #include <linux/pm.h>
static void __iomem *msm_ps_hold; static void __iomem *msm_ps_hold;
static int do_msm_restart(struct notifier_block *nb, unsigned long action, static int deassert_pshold(struct notifier_block *nb, unsigned long action,
void *data) void *data)
{ {
writel(0, msm_ps_hold); writel(0, msm_ps_hold);
...@@ -33,14 +33,13 @@ static int do_msm_restart(struct notifier_block *nb, unsigned long action, ...@@ -33,14 +33,13 @@ static int do_msm_restart(struct notifier_block *nb, unsigned long action,
} }
static struct notifier_block restart_nb = { static struct notifier_block restart_nb = {
.notifier_call = do_msm_restart, .notifier_call = deassert_pshold,
.priority = 128, .priority = 128,
}; };
static void do_msm_poweroff(void) static void do_msm_poweroff(void)
{ {
/* TODO: Add poweroff capability */ deassert_pshold(&restart_nb, 0, NULL);
do_msm_restart(&restart_nb, 0, NULL);
} }
static int msm_restart_probe(struct platform_device *pdev) static int msm_restart_probe(struct platform_device *pdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment