[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1435130188-4087-1-git-send-email-linux.amoon@gmail.com>
Date: Wed, 24 Jun 2015 16:46:28 +0930
From: Anand Moon <linux.amoon@...il.com>
To: Sangbeom Kim <sbkim73@...sung.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
Anand Moon <linux.amoon@...il.com>
Subject: [PATCH] regulator: s2mps11: Added shutdown function to poweroff Odroid-XU3
Added .shutdown function to s2mps11 to help poweroff the board succefully.
The device drivers set the register to turn off the PMIC.
Signed-off-by: Anand Moon <linux.amoon@...il.com>
---
Changes fixes the poweroff
root@...oidxu3:~# poweroff
Broadcast message from root@...oidxu3
(/dev/ttySAC2) at 13:08 ...
The system is going down for power off NOW!
root@...oidxu3:~# wait-for-state stop/waiting
* Stopping rsync daemon rsync [ OK ]
* Stopping RDP Session manager [ OK ]
* Stopping NTP server ntpd [ OK ]
* Asking all remaining processes to terminate... [ OK ]
* All processes ended within 1 seconds... [ OK ]
nm-dispatcher.action: Caught signal 15, shutting down...
ModemManager[2134]: <warn> Could not acquire the 'org.freedesktop.ModemManager1' service name
ModemManager[2134]: <info> ModemManager is shut down
* Unmounting temporary filesystems... [ OK ]
* Deactivating swap... [ OK ]
* Unmounting local filesystems... [ OK ]
* Will now halt
[ 209.020280] reboot: Power down
[ 209.122039] Power down failed, please power off system manually.
---
drivers/regulator/s2mps11.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index ff82811..871f7b8 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -1060,6 +1060,13 @@ out:
return ret;
}
+static void s2mps11_pmic_shutdown(struct platform_device *pdev)
+{
+ struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
+
+ regmap_update_bits(iodev->regmap_pmic, S2MPS11_REG_CTRL1, 0xff, 0x00);
+}
+
static const struct platform_device_id s2mps11_pmic_id[] = {
{ "s2mps11-pmic", S2MPS11X},
{ "s2mps13-pmic", S2MPS13X},
@@ -1074,6 +1081,7 @@ static struct platform_driver s2mps11_pmic_driver = {
.name = "s2mps11-pmic",
},
.probe = s2mps11_pmic_probe,
+ .shutdown = s2mps11_pmic_shutdown,
.id_table = s2mps11_pmic_id,
};
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists