]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mfd: twl4030-power: Use 'ti,system-power-controller' as alternative way to support...
authorNishanth Menon <nm@ti.com>
Wed, 17 Sep 2014 12:34:12 +0000 (07:34 -0500)
committerLee Jones <lee.jones@linaro.org>
Fri, 26 Sep 2014 07:23:58 +0000 (08:23 +0100)
ti,system-power-controller is more or less the standard way of
indicating that the PMIC is the system wide power controller and hence
may be used to switch off the system. Almost ALL TI PMIC drivers and
many Maxim PMIC drivers follow the same style.

So support 'ti,system-power-controller' in addition to the usual
'ti,use_poweroff' to indicate that the PMIC instance has control for
switching off the system.

Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/twl4030-power.c

index 3bc969a5916b8249c193a44e71eb89c4c077be85..1c129ba68ddefab02e27a4df237d8d650252fe35 100644 (file)
@@ -627,6 +627,9 @@ static bool twl4030_power_use_poweroff(const struct twl4030_power_data *pdata,
        if (pdata && pdata->use_poweroff)
                return true;
 
+       if (of_property_read_bool(node, "ti,system-power-controller"))
+               return true;
+
        if (of_property_read_bool(node, "ti,use_poweroff"))
                return true;