aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorAndreas Kemnade <andreas@kemnade.info>2024-02-17 09:20:07 +0100
committerLee Jones <lee@kernel.org>2024-02-23 16:12:03 +0000
commit8ba560ec14267af1169e1f5407fbce514fd4f6f6 (patch)
tree242e2f229d038a0e548c081734aef1d6a92fd559 /drivers/mfd
parentca9414a1d08756c8392f9219caee607e1b7bade1 (diff)
downloadlinux-8ba560ec14267af1169e1f5407fbce514fd4f6f6.tar.gz
mfd: twl4030-power: Accept standard property for power controller
Instead of only accepting the ti specific properties accept also the standard property. For uniformity, search in the parent node for the tag. The code for powering off is also isolated from the rest in this file. So it is a pure Linux design decision to put it here. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Link: https://lore.kernel.org/r/20240217082007.3238948-6-andreas@kemnade.info Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/twl4030-power.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 1595e9c76132d8..0bca948ab6baee 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -686,6 +686,9 @@ static bool twl4030_power_use_poweroff(const struct twl4030_power_data *pdata,
if (of_property_read_bool(node, "ti,use_poweroff"))
return true;
+ if (of_device_is_system_power_controller(node->parent))
+ return true;
+
return false;
}