Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: Add channel type for attention

Add a new channel type representing if the user's attention state to the
the system. This usually means if the user is looking at the screen or
not.

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Link: https://patch.msgid.link/20241101-hpd-v3-3-e9c80b7c7164@chromium.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Ricardo Ribalda and committed by
Jonathan Cameron
9d2fe9cd 9b20c3fe

+12
+8
Documentation/ABI/testing/sysfs-bus-iio
··· 2363 2363 Contact: linux-iio@vger.kernel.org 2364 2364 Description: 2365 2365 The value of current sense resistor in Ohms. 2366 + 2367 + What: /sys/.../iio:deviceX/in_attention_input 2368 + KernelVersion: 6.13 2369 + Contact: linux-iio@vger.kernel.org 2370 + Description: 2371 + Value representing the user's attention to the system expressed 2372 + in units as percentage. This usually means if the user is 2373 + looking at the screen or not.
+1
drivers/iio/industrialio-core.c
··· 95 95 [IIO_DELTA_VELOCITY] = "deltavelocity", 96 96 [IIO_COLORTEMP] = "colortemp", 97 97 [IIO_CHROMATICITY] = "chromaticity", 98 + [IIO_ATTENTION] = "attention", 98 99 }; 99 100 100 101 static const char * const iio_modifier_names[] = {
+1
include/uapi/linux/iio/types.h
··· 51 51 IIO_DELTA_VELOCITY, 52 52 IIO_COLORTEMP, 53 53 IIO_CHROMATICITY, 54 + IIO_ATTENTION, 54 55 }; 55 56 56 57 enum iio_modifier {
+2
tools/iio/iio_event_monitor.c
··· 63 63 [IIO_DELTA_VELOCITY] = "deltavelocity", 64 64 [IIO_COLORTEMP] = "colortemp", 65 65 [IIO_CHROMATICITY] = "chromaticity", 66 + [IIO_ATTENTION] = "attention", 66 67 }; 67 68 68 69 static const char * const iio_ev_type_text[] = { ··· 184 183 case IIO_DELTA_VELOCITY: 185 184 case IIO_COLORTEMP: 186 185 case IIO_CHROMATICITY: 186 + case IIO_ATTENTION: 187 187 break; 188 188 default: 189 189 return false;