[PATCH v9 3/3] pwm: sifive: Fix the error in the idempotent test within the pwm_apply_state_debug function

Uwe Kleine-König u.kleine-koenig at baylibre.com
Mon Jan 6 20:52:54 PST 2025


Hello Nylon,

On Mon, Jan 06, 2025 at 05:00:32PM +0800, Nylon Chen wrote:
> Hi Uwe, I have made the following adjustments based on your
> requirements. Does this align with what you had in mind?
> - period
> seq 5000 1 15000 | while read p; do echo $p >
> /sys/class/pwm/pwmchip0/pwm0/period echo "Testing period: $p" done
> 
> - duty cycle
> for duty in $(seq 0 1 10000); do echo $duty >
> /sys/class/pwm/pwmchip0/pwm0/duty_cycle echo "Testing duty cycle:
> $duty" done

That + doing the same test backwards (i.e. using seq 15000 -1 5000 for
the period test and seq 10000 -1 0 for duty_cycle) should catch most
rounding bugs.

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/20250107/1bef9bca/attachment.sig>


More information about the linux-riscv mailing list