Re: [PATCH] counter: stm32-lptimer-cnt: fix error handling when enabling

From: William Breathitt Gray
Date: Tue Mar 04 2025 - 05:32:42 EST



On Mon, 24 Feb 2025 18:06:57 +0100, Fabrice Gasnier wrote:
> In case the stm32_lptim_set_enable_state() fails to update CMP and ARR,
> a timeout error is raised, by regmap_read_poll_timeout. It may happen,
> when the lptimer runs on a slow clock, and the clock is gated only
> few times during the polling.
>
> Badly, when this happen, STM32_LPTIM_ENABLE in CR register has been set.
> So the 'enable' state in sysfs wrongly lies on the counter being
> correctly enabled, due to CR is read as one in stm32_lptim_is_enabled().
>
> [...]

Applied, thanks!

[1/1] counter: stm32-lptimer-cnt: fix error handling when enabling
commit: 8744dcd4fc7800de2eb9369410470bb2930d4c14

Best regards,
--
William Breathitt Gray <wbg@xxxxxxxxxx>