Re: [PATCH v3 1/5] mfd: rk808: Add RK817 and RK809 support

From: tony
Date: Tue Oct 23 2018 - 03:22:16 EST

å 2018/10/23 14:26, Lee Jones åé:
The rk809 and rk817 are a Power Management IC (PMIC) for multimedia
and handheld devices. It contains the following components:

- Regulators
- Clocking

Both RK809 and RK817 chips are using a similar register map,
so we can reuse the RTC and Clocking and regulators functionality.

Signed-off-by: Tony Xie <tony.xie@xxxxxxxxxxxxxx>
drivers/mfd/Kconfig | 6 +-
drivers/mfd/rk808.c | 218 +++++++++++++++++++++++++++++++++++++++++++++-
include/linux/mfd/rk808.h | 172 ++++++++++++++++++++++++++++++++++++
kernel/reboot.c | 1 +
4 files changed, 391 insertions(+), 6 deletions(-)

diff --git a/kernel/reboot.c b/kernel/reboot.c
index e4ced88..83810d7 100644
--- a/kernel/reboot.c
+++ b/kernel/reboot.c
@@ -49,6 +49,7 @@
void (*pm_power_off_prepare)(void);
Why do you need this where no other driver in the kernel does?
ÂÂÂ There is a gpio_slp pin for RK809 and RK817ïthis pin has resetãpower
down and sleep functionsïso
ÂÂÂ when system is going to power down, this pin is needed to switch to
power down functionïand then we just only control
ÂÂÂ this pin to high to power down the system in atf at lastã
There are other PM call-backs that you can use for this. There
shouldn't be any requirement to export and call functions at this
level directly.
ÂÂÂ I will use a shutdown call-backs from syscore to implement it.