diff options
| -rw-r--r-- | Documentation/devicetree/bindings/power_supply/msm-poweroff.txt | 8 | ||||
| -rw-r--r-- | drivers/power/reset/msm-poweroff.c | 5 |
2 files changed, 10 insertions, 3 deletions
diff --git a/Documentation/devicetree/bindings/power_supply/msm-poweroff.txt b/Documentation/devicetree/bindings/power_supply/msm-poweroff.txt index 929031ac8abb..f19a92d765ef 100644 --- a/Documentation/devicetree/bindings/power_supply/msm-poweroff.txt +++ b/Documentation/devicetree/bindings/power_supply/msm-poweroff.txt @@ -8,13 +8,19 @@ settings. Required Properties: -compatible: "qcom,pshold" -reg: Specifies the physical address of the ps-hold register + This value must correspond to "pshold-base" as defined in reg-names +-reg-names: must contain "pshold-base" + may also contain "tcsr-boot-misc-detect" Optional Properties: -reg: A secondary reg address/size pair may be provided, to specify the address of the TCSR_BOOT_MISC_DETECT register. This address is typically used to configure the type of reset desired. Omitting this address implies that the reset type shall be configured by means of a call to the secure - environment. + environment. This value must correspond to "tcsr-boot-misc-detect" as + defined in reg-names +-reg-names: must contain "tcsr-boot-misc-detect" if the secondary address/size + pair described above is defined. Example: diff --git a/drivers/power/reset/msm-poweroff.c b/drivers/power/reset/msm-poweroff.c index 274b2c78ead9..c2958682114e 100644 --- a/drivers/power/reset/msm-poweroff.c +++ b/drivers/power/reset/msm-poweroff.c @@ -402,12 +402,13 @@ static int msm_restart_probe(struct platform_device *pdev) } } - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); + mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pshold-base"); msm_ps_hold = devm_ioremap_resource(dev, mem); if (IS_ERR(msm_ps_hold)) return PTR_ERR(msm_ps_hold); - mem = platform_get_resource(pdev, IORESOURCE_MEM, 1); + mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, + "tcsr-boot-misc-detect"); if (mem) tcsr_boot_misc_detect = mem->start; |
