History

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.

Ricardo Ribalda committed 2 years ago

Commit 9d2fe9c1 parent 9b20c3f4 files · +12 −0Browse files

Unified · Split

4 files
  1. Documentation/ABI/testing/sysfs-bus-iio +8 −0
  2. drivers/iio/industrialio-core.c +1 −0
  3. include/uapi/linux/iio/types.h +1 −0
  4. tools/iio/iio_event_monitor.c +2 −0
Documentation/ABI/testing/sysfs-bus-iio+8−0
@@ -2363,3 +2363,11 @@ KernelVersion: 6.10 · 2362 unmodified lines
23632363 Contact: linux-iio@vger.kernel.org
23642364 Description:
23652365 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.
drivers/iio/industrialio-core.c+1−0
@@ -95,6 +95,7 @@ static const char * const iio_chan_type_name_spec[] = { · 94 unmodified lines
9595 [IIO_DELTA_VELOCITY] = "deltavelocity",
9696 [IIO_COLORTEMP] = "colortemp",
9797 [IIO_CHROMATICITY] = "chromaticity",
98+ [IIO_ATTENTION] = "attention",
9899 };
99100
100101 static const char * const iio_modifier_names[] = {
include/uapi/linux/iio/types.h+1−0
@@ -51,6 +51,7 @@ enum iio_chan_type { · 50 unmodified lines
5151 IIO_DELTA_VELOCITY,
5252 IIO_COLORTEMP,
5353 IIO_CHROMATICITY,
54+ IIO_ATTENTION,
5455 };
5556
5657 enum iio_modifier {
tools/iio/iio_event_monitor.c+2−0
@@ -63,6 +63,7 @@ static const char * const iio_chan_type_name_spec[] = { · 62 unmodified lines
6363 [IIO_DELTA_VELOCITY] = "deltavelocity",
6464 [IIO_COLORTEMP] = "colortemp",
6565 [IIO_CHROMATICITY] = "chromaticity",
66+ [IIO_ATTENTION] = "attention",
6667 };
6768
6869 static const char * const iio_ev_type_text[] = {
@@ -183,6 +184,7 @@ static bool event_is_known(struct iio_event_data *event) · 114 unmodified lines
183184 case IIO_DELTA_VELOCITY:
184185 case IIO_COLORTEMP:
185186 case IIO_CHROMATICITY:
187+ case IIO_ATTENTION:
186188 break;
187189 default:
188190 return false;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t