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

Configure Feed

Select the types of activity you want to include in your feed.

iio: core: Add IIO_EV_INFO_SCALE to event info

Implement support for IIO_EV_INFO_SCALE in the internal enum
iio_event_info to allow proper ABI compliance.

This allows drivers (like the ADXL345) to expose event scale
attributes using the standard IIO ABI rather than manual
device attributes.

Signed-off-by: Taha Ed-Dafili <0rayn.dev@gmail.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Taha Ed-Dafili and committed by
Jonathan Cameron
2a76a626 a1fe33e0

+2
+1
drivers/iio/industrialio-event.c
··· 256 256 [IIO_EV_INFO_TAP2_MIN_DELAY] = "tap2_min_delay", 257 257 [IIO_EV_INFO_RUNNING_PERIOD] = "runningperiod", 258 258 [IIO_EV_INFO_RUNNING_COUNT] = "runningcount", 259 + [IIO_EV_INFO_SCALE] = "scale", 259 260 }; 260 261 261 262 static enum iio_event_direction iio_ev_attr_dir(struct iio_dev_attr *attr)
+1
include/linux/iio/types.h
··· 21 21 IIO_EV_INFO_TAP2_MIN_DELAY, 22 22 IIO_EV_INFO_RUNNING_PERIOD, 23 23 IIO_EV_INFO_RUNNING_COUNT, 24 + IIO_EV_INFO_SCALE, 24 25 }; 25 26 26 27 #define IIO_VAL_INT 1