mfd: axp20x: Add self-working mode support for AXP806
authorChen-Yu Tsai <wens@csie.org>
Thu, 12 Jul 2018 16:04:49 +0000 (00:04 +0800)
committerLee Jones <lee.jones@linaro.org>
Fri, 27 Jul 2018 07:13:26 +0000 (08:13 +0100)
commit06f4901092c26c24575dd0aa1f55cdf9a83434e8
treef27fcd26c61a830e965bd9b3e1a12c527bfce5f5
parentc26b633ee3dd295996006a47543af3759ca677ec
mfd: axp20x: Add self-working mode support for AXP806

The AXP806 can operate in a standalone "self-working" mode, in which it
is also responsible for power control of the overall system. This mode
is similar to the master mode, but the EN/PWRON pin functions as a power
button, instead of a level-triggered enable switch.

This patch adds code checking for the new "x-powers,self-working-mode"
property, and a separate mfd_cell list that includes the power button
(PEK) sub-device.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Icenowy Zheng <icenowy@aosc.io>
Tested-by: Icenowy Zheng <icenowy@aosc.io>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/axp20x.c