Re: [PATCH v6] pwm: rzg2l-gpt: Allow checking period_tick cache value only if sibling channel is enabled

From: Uwe Kleine-König

Date: Thu Nov 27 2025 - 04:06:20 EST


Hello
On Wed, Nov 26, 2025 at 10:42:48AM +0000, Biju wrote:
> From: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
>
> The rzg2l_gpt_config() tests the rzg2l_gpt->period_tick variable when
> both channels of a hardware channel are in use. This check is not valid
> if rzg2l_gpt_config() is called after disabling all the channels, as it
> tests against the cached value. Hence, allow checking and setting the
> cached value only if the sibling channel is enabled.
>
> While at it, drop else after return statement to fix the check patch
> warning.
>
> Cc: stable@xxxxxxxxxx
> Fixes: 061f087f5d0b ("pwm: Add support for RZ/G2L GPT")
> Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>

I'm happy with the patch now and applied it to

https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next

. I won't send it to Linus before 6.18, but it will be part of the PR
for 6.19-rc1.

Thanks
Uwe

Attachment: signature.asc
Description: PGP signature