mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 03:50:24 +09:00
iio: Add FIFO event for LSM6DSR sensor HUB
Add FIFO event type: * IIO_EV_TYPE_FIFO_FLUSH This change also adds FIFO event directions: * IIO_EV_DIR_FIFO_EMPTY (indicates the FIFO is empty) * IIO_EV_DIR_FIFO_DATA (indicates the FIFO is not empty) A FIFO flush event is triggered after the HW FIFO is flushed, and indicates that whether the HW FIFO is empty or not. Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com> Change-Id: Idb21bc271c7fd8def63f2cb29440ebf0677688d5
This commit is contained in:
@@ -228,12 +228,19 @@ static const char * const iio_ev_type_text[] = {
|
||||
[IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive",
|
||||
[IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive",
|
||||
[IIO_EV_TYPE_CHANGE] = "change",
|
||||
#ifdef CONFIG_NO_GKI
|
||||
[IIO_EV_TYPE_FIFO_FLUSH] = "fifo_flush",
|
||||
#endif
|
||||
};
|
||||
|
||||
static const char * const iio_ev_dir_text[] = {
|
||||
[IIO_EV_DIR_EITHER] = "either",
|
||||
[IIO_EV_DIR_RISING] = "rising",
|
||||
[IIO_EV_DIR_FALLING] = "falling"
|
||||
[IIO_EV_DIR_FALLING] = "falling",
|
||||
#ifdef CONFIG_NO_GKI
|
||||
[IIO_EV_DIR_FIFO_EMPTY] = "empty",
|
||||
[IIO_EV_DIR_FIFO_DATA] = "data",
|
||||
#endif
|
||||
};
|
||||
|
||||
static const char * const iio_ev_info_text[] = {
|
||||
|
||||
@@ -104,12 +104,19 @@ enum iio_event_type {
|
||||
IIO_EV_TYPE_THRESH_ADAPTIVE,
|
||||
IIO_EV_TYPE_MAG_ADAPTIVE,
|
||||
IIO_EV_TYPE_CHANGE,
|
||||
#ifdef CONFIG_NO_GKI
|
||||
IIO_EV_TYPE_FIFO_FLUSH,
|
||||
#endif
|
||||
};
|
||||
|
||||
enum iio_event_direction {
|
||||
IIO_EV_DIR_EITHER,
|
||||
IIO_EV_DIR_RISING,
|
||||
IIO_EV_DIR_FALLING,
|
||||
#ifdef CONFIG_NO_GKI
|
||||
IIO_EV_DIR_FIFO_EMPTY,
|
||||
IIO_EV_DIR_FIFO_DATA,
|
||||
#endif
|
||||
IIO_EV_DIR_NONE,
|
||||
};
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ configs=$(sed -e '
|
||||
#
|
||||
# The format is <file-name>:<CONFIG-option> in each line.
|
||||
config_leak_ignores="
|
||||
include/uapi/linux/iio/types.h:CONFIG_NO_GKI
|
||||
arch/alpha/include/uapi/asm/setup.h:CONFIG_ALPHA_LEGACY_START_ADDRESS
|
||||
arch/arc/include/uapi/asm/page.h:CONFIG_ARC_PAGE_SIZE_16K
|
||||
arch/arc/include/uapi/asm/page.h:CONFIG_ARC_PAGE_SIZE_4K
|
||||
|
||||
@@ -67,12 +67,19 @@ static const char * const iio_ev_type_text[] = {
|
||||
[IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive",
|
||||
[IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive",
|
||||
[IIO_EV_TYPE_CHANGE] = "change",
|
||||
#ifdef CONFIG_NO_GKI
|
||||
[IIO_EV_TYPE_FIFO_FLUSH] = "fifo_flush",
|
||||
#endif
|
||||
};
|
||||
|
||||
static const char * const iio_ev_dir_text[] = {
|
||||
[IIO_EV_DIR_EITHER] = "either",
|
||||
[IIO_EV_DIR_RISING] = "rising",
|
||||
[IIO_EV_DIR_FALLING] = "falling"
|
||||
[IIO_EV_DIR_FALLING] = "falling",
|
||||
#ifdef CONFIG_NO_GKI
|
||||
[IIO_EV_DIR_FIFO_EMPTY] = "empty",
|
||||
[IIO_EV_DIR_FIFO_DATA] = "data",
|
||||
#endif
|
||||
};
|
||||
|
||||
static const char * const iio_modifier_names[] = {
|
||||
|
||||
Reference in New Issue
Block a user