diff options
| author | Stepan Moskovchenko <stepanm@codeaurora.org> | 2015-01-22 19:29:52 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:02:19 -0700 |
| commit | e731442230443d1e7dcc2ee228995ac1a7c3eecb (patch) | |
| tree | d6420a36d388cc677368fbe443b240a74de6b559 | |
| parent | 0a8080c06049259331e2d15f1960be81b6983231 (diff) | |
power: reset: msm: Define reg-names for the qcom,pshold device
Since the qcom,pshold device now supports up to two
distinct register definitions, add the 'reg-names' property
to assign names to the memory resources, rather than
relying on resource numbering.
Change-Id: Ie0bc5eae0119901239efae05357ae107a112b87a
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
| -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; |
