Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Documentation/ABI/testing/sysfs-driver-aop-als
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
What: /sys/bus/iio/devices/iio:deviceX/in_cct_input
What: /sys/bus/iio/devices/iio:deviceX/in_colortemp_input
Date: October 2026
Contact: linux-iio@vger.kernel.org
Description:
Firmware-computed correlated colour temperature in Kelvin on
Firmware-computed light colour temperature (correlated colour
temperature) in Kelvin, processed, on
aop-sensors-als devices with a Redbird (VD6286) sensor.
Fractional Kelvin are reported with micro resolution. There
is no raw photodiode-to-CCT conversion in the host driver.
Expand Down
5 changes: 3 additions & 2 deletions Documentation/iio/apple-aop-als.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ must not be distributed with test fixtures.
The `public Redbird report description
<https://github.com/triutama133/ubuntu_asahi_patch/blob/3cb6569aaa56815e86b487111725a4d05406bd00/kernel-patches/README.md>`_
identifies a 122-byte report carrying a firmware-computed CCT float at byte
0x45. The driver exports that layout as ``in_cct_input``, in Kelvin, without
0x45. The driver exports that value as the standard IIO colour temperature
channel, ``in_colortemp_input``, processed and in Kelvin, without
recalculating colour temperature from raw channels. Other lengths do not
supply a CCT reading. This layout must be verified on each firmware family
before its CCT readings are used for display policy. The existing CT720 and
Expand All @@ -29,7 +30,7 @@ device number::
for d in /sys/bus/iio/devices/iio:device*; do
[ "$(cat "$d/name" 2>/dev/null)" = aop-sensors-als ] || continue
cat "$d/in_illuminance_input"
[ ! -e "$d/in_cct_input" ] || cat "$d/in_cct_input"
[ ! -e "$d/in_colortemp_input" ] || cat "$d/in_colortemp_input"
done

These attributes contain the last valid reading, not a sample counter. Polling
Expand Down
2 changes: 1 addition & 1 deletion drivers/iio/common/aop_sensors/aop_als.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ impl platform::Driver for IIOAopAlsDriver {
&adata,
service,
offset,
[ty, bindings::BINDINGS_IIO_CCT],
[ty, bindings::BINDINGS_IIO_COLORTEMP],
)?;
(
listener,
Expand Down
2 changes: 1 addition & 1 deletion rust/bindings/bindings_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const u32 BINDINGS_IIO_CHAN_INFO_PROCESSED = IIO_CHAN_INFO_PROCESSED;
const u32 BINDINGS_IIO_CHAN_INFO_SCALE = IIO_CHAN_INFO_SCALE;
const u32 BINDINGS_IIO_ANGL = IIO_ANGL;
const u32 BINDINGS_IIO_LIGHT = IIO_LIGHT;
const u32 BINDINGS_IIO_CCT = IIO_CCT;
const u32 BINDINGS_IIO_COLORTEMP = IIO_COLORTEMP;
const u32 BINDINGS_IIO_ACCEL = IIO_ACCEL;
const u32 BINDINGS_IIO_ANGL_VEL = IIO_ANGL_VEL;
const u32 BINDINGS_IIO_TIMESTAMP = IIO_TIMESTAMP;
Expand Down
2 changes: 1 addition & 1 deletion tools/testing/selftests/drivers/apple/j616s-parity.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
for device in pathlib.Path('/sys/bus/iio/devices').glob('iio:device*'):
try:
if (device / 'name').read_text().strip() == 'aop-sensors-als':
als += [device / 'in_illuminance_input', device / 'in_cct_input']
als += [device / 'in_illuminance_input', device / 'in_colortemp_input']
except OSError:
pass
paths += als
Expand Down