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
F115929117: D29137.diff
Wed, Apr 30, 1:12 PM
F115927599: D29137.id.diff
Wed, Apr 30, 12:51 PM
Unknown Object (File)
Tue, Apr 22, 4:51 PM
Unknown Object (File)
Tue, Apr 22, 8:40 AM
Unknown Object (File)
Sun, Apr 20, 1:34 PM
Unknown Object (File)
Sat, Apr 19, 8:10 AM
Unknown Object (File)
Thu, Apr 17, 9:43 AM
Unknown Object (File)
Thu, Apr 17, 3:08 AM
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.