Page MenuHomeFreeBSD

usr.sbin/pwm/pwm add support for flags
ClosedPublic

Authored by oskar.holmlund_ohdata.se on Mar 9 2021, 8:28 AM.
Tags
Referenced Files
Unknown Object (File)
Sat, Apr 6, 7:59 PM
Unknown Object (File)
Feb 8 2024, 2:07 PM
Unknown Object (File)
Jan 15 2024, 12:52 AM
Unknown Object (File)
Jan 13 2024, 7:56 PM
Unknown Object (File)
Dec 25 2023, 1:09 PM
Unknown Object (File)
Dec 20 2023, 4:50 AM
Unknown Object (File)
Dec 10 2023, 2:02 PM
Unknown Object (File)
Dec 7 2023, 12:53 PM
Subscribers

Details

Summary

The pwm utility cant set the only flag defined (PWM_POLARITY_INVERTED) so this patch add the option -I (capital letter i) to send it to the drivers.

None of existing PWM driver have implemented support for flags. But soon:ish I will put up an review of a pwm driver using TI OMAP DMTimer.

Also fix the types of period and duty in share/man/man9/pwmbus.9 to match the one in sys/dev/pmw/pwmbus.c.

Test Plan

Tested on BBB with

  • ti_omap_dmtimer_pwm [not published] have support for flags
  • am335x_ehrpwm does not have support for flags

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

.dD field in manual page needs to be updated.

Looks ok, could you split the updated man page change not related with this review ?

usr.sbin/pwm/pwm.c
185

whitespace are needed here " & "

Remove share/man/man9/pwmbus.9
Fix space around &

.dD field in manual page needs to be updated.

Thank you, fixed in D29139

This revision is now accepted and ready to land.Mar 11 2021, 8:30 AM
This revision was automatically updated to reflect the committed changes.