diff mbox series

[v6,4/6] mfd: stm32: enable regmap fast_io for stm32-lptimer

Message ID 20200401083909.18886-5-benjamin.gaignard@st.com (mailing list archive)
State New, archived
Headers show
Series clockevent: add low power STM32 timer | expand

Commit Message

Benjamin GAIGNARD April 1, 2020, 8:39 a.m. UTC
Because stm32-lptimer need to write in registers in interrupt context
enable regmap fast_io to use a spin_lock to protect registers access
rather than a mutex.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
---
 drivers/mfd/stm32-lptimer.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Fabrice Gasnier April 1, 2020, 8:52 a.m. UTC | #1
On 4/1/20 10:39 AM, Benjamin Gaignard wrote:
> Because stm32-lptimer need to write in registers in interrupt context
> enable regmap fast_io to use a spin_lock to protect registers access
> rather than a mutex.
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
> ---
>  drivers/mfd/stm32-lptimer.c | 1 +
>  1 file changed, 1 insertion(+)
Hi Benjamin,

Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>

Thanks,
Fabrice
> 
> diff --git a/drivers/mfd/stm32-lptimer.c b/drivers/mfd/stm32-lptimer.c
> index a00f99f36559..746e51a17cc8 100644
> --- a/drivers/mfd/stm32-lptimer.c
> +++ b/drivers/mfd/stm32-lptimer.c
> @@ -17,6 +17,7 @@ static const struct regmap_config stm32_lptimer_regmap_cfg = {
>  	.val_bits = 32,
>  	.reg_stride = sizeof(u32),
>  	.max_register = STM32_LPTIM_MAX_REGISTER,
> +	.fast_io = true,
>  };
>  
>  static int stm32_lptimer_detect_encoder(struct stm32_lptimer *ddata)
>
Lee Jones April 16, 2020, 7:03 a.m. UTC | #2
On Wed, 01 Apr 2020, Benjamin Gaignard wrote:

> Because stm32-lptimer need to write in registers in interrupt context
> enable regmap fast_io to use a spin_lock to protect registers access
> rather than a mutex.
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
> ---
>  drivers/mfd/stm32-lptimer.c | 1 +
>  1 file changed, 1 insertion(+)

For my own reference:
  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
diff mbox series

Patch

diff --git a/drivers/mfd/stm32-lptimer.c b/drivers/mfd/stm32-lptimer.c
index a00f99f36559..746e51a17cc8 100644
--- a/drivers/mfd/stm32-lptimer.c
+++ b/drivers/mfd/stm32-lptimer.c
@@ -17,6 +17,7 @@  static const struct regmap_config stm32_lptimer_regmap_cfg = {
 	.val_bits = 32,
 	.reg_stride = sizeof(u32),
 	.max_register = STM32_LPTIM_MAX_REGISTER,
+	.fast_io = true,
 };
 
 static int stm32_lptimer_detect_encoder(struct stm32_lptimer *ddata)