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)
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
Unknown Object (File)
Sep 18 2024, 8:43 PM
Unknown Object (File)
Sep 8 2024, 9:26 PM
Unknown Object (File)
Sep 8 2024, 4:58 PM
Unknown Object (File)
Sep 8 2024, 2:38 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
187

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.