lkml.org 
[lkml]   [2022]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 1/2] mfd: da9062: enable being a system-power-controller
Date
On 22 April 2022 07:17, Helmut Grohne wrote:

> The DA9062 can be the device used to power the CPU. In that case, it can
> be used to power off the system. In the CONTROL_A register, the M_*_EN
> bits must be zero for the corresponding *_EN bits to have an effect. We
> zero them all to turn off the system.
>
> Signed-off-by: Helmut Grohne <helmut.grohne@intenta.de>
> ---
> drivers/mfd/da9062-core.c | 31 +++++++++++++++++++++++++++++++
> 1 file changed, 31 insertions(+)
>
> This series effectively is a rebased resend. The earlier posting was
> https://lore.kernel.org/all/20200107120559.GA700@laureti-dev/. At that time,
> Adam Thomson critisized the use of regmap and i2c inside a pm_power_off hook
> since irqs are disabled. He reached out to Lee Jones, who asked Mark Brown and
> Wolfram Sang, but never got any reply. I noted that a fair number of other
> drivers do use regmap and i2c despite this issue. In the mean time, more
> instances were added:
> * drivers/mfd/acer-ec-a500.c uses i2c
> * drivers/mfd/ntxec.c uses i2c
> * drivers/mfd/rk808.c uses regmap and i2c
> Given that we proceeded with accepting the use of i2c and regmap inside
> pm_power_off hooks, I think we can proceed with this patch as well.
>
> Helmut

I still have concerns, but maybe it's up to the integrator of a platform to
determine if this approach for poweroff is valid and usable, although I still
think it would be good to have checks somewhere as to whether a platform can
actually perform atmoic I2C access when IRQs are disabled. However, without
further insight right now:

Reviewed-by: Adam Thomson <DLG-Adam.Thomson.Opensource@dm.renesas.com>
\
 
 \ /
  Last update: 2022-04-26 11:54    [W:0.491 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site