Re: [PATCH v17] pwm: opencores: Add PWM driver support

From: Uwe Kleine-König
Date: Tue Mar 18 2025 - 05:59:55 EST


Hello Maud,

On Tue, Jan 07, 2025 at 07:37:13AM +0100, Maud Spierings wrote:
> I did some more digging, took a look at the pwm-backlight driver in the
> vendor kernel, and it seems there are some tweaks there [1] (all the way at
> the bottom). And it explains some things, first off why it didn't error
> before without the inverted polarity, because it sets this value in the
> pwm-backlight driver in that kernel.
>
> but the interesting line is this one:
> |brightness = (u8)~brightness;

Huh, that confirms my prejudice that vendor trees are bad. Even in
combination with

state.polarity = PWM_POLARITY_INVERSED;

in the probe function this is horrible. This effectively renders your
testing useless.

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature