[PATCH v15 0/5] Change PWM-controlled LED pin active mode and algorithm

Uwe Kleine-König ukleinek at kernel.org
Thu May 29 04:22:47 PDT 2025


Hello Nylon,

On Thu, May 29, 2025 at 11:53:38AM +0800, Nylon Chen wrote:
> According to the circuit diagram of User LEDs - RGB described in the
> manual hifive-unleashed-a00.pdf[0] and hifive-unmatched-schematics-v3.pdf[1].
> 
> The behavior of PWM is acitve-high.
> 
> According to the descriptionof PWM for pwmcmp in SiFive FU740-C000 Manual[2].
> 
> The pwm algorithm is (PW) pulse active time  = (D) duty * (T) period.
> The `frac` variable is pulse "inactive" time so we need to invert it.
> 
> So this patchset removes active-low in DTS and adds reverse logic to the driver.

Applied to

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

as 6.17-rc1 material. I pondered if this should go in earlier and/or
should get marked for stable. I'm unsure and willing to consider input
here. The problem I see is that while this is a fix, the change is a
breaking one and you need the dts change and the code change applied
either both or none.

Best regards
Uwe
-------------- 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-riscv/attachments/20250529/7b130306/attachment.sig>


More information about the linux-riscv mailing list