mbox series

[v2,0/3] mfd: bd718x7: Set button press duration via dt only

Message ID cover.1558471150.git.leonard.crestez@nxp.com
Headers show
Series mfd: bd718x7: Set button press duration via dt only | expand

Message

Leonard Crestez May 21, 2019, 8:41 p.m. UTC
The reset button on imx8mm-evk is tied to PWRON_B pin of bd71847 and the
long press duration is set to zero from OTP. The linux driver overrides
those values and breaks reset from button.

Overwriting OTP or bootloader configuration with some hardcoded defaults
is not desirable, power button should behave identically from bootloader
to kernel.

Add DT properties to allow explicitly overriding press durations but
don't do anything by default.

Changes since v1:
 * Attempt to round to closest supporting value
 * Spelling fix in PATCH 2 commit message
 * Collect acks
Link to v1: https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=119597

Leonard Crestez (3):
  mfd: bd718x7: Remove hardcoded config for button press duration
  dt-bindings: mfd: Document short/long press duration for bd718x7
  mfd: bd718x7: Make power button press duration configurable

 .../bindings/mfd/rohm,bd71837-pmic.txt        |  8 +++
 drivers/mfd/rohm-bd718x7.c                    | 61 ++++++++++++-------
 2 files changed, 48 insertions(+), 21 deletions(-)

Comments

Lee Jones June 3, 2019, 12:51 p.m. UTC | #1
On Tue, 21 May 2019, Leonard Crestez wrote:

> The reset button on imx8mm-evk is tied to PWRON_B pin of bd71847 and the
> long press duration is set to zero from OTP. The linux driver overrides
> those values and breaks reset from button.
> 
> Overwriting OTP or bootloader configuration with some hardcoded defaults
> is not desirable, keep already programmed values instead.
> 
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> Acked-By: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
> ---
>  drivers/mfd/rohm-bd718x7.c | 23 -----------------------
>  1 file changed, 23 deletions(-)

Applied, thanks.
Lee Jones June 3, 2019, 12:51 p.m. UTC | #2
On Tue, 21 May 2019, Leonard Crestez wrote:

> Allow overwriting the values in BD718XX_REG_PWRONCONFIG0 and
> BD718XX_REG_PWRONCONFIG1 via devicetree. Read values in milliseconds and
> attempt to round them to something supported by the hardware.
> 
> Keep existing values (from bootloader or OTP) if property is not
> present.
> 
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> Reviewed-By: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
> ---
>  drivers/mfd/rohm-bd718x7.c | 42 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)

Applied, thanks.