From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH v3 1/5] mfd: rk808: Add RK817 and RK809 support Date: Tue, 23 Oct 2018 07:26:01 +0100 Message-ID: <20181023062601.GS4939@dell> References: <1535081441-20718-1-git-send-email-tony.xie@rock-chips.com> <1535081441-20718-2-git-send-email-tony.xie@rock-chips.com> <20180911114732.GL4185@dell> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: tony Cc: heiko@sntech.de, broonie@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, a.zummo@towertech.it, alexandre.belloni@bootlin.com, sboyd@kernel.org, linux-clk@vger.kernel.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, chenjh@rock-chips.com, xsf@rock-chips.com, zhangqing@rock-chips.com, huangtao@rock-chips.com List-Id: devicetree@vger.kernel.org > > > The rk809 and rk817 are a Power Management IC (PMIC) for multimedia > > > and handheld devices. It contains the following components: > > > > > > - Regulators > > > - RTC > > > - 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 > > > --- > > > 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); > > > +EXPORT_SYMBOL_GPL(pm_power_off_prepare); > > 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. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog