Page MenuHomeFreeBSD

acpi_system76: fix mis-spelled words and style headers
ClosedPublic

Authored by pouria on Mar 13 2026, 7:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 17, 9:40 AM
Unknown Object (File)
Thu, Apr 16, 12:59 PM
Unknown Object (File)
Sun, Apr 12, 6:04 PM
Unknown Object (File)
Wed, Apr 8, 9:55 AM
Unknown Object (File)
Mon, Apr 6, 7:59 AM
Unknown Object (File)
Sun, Apr 5, 1:19 PM
Unknown Object (File)
Wed, Mar 25, 2:36 AM
Unknown Object (File)
Tue, Mar 24, 11:19 AM
Subscribers

Details

Summary

Fixes: f87ba4522ec9e7 ("acpi_system76: Add support for ...")
Reported by: olce, jhb

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 71391
Build 68274: arc lint + arc unit

Event Timeline

sys/dev/acpi_support/acpi_system76.c
32–34

Sort headers (but not sys/param.h, see style(9)).

40

Move this line up in the #include <sys/XXX.h> block.

42

Please regroup this #include <dev/XXX> with the other above.

I'd also put the <contrib/dev/XXX> group after the <dev/XXX> one.

130–133

While here, there's only one low threshold. I'd suggest also to change the knob name as indicated, at least if the level passed is easy to correlate to the charge level. "min" (or "minimum") sees more explicit than "low", even if that is their EC's terminology.

134–140

Same as above.

pouria marked 4 inline comments as done.

Thank you!
@olce done.

olce added inline comments.
sys/dev/acpi_support/acpi_system76.c
133

For another change/revision, but while here: It would be nice to have the unit of this value in the description (percentage?), as well as some check that the value is in range when setting (if the range can be reliably known; if not, just let setting fail, hopefully). For the latter, you can use either another type than SYSCTL_UINT or just add a range test in the handler for S76_CTRL_BCTL (set direction; same for S76_CTRL_BCTH).

This revision is now accepted and ready to land.Mar 13 2026, 10:11 PM
sys/dev/acpi_support/acpi_system76.c
42

I can't. <dev/acpica/acpivar.h> requires <contrib/...> to be included first.

130–133

Done. Yes, it's their terminology.

133

Yes, it's in percentage. should I add " (percentage)" at the end of its description?
For input validation see below.

399–410

@olce I'm validating the sysctl inputs here.

sys/dev/acpi_support/acpi_system76.c
42

That's fine. I suspected such a problem.

133

Yes, that would be great.

399–410

Oh, right, missed that on second read (on first read I had seen it).

update sysctl descriptions.

This revision now requires review to proceed.Mar 14 2026, 9:31 AM
This revision was not accepted when it landed; it landed in state Needs Review.Mar 14 2026, 9:38 AM
This revision was automatically updated to reflect the committed changes.
pouria marked an inline comment as done.