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

From: Maud Spierings
Date: Mon Jan 06 2025 - 13:59:38 EST


Hello William,

I've once again put the patch to the test, and it seems the oops is resolved.

I did notice something odd though, when controlling the backlight  bl_power 0 means the backlight is on and controllable, 1 seems like off, but instead sets the screen to maximum brightness and then stops listening to any value echoed into brightness.

The brightness is also reversed from what would be logical, so 255 is off and 0 is maximum.

Now the little text at the top specifies that the hardware only does inverted polarity, which I guess explains this, but I don't understand it. I also encountered this when I got an error to start with so I had to add PWM_POLARITY_INVERTED to my pwm-backlight definition.

But I don't understand why it isn't supported. Wouldn't supporting non inverted polarity be a very simple calculation? 40% negative duty cycle is of course equal to 60% positive duty cycle, 20% N == 80% P etc. I don't see why the hardware would specifically have to support this.

Anyways it does seem to work now so if others approve:

Tested-by: Maud Spierings <maud_spierings@xxxxxxxxxxx>

Kind regards,

Maud