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
2363Contact: linux-iio@vger.kernel.org2363Contact: linux-iio@vger.kernel.org
2364Description:2364Description:
2365 The value of current sense resistor in Ohms.2365 The value of current sense resistor in Ohms.
2366
2367What: /sys/.../iio:deviceX/in_attention_input
2368KernelVersion: 6.13
2369Contact: linux-iio@vger.kernel.org
2370Description:
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
95 [IIO_DELTA_VELOCITY] = "deltavelocity",95 [IIO_DELTA_VELOCITY] = "deltavelocity",
96 [IIO_COLORTEMP] = "colortemp",96 [IIO_COLORTEMP] = "colortemp",
97 [IIO_CHROMATICITY] = "chromaticity",97 [IIO_CHROMATICITY] = "chromaticity",
98 [IIO_ATTENTION] = "attention",
98};99};
99 100
100static const char * const iio_modifier_names[] = {101static 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
51 IIO_DELTA_VELOCITY,51 IIO_DELTA_VELOCITY,
52 IIO_COLORTEMP,52 IIO_COLORTEMP,
53 IIO_CHROMATICITY,53 IIO_CHROMATICITY,
54 IIO_ATTENTION,
54};55};
55 56
56enum iio_modifier {57enum 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
63 [IIO_DELTA_VELOCITY] = "deltavelocity",63 [IIO_DELTA_VELOCITY] = "deltavelocity",
64 [IIO_COLORTEMP] = "colortemp",64 [IIO_COLORTEMP] = "colortemp",
65 [IIO_CHROMATICITY] = "chromaticity",65 [IIO_CHROMATICITY] = "chromaticity",
66 [IIO_ATTENTION] = "attention",
66};67};
67 68
68static const char * const iio_ev_type_text[] = {69static const char * const iio_ev_type_text[] = {
@@ -183,6 +184,7 @@ static bool event_is_known(struct iio_event_data *event) · 114 unmodified lines
183 case IIO_DELTA_VELOCITY:184 case IIO_DELTA_VELOCITY:
184 case IIO_COLORTEMP:185 case IIO_COLORTEMP:
185 case IIO_CHROMATICITY:186 case IIO_CHROMATICITY:
187 case IIO_ATTENTION:
186 break;188 break;
187 default:189 default:
188 return false;190 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