Bug 216552 - [new driver] acpi_asus_als: driver for the ambient light sensor on ASUS laptops
Summary: [new driver] acpi_asus_als: driver for the ambient light sensor on ASUS laptops
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-28 17:49 UTC by Henry Hu
Modified: 2024-10-28 19:27 UTC (History)
1 user (show)

See Also:


Attachments
patch for the driver (7.16 KB, patch)
2017-01-28 17:49 UTC, Henry Hu
no flags Details | Diff
add man page for the driver (11.16 KB, patch)
2017-01-28 18:12 UTC, Henry Hu
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Hu 2017-01-28 17:49:27 UTC
Created attachment 179378 [details]
patch for the driver

This driver calls the ACPI methods to obtain the ambient light sensor value on recent ASUS laptops.
It is inspired by the similar driver for Linux at https://github.com/victorenator/als. Only the specifications in the README file is referenced to.

It provides sysctl node hw.acpi.asus_als.light which contains the current light sensor value. The unit seems to be 0.01 lux (compared to a mobile phone).
This patch creates a new module under /sys/modules/acpi called acpi_asus_als. After loading the module, it attaches to ACPI device with hardware ID ACPI0008 and provides the sysctl node mentioned above.

This driver is tested under 12-CURRENT on an ASUS UX51VZ laptop.
Comment 1 Henry Hu 2017-01-28 18:12:01 UTC
Created attachment 179379 [details]
add man page for the driver