[PATCH v2 1/5] pwm: imx27: enable clock unconditional for register access
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Sat Sep 26 09:28:46 EDT 2020
On Fri, Sep 25, 2020 at 05:53:26PM +0200, Marco Felsch wrote:
> The current implementation enables the clock if the current PWM state
> is '!enabled' to ensure the register access and left the clock on if the
> new state is 'enabled'. Further apply calls don't enable the clock since
> they relying on the fact the the clock is already running. Change this
s/relying/rely/
> behaviour since it is not very intuitive.
>
> This commit changes this behaviour. Now the clocks are unconditional
s/unconditional/unconditionally/
> enabled/disabled before/after the register access. If the PWM should be
> turned on (state.enabled) we enable the clock again and vice versa if
> the PWM should be turned off (!state.enabled).
>
> Therefore I added the enable member to the driver state struct since
> the usage of cstate and pwm_get_state() is a layer violation. I removed
> this violation while on it.
>
> Signed-off-by: Marco Felsch <m.felsch at pengutronix.de>
I like it.
Acked-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
Best regards and thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20200926/e2956aa7/attachment.sig>
More information about the linux-arm-kernel
mailing list