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
F103410897: D29137.id85556.diff
Sun, Nov 24, 4:07 PM
Unknown Object (File)
Thu, Nov 14, 5:59 PM
Unknown Object (File)
Wed, Nov 13, 11:06 PM
Unknown Object (File)
Wed, Nov 13, 10:52 PM
Unknown Object (File)
Oct 2 2024, 6:48 PM
Unknown Object (File)
Sep 24 2024, 8:37 PM
Unknown Object (File)
Sep 24 2024, 6:31 PM
Unknown Object (File)
Sep 24 2024, 3:17 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 Not Applicable
Unit
Tests Not Applicable

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.