Page MenuHomeFreeBSD

hradio: Add driver to report RFKILL button press
ClosedPublic

Authored by obiwac on Thu, Jun 25, 2:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 9, 3:55 AM
Unknown Object (File)
Wed, Jul 1, 1:05 PM
Unknown Object (File)
Wed, Jul 1, 1:03 PM
Unknown Object (File)
Wed, Jul 1, 1:20 AM
Unknown Object (File)
Wed, Jul 1, 1:15 AM
Unknown Object (File)
Wed, Jul 1, 12:04 AM
Unknown Object (File)
Mon, Jun 29, 12:15 PM
Unknown Object (File)
Mon, Jun 29, 12:11 PM

Details

Summary

This driver only reports the RFKILL button presses for the time being.

This is needed for the "airplane" key on some Framework laptops.

Event: Halifax Hackathon 202606
Location: vishwin@'s car
Co-authored-by: Daniel Shaefer
Sponsored by: The FreeBSD Foundation
Sponsored by: Framework Computer Inc

Test Plan

See D56026 for previous revision and discussion.

Made into separate hradio(4) driver at wulf@'s request.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74225
Build 71108: arc lint + arc unit

Event Timeline

ziaee added inline comments.
share/man/man4/hradio.4
2–4

Probably meaningless nit: On the second page of style(9) it shows the copyright coming first. Sorry I didn't notice on the one that was complained about on the mailing list.

14

I wonder if we should do something like this to facilitate search accessibility? This does have a regression over the draft in omitting "radio", but I can't think of any ways that aren't clunky.

16–32

Would you be willing to use this? Everywhere else in the manual for many generations SYNOPSIS means "list the options, no prose". Currently we have around 200/500 driver manuals written this way, and I gave a talk on trying to consolidate around doing it that way last year at BSDCan, and I also posted uncontested on arch@ in January. I have an open revision to update our style guides to do it this way (D54586), and some parts of the FreeBSD documentation primer suggested to do so since long before I showed up.

39

We should mention something about how it reports the buttons so readers can know how to use it. In hgame(4) last year I wrote "and presents them to applications over the evdev interface".

41–46

This paragraph is usually for CAVEATS.

46

This section gets pulled verbatim into the hardware compatibility list, I wrote about it a little in style.mdoc(5).

50

Traditionally no period here, because this is not a sentence.

53

Traditionally we use no period here, I think the linter will complain also. All the hid drivers appear to also have xrefs back and forth to hidbus(4).

obiwac marked 6 inline comments as done.

apply ziaee@'s suggestions

share/man/man4/hradio.4
2–4

i am really in favour of changing this in style(9). It doesn't make much sense to me to have this wedged inside the copyright header, especially for files with many copyright owners, and the vast majority of our tree and most of open source puts this as the first line.

14

this will be a more generic "radio" driver in the future, so I don't want to just call it "airplane mode key". I guess "rfkill" would be a better name here, and maybe even hrfkill would be a better name than hradio on second thought.

16–32

sure

Looks good from manpages! I defer to senior colleagues for the rest of the implementation.

share/man/man4/hradio.4
2–4

Ok I won't request changes on this, but please, take that up with srcmgr@, this is beyond my jurisdiction and changing style guides is well beyond the scope of this thread. IIUC, to be a good teammate I'm supposed to kindly ask you to follow the guidelines we have in place (which is consistent in many places). It's one thing if we have many different conflicting guidelines, like in the case of SYNOPSIS I'm trying to standardize.

16–32

Thanks!

This revision is now accepted and ready to land.Fri, Jun 26, 9:42 PM