drivers: power: reset: add msm restart support
PATCH 1/1 drivers: power: reset: add msm restart support
Add support for restart and poweroff functionality present on MSM chipsets with the MPM2 ps-hold hardware.
Signed-off-by Abhimanyu Kapur <[email protected]>
--- .../bindings/power_supply/msm-poweroff.txt | 17 +++++ drivers/power/reset/Kconfig | 6 ++ drivers/power/reset/Makefile | 1 + drivers/power/reset/msm-poweroff.c | 75 ++++++++++++++++++++++ 4 files changed, 99 insertions(+) create mode 100644 Documentation/devicetree/bindings/power_supply/msm-poweroff.txt create mode 100644 drivers/power/reset/msm-poweroff.c
Documentation/devicetree/bindings/power_supply/msm-poweroff.txt new file +17 -0
@@ -0,0 +1,17 @@ +MSM Restart Driver + +A power supply hold (ps-hold) bit is set to power the msm chipsets. +Clearing that bit allows us to restart/poweroff. The difference +between poweroff and restart is determined by unique power manager IC +settings. + +Required Properties: +-compatible: "qcom,pshold" +-reg: Specifies the physical address of the ps-hold register + +Example: + + restart@fc4ab000 { + compatible = "qcom,pshold"; + reg = <0xfc4ab000 0x4>; + };
drivers/power/reset/Kconfig +6 -0
@@ -14,6 +14,12 @@ config POWER_RESET_GPIO If your board needs a GPIO high/low to power down, say Y and create a binding in your devicetree. +config POWER_RESET_MSM + bool "Qualcomm MSM power-off driver" + depends on POWER_RESET && ARCH_MSM + help + Power off and restart support for Qualcomm boards. + config POWER_RESET_QNAP bool "QNAP power-off driver" depends on OF_GPIO && POWER_RESET && PLAT_ORION
drivers/power/reset/Makefile +1 -0
@@ -1,4 +1,5 @@ obj-$(CONFIG_POWER_RESET_GPIO) += gpio-poweroff.o +obj-$(CONFIG_POWER_RESET_MSM) += msm-poweroff.o obj-$(CONFIG_POWER_RESET_QNAP) += qnap-poweroff.o obj-$(CONFIG_POWER_RESET_RESTART) += restart-poweroff.o obj-$(CONFIG_POWER_RESET_VEXPRESS) += vexpress-poweroff.o
drivers/power/reset/msm-poweroff.c new file +75 -0
75 lines not on this page · raw message
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
Quoted 5 lines · Abhimanyu Kapur
Add support for restart and poweroff functionality present on MSM chipsets with the MPM2 ps-hold hardware.
Signed-off-by Abhimanyu Kapur <[email protected]>---
Thanks, this version looks good. Feel free to add my reviewed-by:
Reviewed-by Stephen Boyd <[email protected]>
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Hi,
Quoted 4 lines · Abhimanyu Kapur
Add support for restart and poweroff functionality present on MSM chipsets with the MPM2 ps-hold hardware.
Signed-off-by Abhimanyu Kapur <[email protected]>
Quoted 8 lines
--- .../bindings/power_supply/msm-poweroff.txt | 17 +++++ drivers/power/reset/Kconfig | 6 ++ drivers/power/reset/Makefile | 1 + drivers/power/reset/msm-poweroff.c | 75 ++++++++++++++++++++++ 4 files changed, 99 insertions(+) create mode 100644 Documentation/devicetree/bindings/power_supply/msm-poweroff.txt create mode 100644 drivers/power/reset/msm-poweroff.c
Thank you, Could you next time add version in the subject line, like "PATH v2", it is easier to track changes.
Tested-by Ivan T. Ivanov <[email protected]>
Regards,
Ivan
Anton Vorontsov
AppliedQuoted 5 lines · Abhimanyu Kapur
Add support for restart and poweroff functionality present on MSM chipsets with the MPM2 ps-hold hardware.
Signed-off-by Abhimanyu Kapur <[email protected]>---
Applied, thanks a lot!
Anton