drivers:iio:stm: remove all custom types previously introduced in IIO
All the patches applied to the IIO framework file types.h have been removed, then concentrated and replaced with different ones (prefixed by STM_) in a single stm driver file: drivers/iio/stm/common/stm_iio_types.h which is expected to be shared with the application layer or hal. Signed-off-by: mariotesi <mario.tesi@st.com> Change-Id: I66ca184fe31f3b09bfe830187d9e3f096dd219f1 Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/323957 Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com> Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
This commit is contained in:
parent
b6abc92c02
commit
fd9092e177
@ -10,6 +10,8 @@
|
||||
#ifndef ST_ACC33_H
|
||||
#define ST_ACC33_H
|
||||
|
||||
#include "../common/stm_iio_types.h"
|
||||
|
||||
#define LIS2DH_DEV_NAME "lis2dh_accel"
|
||||
#define LIS2DH12_DEV_NAME "lis2dh12_accel"
|
||||
#define LIS3DH_DEV_NAME "lis3dh_accel"
|
||||
|
@ -116,7 +116,7 @@ ssize_t st_acc33_flush_hwfifo(struct device *device,
|
||||
mutex_unlock(&hw->fifo_lock);
|
||||
|
||||
code = IIO_UNMOD_EVENT_CODE(IIO_ACCEL, -1,
|
||||
IIO_EV_TYPE_FIFO_FLUSH,
|
||||
STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
IIO_EV_DIR_EITHER);
|
||||
iio_push_event(iio_dev, code, hw->ts_irq);
|
||||
|
||||
|
@ -118,7 +118,7 @@ static const struct st_acc33_fs st_acc33_fs_table[] = {
|
||||
};
|
||||
|
||||
const struct iio_event_spec st_acc33_fifo_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
|
@ -16,6 +16,8 @@
|
||||
#include <linux/platform_data/stm/ism303dac.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include "../common/stm_iio_types.h"
|
||||
|
||||
#if KERNEL_VERSION(5, 19, 0) <= LINUX_VERSION_CODE
|
||||
#include <linux/iio/iio-opaque.h>
|
||||
#endif /* LINUX_VERSION_CODE */
|
||||
|
@ -165,7 +165,7 @@ static const struct iio_event_spec singol_thr_event = {
|
||||
};
|
||||
|
||||
const struct iio_event_spec ism303dac_fifo_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
@ -198,7 +198,7 @@ static const struct ism303dac_sensors_table {
|
||||
.min_odr_hz = ISM303DAC_TAP_ODR,
|
||||
.iio_channel = {
|
||||
{
|
||||
.type = IIO_TAP,
|
||||
.type = STM_IIO_TAP,
|
||||
.channel = 0,
|
||||
.modified = 0,
|
||||
.event_spec = &singol_thr_event,
|
||||
@ -214,7 +214,7 @@ static const struct ism303dac_sensors_table {
|
||||
.min_odr_hz = ISM303DAC_TAP_ODR,
|
||||
.iio_channel = {
|
||||
{
|
||||
.type = IIO_TAP_TAP,
|
||||
.type = STM_IIO_TAP_TAP,
|
||||
.channel = 0,
|
||||
.modified = 0,
|
||||
.event_spec = &singol_thr_event,
|
||||
@ -918,12 +918,12 @@ ssize_t ism303dac_sysfs_flush_fifo(struct device *dev,
|
||||
sdata->cdata->timestamp = sensor_last_timestamp;
|
||||
|
||||
if (sensor_last_timestamp == sdata->cdata->sample_timestamp)
|
||||
event_type = IIO_EV_DIR_FIFO_EMPTY;
|
||||
event_type = STM_IIO_EV_DIR_FIFO_EMPTY;
|
||||
else
|
||||
event_type = IIO_EV_DIR_FIFO_DATA;
|
||||
event_type = STM_IIO_EV_DIR_FIFO_DATA;
|
||||
|
||||
iio_push_event(indio_dev, IIO_UNMOD_EVENT_CODE(IIO_ACCEL,
|
||||
-1, IIO_EV_TYPE_FIFO_FLUSH, event_type),
|
||||
-1, STM_IIO_EV_TYPE_FIFO_FLUSH, event_type),
|
||||
sensor_last_timestamp);
|
||||
|
||||
enable_irq(sdata->cdata->irq);
|
||||
|
@ -29,7 +29,7 @@ static void ism303dac_event_management(struct ism303dac_data *cdata,
|
||||
if (CHECK_BIT(cdata->enabled_sensor, ISM303DAC_TAP) &&
|
||||
(int_reg_val & ISM303DAC_TAP_MASK))
|
||||
iio_push_event(cdata->iio_sensors_dev[ISM303DAC_TAP],
|
||||
IIO_UNMOD_EVENT_CODE(IIO_TAP, 0,
|
||||
IIO_UNMOD_EVENT_CODE(STM_IIO_TAP, 0,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_EITHER),
|
||||
cdata->timestamp);
|
||||
@ -37,7 +37,7 @@ static void ism303dac_event_management(struct ism303dac_data *cdata,
|
||||
if (CHECK_BIT(cdata->enabled_sensor, ISM303DAC_DOUBLE_TAP) &&
|
||||
(int_reg_val & ISM303DAC_DOUBLE_TAP_MASK))
|
||||
iio_push_event(cdata->iio_sensors_dev[ISM303DAC_DOUBLE_TAP],
|
||||
IIO_UNMOD_EVENT_CODE(IIO_TAP_TAP, 0,
|
||||
IIO_UNMOD_EVENT_CODE(STM_IIO_TAP_TAP, 0,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_EITHER),
|
||||
cdata->timestamp);
|
||||
|
@ -16,6 +16,8 @@
|
||||
#include <linux/platform_data/stm/lis2ds12.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include "../common/stm_iio_types.h"
|
||||
|
||||
#if KERNEL_VERSION(5, 19, 0) <= LINUX_VERSION_CODE
|
||||
#include <linux/iio/iio-opaque.h>
|
||||
#endif /* LINUX_VERSION_CODE */
|
||||
|
@ -169,7 +169,7 @@ static const struct iio_event_spec singol_thr_event = {
|
||||
};
|
||||
|
||||
const struct iio_event_spec lis2ds12_fifo_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
@ -202,7 +202,7 @@ static const struct lis2ds12_sensors_table {
|
||||
.min_odr_hz = LIS2DS12_STEP_D_ODR,
|
||||
.iio_channel = {
|
||||
{
|
||||
.type = IIO_STEP_COUNTER,
|
||||
.type = STM_IIO_STEP_COUNTER,
|
||||
.channel = 0,
|
||||
.modified = 0,
|
||||
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
|
||||
@ -226,7 +226,7 @@ static const struct lis2ds12_sensors_table {
|
||||
.min_odr_hz = LIS2DS12_TAP_ODR,
|
||||
.iio_channel = {
|
||||
{
|
||||
.type = IIO_TAP,
|
||||
.type = STM_IIO_TAP,
|
||||
.channel = 0,
|
||||
.modified = 0,
|
||||
.event_spec = &singol_thr_event,
|
||||
@ -242,7 +242,7 @@ static const struct lis2ds12_sensors_table {
|
||||
.min_odr_hz = LIS2DS12_TAP_ODR,
|
||||
.iio_channel = {
|
||||
{
|
||||
.type = IIO_TAP_TAP,
|
||||
.type = STM_IIO_TAP_TAP,
|
||||
.channel = 0,
|
||||
.modified = 0,
|
||||
.event_spec = &singol_thr_event,
|
||||
@ -258,7 +258,7 @@ static const struct lis2ds12_sensors_table {
|
||||
.min_odr_hz = LIS2DS12_STEP_D_ODR,
|
||||
.iio_channel = {
|
||||
{
|
||||
.type = IIO_STEP_DETECTOR,
|
||||
.type = IIO_STEPS,
|
||||
.channel = 0,
|
||||
.modified = 0,
|
||||
.event_spec = &singol_thr_event,
|
||||
@ -274,7 +274,7 @@ static const struct lis2ds12_sensors_table {
|
||||
.min_odr_hz = LIS2DS12_TILT_ODR,
|
||||
.iio_channel = {
|
||||
{
|
||||
.type = IIO_TILT,
|
||||
.type = STM_IIO_TILT,
|
||||
.channel = 0,
|
||||
.modified = 0,
|
||||
.event_spec = &singol_thr_event,
|
||||
@ -290,7 +290,7 @@ static const struct lis2ds12_sensors_table {
|
||||
.min_odr_hz = LIS2DS12_SIGN_M_ODR,
|
||||
.iio_channel = {
|
||||
{
|
||||
.type = IIO_SIGN_MOTION,
|
||||
.type = STM_IIO_SIGN_MOTION,
|
||||
.channel = 0,
|
||||
.modified = 0,
|
||||
.event_spec = &singol_thr_event,
|
||||
@ -1090,12 +1090,12 @@ ssize_t lis2ds12_sysfs_flush_fifo(struct device *dev,
|
||||
sdata->cdata->timestamp = sensor_last_timestamp;
|
||||
|
||||
if (sensor_last_timestamp == sdata->cdata->sample_timestamp)
|
||||
event_type = IIO_EV_DIR_FIFO_EMPTY;
|
||||
event_type = STM_IIO_EV_DIR_FIFO_EMPTY;
|
||||
else
|
||||
event_type = IIO_EV_DIR_FIFO_DATA;
|
||||
event_type = STM_IIO_EV_DIR_FIFO_DATA;
|
||||
|
||||
iio_push_event(indio_dev, IIO_UNMOD_EVENT_CODE(IIO_ACCEL,
|
||||
-1, IIO_EV_TYPE_FIFO_FLUSH, event_type),
|
||||
-1, STM_IIO_EV_TYPE_FIFO_FLUSH, event_type),
|
||||
sensor_last_timestamp);
|
||||
|
||||
enable_irq(sdata->cdata->irq);
|
||||
|
@ -24,7 +24,7 @@ static void lis2ds12_event_management(struct lis2ds12_data *cdata, u8 int_reg_va
|
||||
if (CHECK_BIT(cdata->enabled_sensor, LIS2DS12_TAP) &&
|
||||
(int_reg_val & LIS2DS12_TAP_MASK))
|
||||
iio_push_event(cdata->iio_sensors_dev[LIS2DS12_TAP],
|
||||
IIO_UNMOD_EVENT_CODE(IIO_TAP, 0,
|
||||
IIO_UNMOD_EVENT_CODE(STM_IIO_TAP, 0,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_EITHER),
|
||||
cdata->timestamp);
|
||||
@ -32,7 +32,7 @@ static void lis2ds12_event_management(struct lis2ds12_data *cdata, u8 int_reg_va
|
||||
if (CHECK_BIT(cdata->enabled_sensor, LIS2DS12_DOUBLE_TAP) &&
|
||||
(int_reg_val & LIS2DS12_DOUBLE_TAP_MASK))
|
||||
iio_push_event(cdata->iio_sensors_dev[LIS2DS12_DOUBLE_TAP],
|
||||
IIO_UNMOD_EVENT_CODE(IIO_TAP_TAP, 0,
|
||||
IIO_UNMOD_EVENT_CODE(STM_IIO_TAP_TAP, 0,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_EITHER),
|
||||
cdata->timestamp);
|
||||
@ -40,7 +40,7 @@ static void lis2ds12_event_management(struct lis2ds12_data *cdata, u8 int_reg_va
|
||||
if (ck_gate_val & LIS2DS12_FUNC_CK_GATE_STEP_D_MASK) {
|
||||
if (CHECK_BIT(cdata->enabled_sensor, LIS2DS12_STEP_D))
|
||||
iio_push_event(cdata->iio_sensors_dev[LIS2DS12_STEP_D],
|
||||
IIO_UNMOD_EVENT_CODE(IIO_STEP_DETECTOR, 0,
|
||||
IIO_UNMOD_EVENT_CODE(IIO_STEPS, 0,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_EITHER),
|
||||
cdata->timestamp);
|
||||
@ -52,7 +52,7 @@ static void lis2ds12_event_management(struct lis2ds12_data *cdata, u8 int_reg_va
|
||||
if (CHECK_BIT(cdata->enabled_sensor, LIS2DS12_TILT) &&
|
||||
(ck_gate_val & LIS2DS12_FUNC_CK_GATE_TILT_INT_MASK))
|
||||
iio_push_event(cdata->iio_sensors_dev[LIS2DS12_TILT],
|
||||
IIO_UNMOD_EVENT_CODE(IIO_TILT, 0,
|
||||
IIO_UNMOD_EVENT_CODE(STM_IIO_TILT, 0,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_EITHER),
|
||||
cdata->timestamp);
|
||||
@ -60,7 +60,7 @@ static void lis2ds12_event_management(struct lis2ds12_data *cdata, u8 int_reg_va
|
||||
if (CHECK_BIT(cdata->enabled_sensor, LIS2DS12_SIGN_M) &&
|
||||
(ck_gate_val & LIS2DS12_FUNC_CK_GATE_SIGN_M_DET_MASK))
|
||||
iio_push_event(cdata->iio_sensors_dev[LIS2DS12_SIGN_M],
|
||||
IIO_UNMOD_EVENT_CODE(IIO_SIGN_MOTION, 0,
|
||||
IIO_UNMOD_EVENT_CODE(STM_IIO_SIGN_MOTION, 0,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_EITHER),
|
||||
cdata->timestamp);
|
||||
|
@ -16,6 +16,8 @@
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/bitfield.h>
|
||||
|
||||
#include "../common/stm_iio_types.h"
|
||||
|
||||
#define ST_LIS2DUXS12_ODR_EXPAND(odr, uodr) (((odr) * 1000000) + (uodr))
|
||||
|
||||
#define ST_LIS2DUX12_DEV_NAME "lis2dux12"
|
||||
@ -328,7 +330,7 @@ struct __packed raw_data_t {
|
||||
}
|
||||
|
||||
static const struct iio_event_spec st_lis2duxs12_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
|
@ -26,7 +26,7 @@ static const unsigned long st_lis2duxs12_event_available_scan_masks[] = {
|
||||
|
||||
static const struct iio_chan_spec st_lis2duxs12_wk_channels[] = {
|
||||
{
|
||||
.type = IIO_GESTURE,
|
||||
.type = STM_IIO_GESTURE,
|
||||
.scan_index = 0,
|
||||
.scan_type = {
|
||||
.sign = 'u',
|
||||
@ -38,28 +38,28 @@ static const struct iio_chan_spec st_lis2duxs12_wk_channels[] = {
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lis2duxs12_ff_channels[] = {
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(IIO_GESTURE, thr),
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(STM_IIO_GESTURE, thr),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(1),
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lis2duxs12_tap_channels[] = {
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(IIO_TAP, thr),
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(STM_IIO_TAP, thr),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(1),
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lis2duxs12_dtap_channels[] = {
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(IIO_TAP_TAP, thr),
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(STM_IIO_TAP_TAP, thr),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(1),
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lis2duxs12_ttap_channels[] = {
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(IIO_GESTURE, thr),
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(STM_IIO_GESTURE, thr),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(1),
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lis2duxs12_6D_channels[] = {
|
||||
{
|
||||
.type = IIO_GESTURE,
|
||||
.type = STM_IIO_GESTURE,
|
||||
.scan_index = 0,
|
||||
.scan_type = {
|
||||
.sign = 'u',
|
||||
@ -71,7 +71,7 @@ static const struct iio_chan_spec st_lis2duxs12_6D_channels[] = {
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lis2duxs12_sleepchange_channels[] = {
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(IIO_GESTURE, thr),
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(STM_IIO_GESTURE, thr),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(1),
|
||||
};
|
||||
|
||||
@ -834,7 +834,7 @@ int st_lis2duxs12_event_handler(struct st_lis2duxs12_hw *hw)
|
||||
|
||||
if (status & ST_LIS2DUXS12_FF_IA_ALL_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LIS2DUXS12_ID_FF];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_GESTURE, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_GESTURE, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -849,7 +849,7 @@ int st_lis2duxs12_event_handler(struct st_lis2duxs12_hw *hw)
|
||||
}
|
||||
if (status & ST_LIS2DUXS12_SLEEP_CHANGE_ALL_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LIS2DUXS12_ID_SC];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_GESTURE, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_GESTURE, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -864,7 +864,7 @@ int st_lis2duxs12_event_handler(struct st_lis2duxs12_hw *hw)
|
||||
}
|
||||
if (status & ST_LIS2DUXS12_SINGLE_TAP_ALL_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LIS2DUXS12_ID_TAP];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_TAP, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_TAP, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -872,7 +872,7 @@ int st_lis2duxs12_event_handler(struct st_lis2duxs12_hw *hw)
|
||||
}
|
||||
if (status & ST_LIS2DUXS12_DOUBLE_TAP_ALL_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LIS2DUXS12_ID_DTAP];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_TAP_TAP, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_TAP_TAP, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -881,7 +881,7 @@ int st_lis2duxs12_event_handler(struct st_lis2duxs12_hw *hw)
|
||||
if (status & ST_LIS2DUXS12_TRIPLE_TAP_ALL_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LIS2DUXS12_ID_TTAP];
|
||||
/* triple tap is not available as IIO type */
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_GESTURE, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_GESTURE, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
|
@ -399,9 +399,9 @@ ssize_t st_lis2duxs12_flush_fifo(struct device *dev,
|
||||
fts = ts;
|
||||
mutex_unlock(&hw->fifo_lock);
|
||||
|
||||
type = count > 0 ? IIO_EV_DIR_FIFO_DATA : IIO_EV_DIR_FIFO_EMPTY;
|
||||
type = count > 0 ? STM_IIO_EV_DIR_FIFO_DATA : STM_IIO_EV_DIR_FIFO_EMPTY;
|
||||
event = IIO_UNMOD_EVENT_CODE(iio_dev->channels[0].type, -1,
|
||||
IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
STM_IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
iio_push_event(iio_dev, event, fts);
|
||||
|
||||
return size;
|
||||
@ -560,7 +560,7 @@ static irqreturn_t st_lis2duxs12_handler_thread(int irq, void *private)
|
||||
/* embedded function sensors */
|
||||
if (status & ST_LIS2DUXS12_IS_STEP_DET_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LIS2DUXS12_ID_STEP_DETECTOR];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_STEP_DETECTOR, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_STEPS, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -569,7 +569,7 @@ static irqreturn_t st_lis2duxs12_handler_thread(int irq, void *private)
|
||||
|
||||
if (status & ST_LIS2DUXS12_IS_SIGMOT_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LIS2DUXS12_ID_SIGN_MOTION];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_SIGN_MOTION, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_SIGN_MOTION, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -578,7 +578,7 @@ static irqreturn_t st_lis2duxs12_handler_thread(int irq, void *private)
|
||||
|
||||
if (status & ST_LIS2DUXS12_IS_TILT_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LIS2DUXS12_ID_TILT];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_TILT, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_TILT, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
|
@ -228,7 +228,7 @@ static const struct iio_chan_spec st_lis2duxs12_temp_channels[] = {
|
||||
static const struct
|
||||
iio_chan_spec st_lis2duxs12_step_counter_channels[] = {
|
||||
{
|
||||
.type = IIO_STEP_COUNTER,
|
||||
.type = STM_IIO_STEP_COUNTER,
|
||||
.scan_index = 0,
|
||||
.scan_type = {
|
||||
.sign = 'u',
|
||||
@ -237,22 +237,22 @@ iio_chan_spec st_lis2duxs12_step_counter_channels[] = {
|
||||
.endianness = IIO_LE,
|
||||
},
|
||||
},
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(IIO_STEP_COUNTER, flush),
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(STM_IIO_STEP_COUNTER, flush),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(1),
|
||||
};
|
||||
|
||||
static const struct
|
||||
iio_chan_spec st_lis2duxs12_step_detector_channels[] = {
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(IIO_STEP_DETECTOR, thr),
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(IIO_STEPS, thr),
|
||||
};
|
||||
|
||||
static const struct
|
||||
iio_chan_spec st_lis2duxs12_sign_motion_channels[] = {
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(IIO_SIGN_MOTION, thr),
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(STM_IIO_SIGN_MOTION, thr),
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lis2duxs12_tilt_channels[] = {
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(IIO_TILT, thr),
|
||||
ST_LIS2DUXS12_EVENT_CHANNEL(STM_IIO_TILT, thr),
|
||||
};
|
||||
|
||||
static const unsigned long st_lis2duxs12_available_scan_masks[] = {
|
||||
|
@ -15,6 +15,8 @@
|
||||
#include <linux/iio/iio.h>
|
||||
#include <linux/of_device.h>
|
||||
|
||||
#include "../common/stm_iio_types.h"
|
||||
|
||||
#define ST_LIS2DW12_DEV_NAME "lis2dw12"
|
||||
#define ST_IIS2DLPC_DEV_NAME "iis2dlpc"
|
||||
#define ST_AIS2IH_DEV_NAME "ais2ih"
|
||||
|
@ -196,7 +196,7 @@ ssize_t st_lis2dw12_flush_fifo(struct device *dev,
|
||||
mutex_unlock(&hw->fifo_lock);
|
||||
|
||||
code = IIO_UNMOD_EVENT_CODE(IIO_ACCEL, -1,
|
||||
IIO_EV_TYPE_FIFO_FLUSH,
|
||||
STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
IIO_EV_DIR_EITHER);
|
||||
iio_push_event(iio_dev, code, hw->ts_irq);
|
||||
|
||||
@ -251,7 +251,7 @@ static irqreturn_t st_lis2dw12_handler_thread(int irq, void *private)
|
||||
/* Consider can have Tap and Double Tap events contemporarely */
|
||||
if (source & ST_LIS2DW12_DTAP_SRC_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LIS2DW12_ID_TAP_TAP];
|
||||
type = IIO_TAP_TAP;
|
||||
type = STM_IIO_TAP_TAP;
|
||||
code = IIO_UNMOD_EVENT_CODE(type, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
@ -261,7 +261,7 @@ static irqreturn_t st_lis2dw12_handler_thread(int irq, void *private)
|
||||
|
||||
if (source & ST_LIS2DW12_STAP_SRC_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LIS2DW12_ID_TAP];
|
||||
type = IIO_TAP;
|
||||
type = STM_IIO_TAP;
|
||||
code = IIO_UNMOD_EVENT_CODE(type, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
@ -278,10 +278,10 @@ static irqreturn_t st_lis2dw12_handler_thread(int irq, void *private)
|
||||
if (err < 0)
|
||||
return IRQ_HANDLED;
|
||||
|
||||
code = IIO_UNMOD_EVENT_CODE(IIO_TAP_TAP, -1,
|
||||
code = IIO_UNMOD_EVENT_CODE(STM_IIO_TAP_TAP, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(hw->iio_devs[ST_LIS2DW12_ID_WU], IIO_GESTURE,
|
||||
iio_push_event(hw->iio_devs[ST_LIS2DW12_ID_WU], STM_IIO_GESTURE,
|
||||
st_lis2dw12_get_timestamp(hw));
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ struct st_lis2dw12_selftest_req st_lis2dw12_selftest_table[] = {
|
||||
}
|
||||
|
||||
const struct iio_event_spec st_lis2dw12_fifo_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
@ -189,15 +189,15 @@ static const struct iio_chan_spec st_lis2dw12_acc_channels[] = {
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lis2dw12_tap_tap_channels[] = {
|
||||
ST_LIS2DW12_EVENT_CHANNEL(IIO_TAP_TAP, &st_lis2dw12_rthr_event),
|
||||
ST_LIS2DW12_EVENT_CHANNEL(STM_IIO_TAP_TAP, &st_lis2dw12_rthr_event),
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lis2dw12_tap_channels[] = {
|
||||
ST_LIS2DW12_EVENT_CHANNEL(IIO_TAP, &st_lis2dw12_rthr_event),
|
||||
ST_LIS2DW12_EVENT_CHANNEL(STM_IIO_TAP, &st_lis2dw12_rthr_event),
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lis2dw12_wu_channels[] = {
|
||||
ST_LIS2DW12_EVENT_CHANNEL(IIO_GESTURE, &st_lis2dw12_rthr_event),
|
||||
ST_LIS2DW12_EVENT_CHANNEL(STM_IIO_GESTURE, &st_lis2dw12_rthr_event),
|
||||
};
|
||||
|
||||
int st_lis2dw12_write_with_mask(struct st_lis2dw12_hw *hw, u8 addr, u8 mask,
|
||||
|
@ -15,6 +15,8 @@
|
||||
#include <linux/iio/trigger.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include "../common/stm_iio_types.h"
|
||||
|
||||
#if KERNEL_VERSION(5, 19, 0) <= LINUX_VERSION_CODE
|
||||
#include <linux/iio/iio-opaque.h>
|
||||
#endif /* LINUX_VERSION_CODE */
|
||||
|
@ -25,9 +25,9 @@
|
||||
#include <asm/unaligned.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/platform_data/stm/lis2hh12.h>
|
||||
|
||||
#include "st_lis2hh12.h"
|
||||
#include <linux/platform_data/stm/lis2hh12.h>
|
||||
|
||||
#define ST_LIS2HH12_DEV_ATTR_SAMP_FREQ() \
|
||||
IIO_DEV_ATTR_SAMP_FREQ(S_IWUSR | S_IRUGO, \
|
||||
@ -110,7 +110,7 @@ static struct lis2hh12_fs_table {
|
||||
};
|
||||
|
||||
const struct iio_event_spec lis2hh12_fifo_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
@ -493,12 +493,12 @@ ssize_t lis2hh12_sysfs_flush_fifo(struct device *dev,
|
||||
lis2hh12_read_fifo(sdata->cdata, true);
|
||||
|
||||
if (sensor_last_timestamp == sdata->cdata->sensor_timestamp)
|
||||
event_type = IIO_EV_DIR_FIFO_EMPTY;
|
||||
event_type = STM_IIO_EV_DIR_FIFO_EMPTY;
|
||||
else
|
||||
event_type = IIO_EV_DIR_FIFO_DATA;
|
||||
event_type = STM_IIO_EV_DIR_FIFO_DATA;
|
||||
|
||||
iio_push_event(indio_dev, IIO_UNMOD_EVENT_CODE(IIO_ACCEL,
|
||||
-1, IIO_EV_TYPE_FIFO_FLUSH, event_type),
|
||||
-1, STM_IIO_EV_TYPE_FIFO_FLUSH, event_type),
|
||||
sdata->cdata->sensor_timestamp);
|
||||
|
||||
enable_irq(sdata->cdata->irq);
|
||||
|
@ -66,7 +66,7 @@
|
||||
}
|
||||
|
||||
const struct iio_event_spec st_lis3dhh_fifo_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
|
@ -13,6 +13,8 @@
|
||||
|
||||
#include <linux/iio/iio.h>
|
||||
|
||||
#include "../common/stm_iio_types.h"
|
||||
|
||||
#define ST_LIS3DHH_DATA_SIZE 6
|
||||
#define ST_LIS3DHH_RX_MAX_LENGTH 96
|
||||
#define ST_LIS3DHH_TX_MAX_LENGTH 8
|
||||
|
@ -114,7 +114,7 @@ ssize_t st_lis3dhh_flush_hwfifo(struct device *device,
|
||||
mutex_unlock(&hw->fifo_lock);
|
||||
|
||||
code = IIO_UNMOD_EVENT_CODE(IIO_ACCEL, -1,
|
||||
IIO_EV_TYPE_FIFO_FLUSH,
|
||||
STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
IIO_EV_DIR_EITHER);
|
||||
iio_push_event(iio_dev, code, hw->ts_irq);
|
||||
|
||||
|
38
drivers/iio/stm/common/stm_iio_types.h
Normal file
38
drivers/iio/stm/common/stm_iio_types.h
Normal file
@ -0,0 +1,38 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* STMicroelectronics IIO custom types
|
||||
*
|
||||
* MEMS Software Solutions Team
|
||||
*
|
||||
* Copyright 2023 STMicroelectronics Inc.
|
||||
*/
|
||||
|
||||
#ifndef __STM_IIO_CUSTOM_TYPE__
|
||||
#define __STM_IIO_CUSTOM_TYPE__
|
||||
|
||||
/* Linux IIO driver custom types */
|
||||
enum {
|
||||
STM_IIO_LAST = 0x3f,
|
||||
STM_IIO_SIGN_MOTION = STM_IIO_LAST - 6,
|
||||
STM_IIO_STEP_COUNTER = STM_IIO_LAST - 5,
|
||||
STM_IIO_TILT = STM_IIO_LAST - 4,
|
||||
STM_IIO_TAP = STM_IIO_LAST - 3,
|
||||
STM_IIO_TAP_TAP = STM_IIO_LAST - 2,
|
||||
STM_IIO_WRIST_TILT_GESTURE = STM_IIO_LAST - 1,
|
||||
STM_IIO_GESTURE = STM_IIO_LAST,
|
||||
};
|
||||
|
||||
enum {
|
||||
STM_IIO_EV_DIR_LAST = 0x1f,
|
||||
STM_IIO_EV_DIR_FIFO_EMPTY = STM_IIO_EV_DIR_LAST - 1,
|
||||
STM_IIO_EV_DIR_FIFO_DATA = STM_IIO_EV_DIR_LAST,
|
||||
};
|
||||
|
||||
enum {
|
||||
STM_IIO_EV_TYPE_LAST = 0x1f,
|
||||
STM_IIO_EV_TYPE_FIFO_FLUSH = STM_IIO_EV_TYPE_LAST - 1,
|
||||
STM_IIO_EV_TYPE_TIME_SYNC = STM_IIO_EV_TYPE_LAST,
|
||||
};
|
||||
|
||||
#endif /* __STM_IIO_CUSTOM_TYPE__ */
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#include "../../common/stm_iio_types.h"
|
||||
|
||||
#define ST_ASM330LHHX_DEBUG_DISCHARGE
|
||||
|
||||
#define ST_ASM330LHHX_MAX_ODR 833
|
||||
@ -240,7 +242,7 @@
|
||||
}
|
||||
|
||||
static const struct iio_event_spec st_asm330lhhx_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
|
@ -420,9 +420,9 @@ ssize_t st_asm330lhhx_flush_fifo(struct device *dev,
|
||||
fts = sensor->last_fifo_timestamp;
|
||||
mutex_unlock(&hw->fifo_lock);
|
||||
|
||||
type = count > 0 ? IIO_EV_DIR_FIFO_DATA : IIO_EV_DIR_FIFO_EMPTY;
|
||||
type = count > 0 ? STM_IIO_EV_DIR_FIFO_DATA : STM_IIO_EV_DIR_FIFO_EMPTY;
|
||||
event = IIO_UNMOD_EVENT_CODE(iio_dev->channels[0].type, -1,
|
||||
IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
STM_IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
iio_push_event(iio_dev, event, fts);
|
||||
|
||||
return size;
|
||||
|
@ -50,7 +50,7 @@ static const unsigned long st_asm330lhhx_event_available_scan_masks[] = {
|
||||
|
||||
static const struct iio_chan_spec st_asm330lhhx_wk_channels[] = {
|
||||
{
|
||||
.type = IIO_GESTURE,
|
||||
.type = STM_IIO_GESTURE,
|
||||
.scan_index = 0,
|
||||
.scan_type = {
|
||||
.sign = 'u',
|
||||
@ -62,16 +62,16 @@ static const struct iio_chan_spec st_asm330lhhx_wk_channels[] = {
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_asm330lhhx_ff_channels[] = {
|
||||
ST_ASM330LHHX_EVENT_CHANNEL(IIO_GESTURE, thr),
|
||||
ST_ASM330LHHX_EVENT_CHANNEL(STM_IIO_GESTURE, thr),
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_asm330lhhx_sc_channels[] = {
|
||||
ST_ASM330LHHX_EVENT_CHANNEL(IIO_GESTURE, thr),
|
||||
ST_ASM330LHHX_EVENT_CHANNEL(STM_IIO_GESTURE, thr),
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_asm330lhhx_6D_channels[] = {
|
||||
{
|
||||
.type = IIO_GESTURE,
|
||||
.type = STM_IIO_GESTURE,
|
||||
.scan_index = 0,
|
||||
.scan_type = {
|
||||
.sign = 'u',
|
||||
@ -469,7 +469,7 @@ int st_asm330lhhx_event_handler(struct st_asm330lhhx_hw *hw)
|
||||
/* base function sensors */
|
||||
if (status & ST_ASM330LHHX_FF_IA_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_ASM330LHHX_ID_FF];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_GESTURE, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_GESTURE, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -484,7 +484,7 @@ int st_asm330lhhx_event_handler(struct st_asm330lhhx_hw *hw)
|
||||
}
|
||||
if (status & ST_ASM330LHHX_SLEEP_CHANGE_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_ASM330LHHX_ID_SC];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_GESTURE, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_GESTURE, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
|
@ -36,9 +36,9 @@ static void st_asm330lhhx_read_hw_timestamp(struct st_asm330lhhx_hw *hw)
|
||||
ST_ASM330LHHX_TSYNC_OFFSET_NS;
|
||||
|
||||
eventLSB = IIO_EVENT_CODE(IIO_COUNT, 0, 0, 0,
|
||||
IIO_EV_TYPE_TIME_SYNC, 0, 0, 0);
|
||||
STM_IIO_EV_TYPE_TIME_SYNC, 0, 0, 0);
|
||||
eventMSB = IIO_EVENT_CODE(IIO_COUNT, 0, 0, 1,
|
||||
IIO_EV_TYPE_TIME_SYNC, 0, 0, 0);
|
||||
STM_IIO_EV_TYPE_TIME_SYNC, 0, 0, 0);
|
||||
|
||||
spin_lock_irq(&hw->hwtimestamp_lock);
|
||||
timestamp_hw_global = (hw->hw_timestamp_global & GENMASK_ULL(63, 32)) |
|
||||
|
@ -14,6 +14,8 @@
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include "../../common/stm_iio_types.h"
|
||||
|
||||
#define ST_LSM9DS1_DEV_NAME "lsm9ds1"
|
||||
|
||||
#define ST_IMU68_OUT_LEN 6
|
||||
|
@ -15,6 +15,8 @@
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
#include "../../common/stm_iio_types.h"
|
||||
|
||||
#define ST_ISM330DHCX_MAX_ODR 833
|
||||
#define ST_ISM330DHCX_ODR_LIST_SIZE 8
|
||||
#define ST_ISM330DHCX_ODR_EXPAND(odr, uodr) ((odr * 1000000) + uodr)
|
||||
@ -136,7 +138,7 @@
|
||||
}
|
||||
|
||||
static const struct iio_event_spec st_ism330dhcx_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
|
@ -540,9 +540,9 @@ ssize_t st_ism330dhcx_flush_fifo(struct device *dev,
|
||||
else
|
||||
fts = ts;
|
||||
|
||||
type = count > 0 ? IIO_EV_DIR_FIFO_DATA : IIO_EV_DIR_FIFO_EMPTY;
|
||||
type = count > 0 ? STM_IIO_EV_DIR_FIFO_DATA : STM_IIO_EV_DIR_FIFO_EMPTY;
|
||||
event = IIO_UNMOD_EVENT_CODE(iio_dev->channels[0].type, -1,
|
||||
IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
STM_IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
iio_push_event(iio_dev, event, fts);
|
||||
|
||||
return size;
|
||||
@ -766,7 +766,7 @@ static irqreturn_t st_ism330dhcx_handler_thread(int irq, void *private)
|
||||
/* embedded function sensors */
|
||||
if (status[0] & ST_ISM330DHCX_REG_INT_STEP_DET_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_ISM330DHCX_ID_STEP_DETECTOR];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_STEP_DETECTOR, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_STEPS, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -774,7 +774,7 @@ static irqreturn_t st_ism330dhcx_handler_thread(int irq, void *private)
|
||||
}
|
||||
if (status[0] & ST_ISM330DHCX_REG_INT_SIGMOT_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_ISM330DHCX_ID_SIGN_MOTION];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_SIGN_MOTION, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_SIGN_MOTION, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -782,7 +782,7 @@ static irqreturn_t st_ism330dhcx_handler_thread(int irq, void *private)
|
||||
}
|
||||
if (status[0] & ST_ISM330DHCX_REG_INT_TILT_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_ISM330DHCX_ID_TILT];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_TILT, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_TILT, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -791,7 +791,7 @@ static irqreturn_t st_ism330dhcx_handler_thread(int irq, void *private)
|
||||
/* fsm sensors */
|
||||
if (status[1] & ST_ISM330DHCX_REG_INT_GLANCE_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_ISM330DHCX_ID_GLANCE];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_GESTURE, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_GESTURE, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -799,7 +799,7 @@ static irqreturn_t st_ism330dhcx_handler_thread(int irq, void *private)
|
||||
}
|
||||
if (status[1] & ST_ISM330DHCX_REG_INT_MOTION_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_ISM330DHCX_ID_MOTION];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_GESTURE, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_GESTURE, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -807,7 +807,7 @@ static irqreturn_t st_ism330dhcx_handler_thread(int irq, void *private)
|
||||
}
|
||||
if (status[1] & ST_ISM330DHCX_REG_INT_NO_MOTION_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_ISM330DHCX_ID_NO_MOTION];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_GESTURE, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_GESTURE, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -815,7 +815,7 @@ static irqreturn_t st_ism330dhcx_handler_thread(int irq, void *private)
|
||||
}
|
||||
if (status[1] & ST_ISM330DHCX_REG_INT_WAKEUP_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_ISM330DHCX_ID_WAKEUP];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_GESTURE, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_GESTURE, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -823,7 +823,7 @@ static irqreturn_t st_ism330dhcx_handler_thread(int irq, void *private)
|
||||
}
|
||||
if (status[1] & ST_ISM330DHCX_REG_INT_PICKUP_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_ISM330DHCX_ID_PICKUP];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_GESTURE, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_GESTURE, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -838,7 +838,7 @@ static irqreturn_t st_ism330dhcx_handler_thread(int irq, void *private)
|
||||
}
|
||||
if (status[1] & ST_ISM330DHCX_REG_INT_WRIST_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_ISM330DHCX_ID_WRIST_TILT];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_GESTURE, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_GESTURE, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
|
@ -273,7 +273,7 @@ static const struct iio_chan_spec st_ism330dhcx_gyro_channels[] = {
|
||||
*/
|
||||
static const struct iio_chan_spec st_ism330dhcx_step_counter_channels[] = {
|
||||
{
|
||||
.type = IIO_STEP_COUNTER,
|
||||
.type = STM_IIO_STEP_COUNTER,
|
||||
.scan_index = 0,
|
||||
.scan_type = {
|
||||
.sign = 'u',
|
||||
@ -282,7 +282,7 @@ static const struct iio_chan_spec st_ism330dhcx_step_counter_channels[] = {
|
||||
.endianness = IIO_LE,
|
||||
},
|
||||
},
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(IIO_STEP_COUNTER, flush),
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(STM_IIO_STEP_COUNTER, flush),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(1),
|
||||
};
|
||||
|
||||
@ -293,7 +293,7 @@ static const struct iio_chan_spec st_ism330dhcx_step_counter_channels[] = {
|
||||
* Step detection event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_ism330dhcx_step_detector_channels[] = {
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(IIO_STEP_DETECTOR, thr),
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(IIO_STEPS, thr),
|
||||
};
|
||||
|
||||
/**
|
||||
@ -303,7 +303,7 @@ static const struct iio_chan_spec st_ism330dhcx_step_detector_channels[] = {
|
||||
* Significant Motion event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_ism330dhcx_sign_motion_channels[] = {
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(IIO_SIGN_MOTION, thr),
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(STM_IIO_SIGN_MOTION, thr),
|
||||
};
|
||||
|
||||
/**
|
||||
@ -313,7 +313,7 @@ static const struct iio_chan_spec st_ism330dhcx_sign_motion_channels[] = {
|
||||
* Tilt event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_ism330dhcx_tilt_channels[] = {
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(IIO_TILT, thr),
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(STM_IIO_TILT, thr),
|
||||
};
|
||||
|
||||
/**
|
||||
@ -351,7 +351,7 @@ static const struct iio_chan_spec st_ism330dhcx_temp_channels[] = {
|
||||
* Glance event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_ism330dhcx_glance_channels[] = {
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(IIO_GESTURE, thr),
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(STM_IIO_GESTURE, thr),
|
||||
};
|
||||
|
||||
/**
|
||||
@ -361,7 +361,7 @@ static const struct iio_chan_spec st_ism330dhcx_glance_channels[] = {
|
||||
* Motion event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_ism330dhcx_motion_channels[] = {
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(IIO_GESTURE, thr),
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(STM_IIO_GESTURE, thr),
|
||||
};
|
||||
|
||||
/**
|
||||
@ -371,7 +371,7 @@ static const struct iio_chan_spec st_ism330dhcx_motion_channels[] = {
|
||||
* No Motion event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_ism330dhcx_no_motion_channels[] = {
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(IIO_GESTURE, thr),
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(STM_IIO_GESTURE, thr),
|
||||
};
|
||||
|
||||
/**
|
||||
@ -381,7 +381,7 @@ static const struct iio_chan_spec st_ism330dhcx_no_motion_channels[] = {
|
||||
* Wakeup event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_ism330dhcx_wakeup_channels[] = {
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(IIO_GESTURE, thr),
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(STM_IIO_GESTURE, thr),
|
||||
};
|
||||
|
||||
/**
|
||||
@ -391,7 +391,7 @@ static const struct iio_chan_spec st_ism330dhcx_wakeup_channels[] = {
|
||||
* Pickup event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_ism330dhcx_pickup_channels[] = {
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(IIO_GESTURE, thr),
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(STM_IIO_GESTURE, thr),
|
||||
};
|
||||
|
||||
/**
|
||||
@ -403,7 +403,7 @@ static const struct iio_chan_spec st_ism330dhcx_pickup_channels[] = {
|
||||
*/
|
||||
static const struct iio_chan_spec st_ism330dhcx_orientation_channels[] = {
|
||||
{
|
||||
.type = IIO_GESTURE,
|
||||
.type = STM_IIO_GESTURE,
|
||||
.scan_index = 0,
|
||||
.scan_type = {
|
||||
.sign = 'u',
|
||||
@ -421,7 +421,7 @@ static const struct iio_chan_spec st_ism330dhcx_orientation_channels[] = {
|
||||
* Wrist event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_ism330dhcx_wrist_channels[] = {
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(IIO_GESTURE, thr),
|
||||
ST_ISM330DHCX_EVENT_CHANNEL(STM_IIO_GESTURE, thr),
|
||||
};
|
||||
|
||||
int __st_ism330dhcx_write_with_mask(struct st_ism330dhcx_hw *hw, u8 addr, u8 mask,
|
||||
|
@ -14,6 +14,8 @@
|
||||
#include <linux/iio/trigger.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include "../../common/stm_iio_types.h"
|
||||
|
||||
#if KERNEL_VERSION(5, 19, 0) <= LINUX_VERSION_CODE
|
||||
#include <linux/iio/iio-opaque.h>
|
||||
#endif /* LINUX_VERSION_CODE */
|
||||
|
@ -284,7 +284,7 @@ static const struct iio_event_spec singol_thr_event = {
|
||||
};
|
||||
|
||||
const struct iio_event_spec ism330dlc_fifo_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
@ -311,7 +311,7 @@ static const struct iio_chan_spec st_ism330dlc_gyro_ch[] = {
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_ism330dlc_tilt_ch[] = {
|
||||
ST_ISM330DLC_FLUSH_CHANNEL(IIO_TILT),
|
||||
ST_ISM330DLC_FLUSH_CHANNEL(STM_IIO_TILT),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(0)
|
||||
};
|
||||
|
||||
@ -2089,9 +2089,9 @@ ssize_t st_ism330dlc_sysfs_flush_fifo(struct device *dev,
|
||||
|
||||
if (sensor_last_timestamp ==
|
||||
sdata->cdata->fifo_output[sdata->sindex].timestamp_p)
|
||||
event_type = IIO_EV_DIR_FIFO_EMPTY;
|
||||
event_type = STM_IIO_EV_DIR_FIFO_EMPTY;
|
||||
else
|
||||
event_type = IIO_EV_DIR_FIFO_DATA;
|
||||
event_type = STM_IIO_EV_DIR_FIFO_DATA;
|
||||
|
||||
timestamp_flush = sdata->cdata->fifo_output[sdata->sindex].timestamp_p;
|
||||
|
||||
@ -2115,7 +2115,7 @@ ssize_t st_ism330dlc_sysfs_flush_fifo(struct device *dev,
|
||||
}
|
||||
|
||||
iio_push_event(indio_dev, IIO_UNMOD_EVENT_CODE(stype,
|
||||
-1, IIO_EV_TYPE_FIFO_FLUSH, event_type),
|
||||
-1, STM_IIO_EV_TYPE_FIFO_FLUSH, event_type),
|
||||
timestamp_flush);
|
||||
|
||||
mutex_unlock(&sdata->cdata->odr_lock);
|
||||
|
@ -14,6 +14,8 @@
|
||||
#include <linux/iio/trigger.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include "../../common/stm_iio_types.h"
|
||||
|
||||
#if KERNEL_VERSION(5, 19, 0) <= LINUX_VERSION_CODE
|
||||
#include <linux/iio/iio-opaque.h>
|
||||
#endif /* LINUX_VERSION_CODE */
|
||||
|
@ -299,7 +299,7 @@ static const struct iio_event_spec singol_thr_event = {
|
||||
};
|
||||
|
||||
const struct iio_event_spec lsm6ds3_fifo_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
@ -327,7 +327,7 @@ static const struct iio_chan_spec st_lsm6ds3_gyro_ch[] = {
|
||||
|
||||
static const struct iio_chan_spec st_lsm6ds3_sign_motion_ch[] = {
|
||||
{
|
||||
.type = IIO_SIGN_MOTION,
|
||||
.type = STM_IIO_SIGN_MOTION,
|
||||
.channel = 0,
|
||||
.modified = 0,
|
||||
.event_spec = &singol_thr_event,
|
||||
@ -338,7 +338,7 @@ static const struct iio_chan_spec st_lsm6ds3_sign_motion_ch[] = {
|
||||
|
||||
static const struct iio_chan_spec st_lsm6ds3_step_c_ch[] = {
|
||||
{
|
||||
.type = IIO_STEP_COUNTER,
|
||||
.type = STM_IIO_STEP_COUNTER,
|
||||
.modified = 0,
|
||||
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
|
||||
.address = ST_LSM6DS3_STEP_COUNTER_OUT_L_ADDR,
|
||||
@ -349,17 +349,17 @@ static const struct iio_chan_spec st_lsm6ds3_step_c_ch[] = {
|
||||
.endianness = IIO_LE,
|
||||
},
|
||||
},
|
||||
ST_LSM6DS3_FLUSH_CHANNEL(IIO_STEP_COUNTER),
|
||||
ST_LSM6DS3_FLUSH_CHANNEL(STM_IIO_STEP_COUNTER),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(1)
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6ds3_step_d_ch[] = {
|
||||
ST_LSM6DS3_FLUSH_CHANNEL(IIO_STEP_DETECTOR),
|
||||
ST_LSM6DS3_FLUSH_CHANNEL(IIO_STEPS),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(0)
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6ds3_tilt_ch[] = {
|
||||
ST_LSM6DS3_FLUSH_CHANNEL(IIO_TILT),
|
||||
ST_LSM6DS3_FLUSH_CHANNEL(STM_IIO_TILT),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(0)
|
||||
};
|
||||
|
||||
@ -2314,9 +2314,9 @@ ssize_t st_lsm6ds3_sysfs_flush_fifo(struct device *dev,
|
||||
|
||||
if (sensor_last_timestamp ==
|
||||
sdata->cdata->fifo_output[sdata->sindex].timestamp_p)
|
||||
event_type = IIO_EV_DIR_FIFO_EMPTY;
|
||||
event_type = STM_IIO_EV_DIR_FIFO_EMPTY;
|
||||
else
|
||||
event_type = IIO_EV_DIR_FIFO_DATA;
|
||||
event_type = STM_IIO_EV_DIR_FIFO_DATA;
|
||||
|
||||
timestamp_flush = sdata->cdata->fifo_output[sdata->sindex].timestamp_p;
|
||||
|
||||
@ -2340,7 +2340,7 @@ ssize_t st_lsm6ds3_sysfs_flush_fifo(struct device *dev,
|
||||
}
|
||||
|
||||
iio_push_event(indio_dev, IIO_UNMOD_EVENT_CODE(stype,
|
||||
-1, IIO_EV_TYPE_FIFO_FLUSH, event_type),
|
||||
-1, STM_IIO_EV_TYPE_FIFO_FLUSH, event_type),
|
||||
timestamp_flush);
|
||||
|
||||
mutex_unlock(&sdata->cdata->odr_lock);
|
||||
|
@ -118,7 +118,7 @@ static irqreturn_t lsm6ds3_irq_management(int irq, void *private)
|
||||
BIT(ST_MASK_ID_SIGN_MOTION))) {
|
||||
iio_push_event(cdata->indio_dev[
|
||||
ST_MASK_ID_SIGN_MOTION],
|
||||
IIO_UNMOD_EVENT_CODE(IIO_SIGN_MOTION,
|
||||
IIO_UNMOD_EVENT_CODE(STM_IIO_SIGN_MOTION,
|
||||
0, IIO_EV_TYPE_THRESH, IIO_EV_DIR_EITHER),
|
||||
cdata->timestamp);
|
||||
|
||||
|
@ -14,6 +14,8 @@
|
||||
#include <linux/iio/trigger.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include "../../common/stm_iio_types.h"
|
||||
|
||||
#if KERNEL_VERSION(5, 19, 0) <= LINUX_VERSION_CODE
|
||||
#include <linux/iio/iio-opaque.h>
|
||||
#endif /* LINUX_VERSION_CODE */
|
||||
|
@ -300,7 +300,7 @@ static const struct iio_event_spec singol_thr_event = {
|
||||
};
|
||||
|
||||
const struct iio_event_spec lsm6ds3h_fifo_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
@ -328,7 +328,7 @@ static const struct iio_chan_spec st_lsm6ds3h_gyro_ch[] = {
|
||||
|
||||
static const struct iio_chan_spec st_lsm6ds3h_sign_motion_ch[] = {
|
||||
{
|
||||
.type = IIO_SIGN_MOTION,
|
||||
.type = STM_IIO_SIGN_MOTION,
|
||||
.channel = 0,
|
||||
.modified = 0,
|
||||
.event_spec = &singol_thr_event,
|
||||
@ -339,7 +339,7 @@ static const struct iio_chan_spec st_lsm6ds3h_sign_motion_ch[] = {
|
||||
|
||||
static const struct iio_chan_spec st_lsm6ds3h_step_c_ch[] = {
|
||||
{
|
||||
.type = IIO_STEP_COUNTER,
|
||||
.type = STM_IIO_STEP_COUNTER,
|
||||
.modified = 0,
|
||||
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
|
||||
.address = ST_LSM6DS3H_STEP_COUNTER_OUT_L_ADDR,
|
||||
@ -350,17 +350,17 @@ static const struct iio_chan_spec st_lsm6ds3h_step_c_ch[] = {
|
||||
.endianness = IIO_LE,
|
||||
},
|
||||
},
|
||||
ST_LSM6DS3H_FLUSH_CHANNEL(IIO_STEP_COUNTER),
|
||||
ST_LSM6DS3H_FLUSH_CHANNEL(STM_IIO_STEP_COUNTER),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(1)
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6ds3h_step_d_ch[] = {
|
||||
ST_LSM6DS3H_FLUSH_CHANNEL(IIO_STEP_DETECTOR),
|
||||
ST_LSM6DS3H_FLUSH_CHANNEL(IIO_STEPS),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(0)
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6ds3h_tilt_ch[] = {
|
||||
ST_LSM6DS3H_FLUSH_CHANNEL(IIO_TILT),
|
||||
ST_LSM6DS3H_FLUSH_CHANNEL(STM_IIO_TILT),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(0)
|
||||
};
|
||||
|
||||
@ -2290,9 +2290,9 @@ ssize_t st_lsm6ds3h_sysfs_flush_fifo(struct device *dev,
|
||||
|
||||
if (sensor_last_timestamp ==
|
||||
sdata->cdata->fifo_output[sdata->sindex].timestamp_p)
|
||||
event_type = IIO_EV_DIR_FIFO_EMPTY;
|
||||
event_type = STM_IIO_EV_DIR_FIFO_EMPTY;
|
||||
else
|
||||
event_type = IIO_EV_DIR_FIFO_DATA;
|
||||
event_type = STM_IIO_EV_DIR_FIFO_DATA;
|
||||
|
||||
timestamp_flush = sdata->cdata->fifo_output[sdata->sindex].timestamp_p;
|
||||
|
||||
@ -2316,7 +2316,7 @@ ssize_t st_lsm6ds3h_sysfs_flush_fifo(struct device *dev,
|
||||
}
|
||||
|
||||
iio_push_event(indio_dev, IIO_UNMOD_EVENT_CODE(stype,
|
||||
-1, IIO_EV_TYPE_FIFO_FLUSH, event_type),
|
||||
-1, STM_IIO_EV_TYPE_FIFO_FLUSH, event_type),
|
||||
timestamp_flush);
|
||||
|
||||
mutex_unlock(&sdata->cdata->odr_lock);
|
||||
|
@ -117,7 +117,7 @@ static irqreturn_t lsm6ds3h_irq_management(int irq, void *private)
|
||||
if ((src_dig_func & ST_LSM6DS3H_SRC_SIGN_MOTION_DATA_AVL) &&
|
||||
(cdata->sensors_enabled & BIT(ST_MASK_ID_SIGN_MOTION))) {
|
||||
iio_push_event(cdata->indio_dev[ST_MASK_ID_SIGN_MOTION],
|
||||
IIO_UNMOD_EVENT_CODE(IIO_SIGN_MOTION,
|
||||
IIO_UNMOD_EVENT_CODE(STM_IIO_SIGN_MOTION,
|
||||
0, IIO_EV_TYPE_THRESH, IIO_EV_DIR_EITHER),
|
||||
cdata->timestamp);
|
||||
}
|
||||
|
@ -14,6 +14,8 @@
|
||||
#include <linux/iio/trigger.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include "../../common/stm_iio_types.h"
|
||||
|
||||
#if KERNEL_VERSION(5, 19, 0) <= LINUX_VERSION_CODE
|
||||
#include <linux/iio/iio-opaque.h>
|
||||
#endif /* LINUX_VERSION_CODE */
|
||||
|
@ -333,7 +333,7 @@ static const struct iio_event_spec singol_thr_event = {
|
||||
};
|
||||
|
||||
const struct iio_event_spec lsm6dsm_fifo_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
@ -361,7 +361,7 @@ static const struct iio_chan_spec st_lsm6dsm_gyro_ch[] = {
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsm_sign_motion_ch[] = {
|
||||
{
|
||||
.type = IIO_SIGN_MOTION,
|
||||
.type = STM_IIO_SIGN_MOTION,
|
||||
.channel = 0,
|
||||
.modified = 0,
|
||||
.event_spec = &singol_thr_event,
|
||||
@ -372,7 +372,7 @@ static const struct iio_chan_spec st_lsm6dsm_sign_motion_ch[] = {
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsm_step_c_ch[] = {
|
||||
{
|
||||
.type = IIO_STEP_COUNTER,
|
||||
.type = STM_IIO_STEP_COUNTER,
|
||||
.modified = 0,
|
||||
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
|
||||
.address = ST_LSM6DSM_STEP_COUNTER_OUT_L_ADDR,
|
||||
@ -383,23 +383,23 @@ static const struct iio_chan_spec st_lsm6dsm_step_c_ch[] = {
|
||||
.endianness = IIO_LE,
|
||||
},
|
||||
},
|
||||
ST_LSM6DSM_FLUSH_CHANNEL(IIO_STEP_COUNTER),
|
||||
ST_LSM6DSM_FLUSH_CHANNEL(STM_IIO_STEP_COUNTER),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(1)
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsm_step_d_ch[] = {
|
||||
ST_LSM6DSM_FLUSH_CHANNEL(IIO_STEP_DETECTOR),
|
||||
ST_LSM6DSM_FLUSH_CHANNEL(IIO_STEPS),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(0)
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsm_tilt_ch[] = {
|
||||
ST_LSM6DSM_FLUSH_CHANNEL(IIO_TILT),
|
||||
ST_LSM6DSM_FLUSH_CHANNEL(STM_IIO_TILT),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(0)
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsm_wtilt_ch[] = {
|
||||
{
|
||||
.type = IIO_WRIST_TILT_GESTURE,
|
||||
.type = STM_IIO_WRIST_TILT_GESTURE,
|
||||
.modified = 0,
|
||||
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
|
||||
.address = ST_LSM6DSM_WRIST_TILT_IA,
|
||||
@ -410,13 +410,13 @@ static const struct iio_chan_spec st_lsm6dsm_wtilt_ch[] = {
|
||||
.endianness = IIO_LE,
|
||||
},
|
||||
},
|
||||
ST_LSM6DSM_FLUSH_CHANNEL(IIO_WRIST_TILT_GESTURE),
|
||||
ST_LSM6DSM_FLUSH_CHANNEL(STM_IIO_WRIST_TILT_GESTURE),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(1)
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsm_tap_ch[] = {
|
||||
{
|
||||
.type = IIO_TAP,
|
||||
.type = STM_IIO_TAP,
|
||||
.channel = 0,
|
||||
.modified = 0,
|
||||
.event_spec = &singol_thr_event,
|
||||
@ -427,7 +427,7 @@ static const struct iio_chan_spec st_lsm6dsm_tap_ch[] = {
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsm_tap_tap_ch[] = {
|
||||
{
|
||||
.type = IIO_TAP_TAP,
|
||||
.type = STM_IIO_TAP_TAP,
|
||||
.channel = 0,
|
||||
.modified = 0,
|
||||
.event_spec = &singol_thr_event,
|
||||
@ -2560,9 +2560,9 @@ ssize_t st_lsm6dsm_sysfs_flush_fifo(struct device *dev,
|
||||
|
||||
if (sensor_last_timestamp ==
|
||||
sdata->cdata->fifo_output[sdata->sindex].timestamp_p)
|
||||
event_type = IIO_EV_DIR_FIFO_EMPTY;
|
||||
event_type = STM_IIO_EV_DIR_FIFO_EMPTY;
|
||||
else
|
||||
event_type = IIO_EV_DIR_FIFO_DATA;
|
||||
event_type = STM_IIO_EV_DIR_FIFO_DATA;
|
||||
|
||||
timestamp_flush = sdata->cdata->fifo_output[sdata->sindex].timestamp_p;
|
||||
|
||||
@ -2586,7 +2586,7 @@ ssize_t st_lsm6dsm_sysfs_flush_fifo(struct device *dev,
|
||||
}
|
||||
|
||||
iio_push_event(indio_dev, IIO_UNMOD_EVENT_CODE(stype,
|
||||
-1, IIO_EV_TYPE_FIFO_FLUSH, event_type),
|
||||
-1, STM_IIO_EV_TYPE_FIFO_FLUSH, event_type),
|
||||
timestamp_flush);
|
||||
|
||||
mutex_unlock(&sdata->cdata->odr_lock);
|
||||
|
@ -124,7 +124,7 @@ static irqreturn_t lsm6dsm_irq_management(int irq, void *private)
|
||||
if ((src_dig_func & ST_LSM6DSM_SRC_SIGN_MOTION_DATA_AVL) &&
|
||||
(cdata->sensors_enabled & BIT(ST_MASK_ID_SIGN_MOTION))) {
|
||||
iio_push_event(cdata->indio_dev[ST_MASK_ID_SIGN_MOTION],
|
||||
IIO_UNMOD_EVENT_CODE(IIO_SIGN_MOTION,
|
||||
IIO_UNMOD_EVENT_CODE(STM_IIO_SIGN_MOTION,
|
||||
0, IIO_EV_TYPE_THRESH, IIO_EV_DIR_EITHER),
|
||||
cdata->timestamp);
|
||||
}
|
||||
@ -158,7 +158,7 @@ static irqreturn_t lsm6dsm_irq_management(int irq, void *private)
|
||||
if ((src_tap_func & ST_LSM6DSM_STAP_EVENT) &&
|
||||
(cdata->sensors_enabled & BIT(ST_MASK_ID_TAP))) {
|
||||
iio_push_event(cdata->indio_dev[ST_MASK_ID_TAP],
|
||||
IIO_UNMOD_EVENT_CODE(IIO_TAP,
|
||||
IIO_UNMOD_EVENT_CODE(STM_IIO_TAP,
|
||||
0, IIO_EV_TYPE_THRESH, IIO_EV_DIR_RISING),
|
||||
cdata->timestamp);
|
||||
}
|
||||
@ -166,7 +166,7 @@ static irqreturn_t lsm6dsm_irq_management(int irq, void *private)
|
||||
if ((src_tap_func & ST_LSM6DSM_DTAP_EVENT) &&
|
||||
(cdata->sensors_enabled & BIT(ST_MASK_ID_TAP_TAP))) {
|
||||
iio_push_event(cdata->indio_dev[ST_MASK_ID_TAP_TAP],
|
||||
IIO_UNMOD_EVENT_CODE(IIO_TAP_TAP,
|
||||
IIO_UNMOD_EVENT_CODE(STM_IIO_TAP_TAP,
|
||||
0, IIO_EV_TYPE_THRESH, IIO_EV_DIR_RISING),
|
||||
cdata->timestamp);
|
||||
}
|
||||
|
@ -17,6 +17,8 @@
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/bitfield.h>
|
||||
|
||||
#include "../../common/stm_iio_types.h"
|
||||
|
||||
#define ST_LSM6DSO16IS_DEV_NAME "lsm6dso16is"
|
||||
|
||||
#define ST_LSM6DSO16IS_REG_FUNC_CFG_ACCESS_ADDR 0x01
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include "../../common/stm_iio_types.h"
|
||||
|
||||
#define ST_LSM6DSOX_ODR_EXPAND(odr, uodr) (((odr) * 1000000) + (uodr))
|
||||
|
||||
#define ST_LSM6DSO_DEV_NAME "lsm6dso"
|
||||
@ -245,7 +247,7 @@ enum st_lsm6dsox_hw_id {
|
||||
}
|
||||
|
||||
static const struct iio_event_spec st_lsm6dsox_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
|
@ -410,9 +410,9 @@ ssize_t st_lsm6dsox_flush_fifo(struct device *dev,
|
||||
sensor->dec_counter = 0;
|
||||
mutex_unlock(&hw->fifo_lock);
|
||||
|
||||
type = count > 0 ? IIO_EV_DIR_FIFO_DATA : IIO_EV_DIR_FIFO_EMPTY;
|
||||
type = count > 0 ? STM_IIO_EV_DIR_FIFO_DATA : STM_IIO_EV_DIR_FIFO_EMPTY;
|
||||
event = IIO_UNMOD_EVENT_CODE(iio_dev->channels[0].type, -1,
|
||||
IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
STM_IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
iio_push_event(iio_dev, event, fts);
|
||||
|
||||
return size;
|
||||
@ -581,7 +581,7 @@ static irqreturn_t st_lsm6dsox_handler_thread(int irq, void *private)
|
||||
/* embedded function sensors */
|
||||
if (status[0] & ST_LSM6DSOX_REG_INT_STEP_DET_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LSM6DSOX_ID_STEP_DETECTOR];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_STEP_DETECTOR, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_STEPS, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -590,7 +590,7 @@ static irqreturn_t st_lsm6dsox_handler_thread(int irq, void *private)
|
||||
|
||||
if (status[0] & ST_LSM6DSOX_REG_INT_SIGMOT_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LSM6DSOX_ID_SIGN_MOTION];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_SIGN_MOTION, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_SIGN_MOTION, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -599,7 +599,7 @@ static irqreturn_t st_lsm6dsox_handler_thread(int irq, void *private)
|
||||
|
||||
if (status[0] & ST_LSM6DSOX_REG_INT_TILT_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LSM6DSOX_ID_TILT];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_TILT, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_TILT, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
|
@ -464,7 +464,7 @@ static const struct iio_chan_spec st_lsm6dsox_temp_channels[] = {
|
||||
*/
|
||||
static const struct iio_chan_spec st_lsm6dsox_step_counter_channels[] = {
|
||||
{
|
||||
.type = IIO_STEP_COUNTER,
|
||||
.type = STM_IIO_STEP_COUNTER,
|
||||
.scan_index = 0,
|
||||
.scan_type = {
|
||||
.sign = 'u',
|
||||
@ -473,7 +473,7 @@ static const struct iio_chan_spec st_lsm6dsox_step_counter_channels[] = {
|
||||
.endianness = IIO_LE,
|
||||
},
|
||||
},
|
||||
ST_LSM6DSOX_EVENT_CHANNEL(IIO_STEP_COUNTER, flush),
|
||||
ST_LSM6DSOX_EVENT_CHANNEL(STM_IIO_STEP_COUNTER, flush),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(1),
|
||||
};
|
||||
|
||||
@ -484,7 +484,7 @@ static const struct iio_chan_spec st_lsm6dsox_step_counter_channels[] = {
|
||||
* Step detection event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_lsm6dsox_step_detector_channels[] = {
|
||||
ST_LSM6DSOX_EVENT_CHANNEL(IIO_STEP_DETECTOR, thr),
|
||||
ST_LSM6DSOX_EVENT_CHANNEL(IIO_STEPS, thr),
|
||||
};
|
||||
|
||||
/**
|
||||
@ -494,7 +494,7 @@ static const struct iio_chan_spec st_lsm6dsox_step_detector_channels[] = {
|
||||
* Significant Motion event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_lsm6dsox_sign_motion_channels[] = {
|
||||
ST_LSM6DSOX_EVENT_CHANNEL(IIO_SIGN_MOTION, thr),
|
||||
ST_LSM6DSOX_EVENT_CHANNEL(STM_IIO_SIGN_MOTION, thr),
|
||||
};
|
||||
|
||||
/**
|
||||
@ -504,7 +504,7 @@ static const struct iio_chan_spec st_lsm6dsox_sign_motion_channels[] = {
|
||||
* Tilt event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_lsm6dsox_tilt_channels[] = {
|
||||
ST_LSM6DSOX_EVENT_CHANNEL(IIO_TILT, thr),
|
||||
ST_LSM6DSOX_EVENT_CHANNEL(STM_IIO_TILT, thr),
|
||||
};
|
||||
|
||||
static __maybe_unused int st_lsm6dsox_reg_access(struct iio_dev *iio_dev,
|
||||
|
@ -36,9 +36,9 @@ static void st_lsm6dsox_read_hw_timestamp(struct st_lsm6dsox_hw *hw)
|
||||
ST_LSM6DSOX_TSYNC_OFFSET_NS;
|
||||
|
||||
eventLSB = IIO_EVENT_CODE(IIO_COUNT, 0, 0, 0,
|
||||
IIO_EV_TYPE_TIME_SYNC, 0, 0, 0);
|
||||
STM_IIO_EV_TYPE_TIME_SYNC, 0, 0, 0);
|
||||
eventMSB = IIO_EVENT_CODE(IIO_COUNT, 0, 0, 1,
|
||||
IIO_EV_TYPE_TIME_SYNC, 0, 0, 0);
|
||||
STM_IIO_EV_TYPE_TIME_SYNC, 0, 0, 0);
|
||||
|
||||
spin_lock_irq(&hw->hwtimestamp_lock);
|
||||
timestamp_hw_global = (hw->hw_timestamp_global & GENMASK_ULL(63, 32)) |
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include "../../common/stm_iio_types.h"
|
||||
|
||||
#define ST_LSM6DSRX_ODR_EXPAND(odr, uodr) (((odr) * 1000000) + (uodr))
|
||||
|
||||
#define ST_LSM6DSR_DEV_NAME "lsm6dsr"
|
||||
@ -292,7 +294,7 @@
|
||||
}
|
||||
|
||||
static const struct iio_event_spec st_lsm6dsrx_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
|
@ -413,9 +413,9 @@ ssize_t st_lsm6dsrx_flush_fifo(struct device *dev,
|
||||
fts = sensor->last_fifo_timestamp;
|
||||
mutex_unlock(&hw->fifo_lock);
|
||||
|
||||
type = count > 0 ? IIO_EV_DIR_FIFO_DATA : IIO_EV_DIR_FIFO_EMPTY;
|
||||
type = count > 0 ? STM_IIO_EV_DIR_FIFO_DATA : STM_IIO_EV_DIR_FIFO_EMPTY;
|
||||
event = IIO_UNMOD_EVENT_CODE(iio_dev->channels[0].type, -1,
|
||||
IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
STM_IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
iio_push_event(iio_dev, event, fts);
|
||||
|
||||
return size;
|
||||
|
@ -30,7 +30,7 @@
|
||||
*/
|
||||
static const struct iio_chan_spec st_lsm6dsrx_step_counter_channels[] = {
|
||||
{
|
||||
.type = IIO_STEP_COUNTER,
|
||||
.type = STM_IIO_STEP_COUNTER,
|
||||
.scan_index = 0,
|
||||
.scan_type = {
|
||||
.sign = 'u',
|
||||
@ -39,7 +39,7 @@ static const struct iio_chan_spec st_lsm6dsrx_step_counter_channels[] = {
|
||||
.endianness = IIO_LE,
|
||||
},
|
||||
},
|
||||
ST_LSM6DSRX_EVENT_CHANNEL(IIO_STEP_COUNTER, flush),
|
||||
ST_LSM6DSRX_EVENT_CHANNEL(STM_IIO_STEP_COUNTER, flush),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(1),
|
||||
};
|
||||
|
||||
@ -50,7 +50,7 @@ static const struct iio_chan_spec st_lsm6dsrx_step_counter_channels[] = {
|
||||
* Step detection event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_lsm6dsrx_step_detector_channels[] = {
|
||||
ST_LSM6DSRX_EVENT_CHANNEL(IIO_STEP_DETECTOR, thr),
|
||||
ST_LSM6DSRX_EVENT_CHANNEL(IIO_STEPS, thr),
|
||||
};
|
||||
|
||||
/**
|
||||
@ -61,7 +61,7 @@ static const struct iio_chan_spec st_lsm6dsrx_step_detector_channels[] = {
|
||||
* Significant Motion event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_lsm6dsrx_sign_motion_channels[] = {
|
||||
ST_LSM6DSRX_EVENT_CHANNEL(IIO_SIGN_MOTION, thr),
|
||||
ST_LSM6DSRX_EVENT_CHANNEL(STM_IIO_SIGN_MOTION, thr),
|
||||
};
|
||||
|
||||
/**
|
||||
@ -71,7 +71,7 @@ static const struct iio_chan_spec st_lsm6dsrx_sign_motion_channels[] = {
|
||||
* Tilt event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_lsm6dsrx_tilt_channels[] = {
|
||||
ST_LSM6DSRX_EVENT_CHANNEL(IIO_TILT, thr),
|
||||
ST_LSM6DSRX_EVENT_CHANNEL(STM_IIO_TILT, thr),
|
||||
};
|
||||
|
||||
static const unsigned long st_lsm6dsrx_embfunc_available_scan_masks[] = {
|
||||
@ -511,7 +511,7 @@ int st_lsm6dsrx_embfunc_handler_thread(struct st_lsm6dsrx_hw *hw)
|
||||
/* embedded function sensors */
|
||||
if (status & ST_LSM6DSRX_IS_STEP_DET_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LSM6DSRX_ID_STEP_DETECTOR];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_STEP_DETECTOR,
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_STEPS,
|
||||
-1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
@ -521,7 +521,7 @@ int st_lsm6dsrx_embfunc_handler_thread(struct st_lsm6dsrx_hw *hw)
|
||||
|
||||
if (status & ST_LSM6DSRX_IS_SIGMOT_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LSM6DSRX_ID_SIGN_MOTION];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_SIGN_MOTION,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_SIGN_MOTION,
|
||||
-1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
@ -531,7 +531,7 @@ int st_lsm6dsrx_embfunc_handler_thread(struct st_lsm6dsrx_hw *hw)
|
||||
|
||||
if (status & ST_LSM6DSRX_IS_TILT_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LSM6DSRX_ID_TILT];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_TILT, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_TILT, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
|
@ -44,7 +44,7 @@ static const unsigned long st_lsm6dsrx_event_available_scan_masks[] = {
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsrx_wk_channels[] = {
|
||||
{
|
||||
.type = IIO_GESTURE,
|
||||
.type = STM_IIO_GESTURE,
|
||||
.scan_index = 0,
|
||||
.scan_type = {
|
||||
.sign = 'u',
|
||||
@ -56,16 +56,16 @@ static const struct iio_chan_spec st_lsm6dsrx_wk_channels[] = {
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsrx_ff_channels[] = {
|
||||
ST_LSM6DSRX_EVENT_CHANNEL(IIO_GESTURE, thr),
|
||||
ST_LSM6DSRX_EVENT_CHANNEL(STM_IIO_GESTURE, thr),
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsrx_sc_channels[] = {
|
||||
ST_LSM6DSRX_EVENT_CHANNEL(IIO_GESTURE, thr),
|
||||
ST_LSM6DSRX_EVENT_CHANNEL(STM_IIO_GESTURE, thr),
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsrx_6D_channels[] = {
|
||||
{
|
||||
.type = IIO_GESTURE,
|
||||
.type = STM_IIO_GESTURE,
|
||||
.scan_index = 0,
|
||||
.scan_type = {
|
||||
.sign = 'u',
|
||||
@ -77,11 +77,11 @@ static const struct iio_chan_spec st_lsm6dsrx_6D_channels[] = {
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsrx_tap_channels[] = {
|
||||
ST_LSM6DSRX_EVENT_CHANNEL(IIO_TAP, thr),
|
||||
ST_LSM6DSRX_EVENT_CHANNEL(STM_IIO_TAP, thr),
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsrx_dtap_channels[] = {
|
||||
ST_LSM6DSRX_EVENT_CHANNEL(IIO_TAP_TAP, thr),
|
||||
ST_LSM6DSRX_EVENT_CHANNEL(STM_IIO_TAP_TAP, thr),
|
||||
};
|
||||
|
||||
/*
|
||||
@ -819,7 +819,7 @@ int st_lsm6dsrx_event_handler(struct st_lsm6dsrx_hw *hw)
|
||||
/* base function sensors */
|
||||
if (status & ST_LSM6DSRX_SINGLE_TAP_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LSM6DSRX_ID_TAP];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_TAP, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_TAP, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -828,7 +828,7 @@ int st_lsm6dsrx_event_handler(struct st_lsm6dsrx_hw *hw)
|
||||
|
||||
if (status & ST_LSM6DSRX_DOUBLE_TAP_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LSM6DSRX_ID_DTAP];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_TAP_TAP, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_TAP_TAP, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -837,7 +837,7 @@ int st_lsm6dsrx_event_handler(struct st_lsm6dsrx_hw *hw)
|
||||
|
||||
if (status & ST_LSM6DSRX_FF_IA_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LSM6DSRX_ID_FF];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_GESTURE, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_GESTURE, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -854,7 +854,7 @@ int st_lsm6dsrx_event_handler(struct st_lsm6dsrx_hw *hw)
|
||||
|
||||
if (status & ST_LSM6DSRX_SLEEP_CHANGE_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LSM6DSRX_ID_SLPCHG];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_GESTURE, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_GESTURE, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
|
@ -36,9 +36,9 @@ static void st_lsm6dsrx_read_hw_timestamp(struct st_lsm6dsrx_hw *hw)
|
||||
ST_LSM6DSRX_TSYNC_OFFSET_NS;
|
||||
|
||||
eventLSB = IIO_EVENT_CODE(IIO_COUNT, 0, 0, 0,
|
||||
IIO_EV_TYPE_TIME_SYNC, 0, 0, 0);
|
||||
STM_IIO_EV_TYPE_TIME_SYNC, 0, 0, 0);
|
||||
eventMSB = IIO_EVENT_CODE(IIO_COUNT, 0, 0, 1,
|
||||
IIO_EV_TYPE_TIME_SYNC, 0, 0, 0);
|
||||
STM_IIO_EV_TYPE_TIME_SYNC, 0, 0, 0);
|
||||
|
||||
spin_lock_irq(&hw->hwtimestamp_lock);
|
||||
timestamp_hw_global = (hw->hw_timestamp_global & GENMASK_ULL(63, 32)) |
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include "../../common/stm_iio_types.h"
|
||||
|
||||
#define ST_LSM6DSVX_ODR_LIST_SIZE 9
|
||||
#define ST_LSM6DSVX_ODR_EXPAND(odr, uodr) ((odr * 1000000) + uodr)
|
||||
|
||||
@ -328,7 +330,7 @@
|
||||
}
|
||||
|
||||
static const struct iio_event_spec st_lsm6dsvx_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
|
@ -481,9 +481,9 @@ ssize_t st_lsm6dsvx_flush_fifo(struct device *dev,
|
||||
fifo_ts = sensor->last_fifo_timestamp;
|
||||
mutex_unlock(&hw->fifo_lock);
|
||||
|
||||
type = count > 0 ? IIO_EV_DIR_FIFO_DATA : IIO_EV_DIR_FIFO_EMPTY;
|
||||
type = count > 0 ? STM_IIO_EV_DIR_FIFO_DATA : STM_IIO_EV_DIR_FIFO_EMPTY;
|
||||
event = IIO_UNMOD_EVENT_CODE(iio_dev->channels[0].type, -1,
|
||||
IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
STM_IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
iio_push_event(iio_dev, event, fifo_ts);
|
||||
|
||||
return size;
|
||||
|
@ -30,7 +30,7 @@
|
||||
*/
|
||||
static const struct iio_chan_spec st_lsm6dsvx_step_counter_channels[] = {
|
||||
{
|
||||
.type = IIO_STEP_COUNTER,
|
||||
.type = STM_IIO_STEP_COUNTER,
|
||||
.scan_index = 0,
|
||||
.scan_type = {
|
||||
.sign = 'u',
|
||||
@ -39,7 +39,7 @@ static const struct iio_chan_spec st_lsm6dsvx_step_counter_channels[] = {
|
||||
.endianness = IIO_LE,
|
||||
},
|
||||
},
|
||||
ST_LSM6DSVX_EVENT_CHANNEL(IIO_STEP_COUNTER, flush),
|
||||
ST_LSM6DSVX_EVENT_CHANNEL(STM_IIO_STEP_COUNTER, flush),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(1),
|
||||
};
|
||||
|
||||
@ -50,7 +50,7 @@ static const struct iio_chan_spec st_lsm6dsvx_step_counter_channels[] = {
|
||||
* Step detection event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_lsm6dsvx_step_detector_channels[] = {
|
||||
ST_LSM6DSVX_EVENT_CHANNEL(IIO_STEP_DETECTOR, thr),
|
||||
ST_LSM6DSVX_EVENT_CHANNEL(IIO_STEPS, thr),
|
||||
};
|
||||
|
||||
/**
|
||||
@ -61,7 +61,7 @@ static const struct iio_chan_spec st_lsm6dsvx_step_detector_channels[] = {
|
||||
* Significant Motion event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_lsm6dsvx_sign_motion_channels[] = {
|
||||
ST_LSM6DSVX_EVENT_CHANNEL(IIO_SIGN_MOTION, thr),
|
||||
ST_LSM6DSVX_EVENT_CHANNEL(STM_IIO_SIGN_MOTION, thr),
|
||||
};
|
||||
|
||||
/**
|
||||
@ -71,7 +71,7 @@ static const struct iio_chan_spec st_lsm6dsvx_sign_motion_channels[] = {
|
||||
* Tilt event detection
|
||||
*/
|
||||
static const struct iio_chan_spec st_lsm6dsvx_tilt_channels[] = {
|
||||
ST_LSM6DSVX_EVENT_CHANNEL(IIO_TILT, thr),
|
||||
ST_LSM6DSVX_EVENT_CHANNEL(STM_IIO_TILT, thr),
|
||||
};
|
||||
|
||||
static const unsigned long st_lsm6dsvx_embfunc_available_scan_masks[] = {
|
||||
@ -513,7 +513,7 @@ int st_lsm6dsvx_embfunc_handler_thread(struct st_lsm6dsvx_hw *hw)
|
||||
/* embedded function sensors */
|
||||
if (status & ST_LSM6DSVX_IS_STEP_DET_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LSM6DSVX_ID_STEP_DETECTOR];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_STEP_DETECTOR,
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_STEPS,
|
||||
-1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
@ -523,7 +523,7 @@ int st_lsm6dsvx_embfunc_handler_thread(struct st_lsm6dsvx_hw *hw)
|
||||
|
||||
if (status & ST_LSM6DSVX_IS_SIGMOT_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LSM6DSVX_ID_SIGN_MOTION];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_SIGN_MOTION,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_SIGN_MOTION,
|
||||
-1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
@ -533,7 +533,7 @@ int st_lsm6dsvx_embfunc_handler_thread(struct st_lsm6dsvx_hw *hw)
|
||||
|
||||
if (status & ST_LSM6DSVX_IS_TILT_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LSM6DSVX_ID_TILT];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_TILT, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_TILT, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
|
@ -43,7 +43,7 @@ static const unsigned long st_lsm6dsvx_event_available_scan_masks[] = {
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsvx_wk_channels[] = {
|
||||
{
|
||||
.type = IIO_GESTURE,
|
||||
.type = STM_IIO_GESTURE,
|
||||
.scan_index = 0,
|
||||
.scan_type = {
|
||||
.sign = 'u',
|
||||
@ -55,16 +55,16 @@ static const struct iio_chan_spec st_lsm6dsvx_wk_channels[] = {
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsvx_ff_channels[] = {
|
||||
ST_LSM6DSVX_EVENT_CHANNEL(IIO_GESTURE, thr),
|
||||
ST_LSM6DSVX_EVENT_CHANNEL(STM_IIO_GESTURE, thr),
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsvx_sc_channels[] = {
|
||||
ST_LSM6DSVX_EVENT_CHANNEL(IIO_GESTURE, thr),
|
||||
ST_LSM6DSVX_EVENT_CHANNEL(STM_IIO_GESTURE, thr),
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsvx_6D_channels[] = {
|
||||
{
|
||||
.type = IIO_GESTURE,
|
||||
.type = STM_IIO_GESTURE,
|
||||
.scan_index = 0,
|
||||
.scan_type = {
|
||||
.sign = 'u',
|
||||
@ -76,11 +76,11 @@ static const struct iio_chan_spec st_lsm6dsvx_6D_channels[] = {
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsvx_tap_channels[] = {
|
||||
ST_LSM6DSVX_EVENT_CHANNEL(IIO_TAP, thr),
|
||||
ST_LSM6DSVX_EVENT_CHANNEL(STM_IIO_TAP, thr),
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec st_lsm6dsvx_dtap_channels[] = {
|
||||
ST_LSM6DSVX_EVENT_CHANNEL(IIO_TAP_TAP, thr),
|
||||
ST_LSM6DSVX_EVENT_CHANNEL(STM_IIO_TAP_TAP, thr),
|
||||
};
|
||||
|
||||
/*
|
||||
@ -807,14 +807,14 @@ int st_lsm6dsvx_event_handler(struct st_lsm6dsvx_hw *hw)
|
||||
if (status & ST_LSM6DSVX_TAP_IA_MASK) {
|
||||
if (BIT(ST_LSM6DSVX_ID_TAP)) {
|
||||
iio_dev = hw->iio_devs[ST_LSM6DSVX_ID_TAP];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_TAP, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_TAP, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
iio_get_time_ns(iio_dev));
|
||||
} else {
|
||||
iio_dev = hw->iio_devs[ST_LSM6DSVX_ID_DTAP];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_TAP_TAP, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_TAP_TAP, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -824,7 +824,7 @@ int st_lsm6dsvx_event_handler(struct st_lsm6dsvx_hw *hw)
|
||||
|
||||
if (status & ST_LSM6DSVX_FF_IA_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LSM6DSVX_ID_FF];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_GESTURE, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_GESTURE, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
@ -841,7 +841,7 @@ int st_lsm6dsvx_event_handler(struct st_lsm6dsvx_hw *hw)
|
||||
|
||||
if (status & ST_LSM6DSVX_SLEEP_CHANGE_MASK) {
|
||||
iio_dev = hw->iio_devs[ST_LSM6DSVX_ID_SLPCHG];
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_GESTURE, -1,
|
||||
event = IIO_UNMOD_EVENT_CODE(STM_IIO_GESTURE, -1,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_RISING);
|
||||
iio_push_event(iio_dev, event,
|
||||
|
@ -36,9 +36,9 @@ static void st_lsm6dsvx_read_hw_timestamp(struct st_lsm6dsvx_hw *hw)
|
||||
ST_LSM6DSVX_TSYNC_OFFSET_NS;
|
||||
|
||||
eventLSB = IIO_EVENT_CODE(IIO_COUNT, 0, 0, 0,
|
||||
IIO_EV_TYPE_TIME_SYNC, 0, 0, 0);
|
||||
STM_IIO_EV_TYPE_TIME_SYNC, 0, 0, 0);
|
||||
eventMSB = IIO_EVENT_CODE(IIO_COUNT, 0, 0, 1,
|
||||
IIO_EV_TYPE_TIME_SYNC, 0, 0, 0);
|
||||
STM_IIO_EV_TYPE_TIME_SYNC, 0, 0, 0);
|
||||
|
||||
spin_lock_irq(&hw->hwtimestamp_lock);
|
||||
timestamp_hw_global = (hw->hw_timestamp_global & GENMASK_ULL(63, 32)) |
|
||||
|
@ -16,6 +16,8 @@
|
||||
#include <linux/property.h>
|
||||
#include <linux/iio/trigger.h>
|
||||
|
||||
#include "../common/stm_iio_types.h"
|
||||
|
||||
#define ST_LPS22DF_MAX_FIFO_LENGTH 127
|
||||
|
||||
#define ST_LPS22DF_INTERRUPT_CFG_ADDR 0x0b
|
||||
|
@ -141,10 +141,10 @@ ssize_t st_lps22df_sysfs_flush_fifo(struct device *dev,
|
||||
|
||||
mutex_unlock(&hw->fifo_lock);
|
||||
|
||||
dir = len > 0 ? IIO_EV_DIR_FIFO_DATA : IIO_EV_DIR_FIFO_EMPTY;
|
||||
dir = len > 0 ? STM_IIO_EV_DIR_FIFO_DATA : STM_IIO_EV_DIR_FIFO_EMPTY;
|
||||
iio_push_event(indio_dev,
|
||||
IIO_UNMOD_EVENT_CODE(IIO_PRESSURE, -1,
|
||||
IIO_EV_TYPE_FIFO_FLUSH, dir),
|
||||
STM_IIO_EV_TYPE_FIFO_FLUSH, dir),
|
||||
fts);
|
||||
|
||||
return size;
|
||||
|
@ -32,7 +32,7 @@ const static struct st_lps22df_odr_table_t st_lps22df_odr_table = {
|
||||
};
|
||||
|
||||
const struct iio_event_spec st_lps22df_fifo_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
|
@ -15,6 +15,8 @@
|
||||
#include <linux/iio/iio.h>
|
||||
#include <linux/iio/trigger.h>
|
||||
|
||||
#include "../common/stm_iio_types.h"
|
||||
|
||||
#define ST_LPS22HB_MAX_FIFO_LENGTH 31
|
||||
|
||||
#define ST_LPS22HB_CTRL3_ADDR 0x12
|
||||
|
@ -155,13 +155,13 @@ ssize_t st_lps22hb_sysfs_flush_fifo(struct device *dev,
|
||||
len = st_lps22hb_read_fifo(hw);
|
||||
mutex_unlock(&hw->fifo_lock);
|
||||
|
||||
type = len > 0 ? IIO_EV_DIR_FIFO_DATA : IIO_EV_DIR_FIFO_EMPTY;
|
||||
type = len > 0 ? STM_IIO_EV_DIR_FIFO_DATA : STM_IIO_EV_DIR_FIFO_EMPTY;
|
||||
if (sensor->type == ST_LPS22HB_PRESS)
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_PRESSURE, -1,
|
||||
IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
STM_IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
else
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_TEMP, -1,
|
||||
IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
STM_IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
iio_push_event(indio_dev, event, st_lps22hb_get_time_ns(indio_dev));
|
||||
mutex_unlock(&indio_dev->mlock);
|
||||
|
||||
|
@ -48,7 +48,7 @@ const static struct st_lps22hb_odr_table_t st_lps22hb_odr_table = {
|
||||
};
|
||||
|
||||
const struct iio_event_spec st_lps22hb_fifo_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
|
@ -15,6 +15,8 @@
|
||||
#include <linux/iio/iio.h>
|
||||
#include <linux/iio/trigger.h>
|
||||
|
||||
#include "../common/stm_iio_types.h"
|
||||
|
||||
#define ST_LPS22HH_MAX_FIFO_LENGTH 127
|
||||
|
||||
#define ST_LPS22HH_LIR_ADDR 0x0b
|
||||
|
@ -140,13 +140,13 @@ ssize_t st_lps22hh_sysfs_flush_fifo(struct device *dev,
|
||||
hw->ts_irq = hw->ts;
|
||||
mutex_unlock(&hw->fifo_lock);
|
||||
|
||||
type = len > 0 ? IIO_EV_DIR_FIFO_DATA : IIO_EV_DIR_FIFO_EMPTY;
|
||||
type = len > 0 ? STM_IIO_EV_DIR_FIFO_DATA : STM_IIO_EV_DIR_FIFO_EMPTY;
|
||||
if (sensor->type == ST_LPS22HH_PRESS)
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_PRESSURE, -1,
|
||||
IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
STM_IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
else
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_TEMP, -1,
|
||||
IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
STM_IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
iio_push_event(indio_dev, event, st_lps22hh_get_time_ns(hw));
|
||||
mutex_unlock(&indio_dev->mlock);
|
||||
|
||||
|
@ -36,7 +36,7 @@ const static struct st_lps22hh_odr_table_t st_lps22hh_odr_table = {
|
||||
};
|
||||
|
||||
const struct iio_event_spec st_lps22hh_fifo_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
|
@ -15,6 +15,8 @@
|
||||
#include <linux/iio/iio.h>
|
||||
#include <linux/iio/trigger.h>
|
||||
|
||||
#include "../common/stm_iio_types.h"
|
||||
|
||||
#define ST_LPS33HW_MAX_FIFO_LENGTH 31
|
||||
|
||||
#define ST_LPS33HW_CTRL3_ADDR 0x12
|
||||
|
@ -154,13 +154,13 @@ ssize_t st_lps33hw_sysfs_flush_fifo(struct device *dev,
|
||||
len = st_lps33hw_read_fifo(hw);
|
||||
mutex_unlock(&hw->fifo_lock);
|
||||
|
||||
type = len > 0 ? IIO_EV_DIR_FIFO_DATA : IIO_EV_DIR_FIFO_EMPTY;
|
||||
type = len > 0 ? STM_IIO_EV_DIR_FIFO_DATA : STM_IIO_EV_DIR_FIFO_EMPTY;
|
||||
if (sensor->type == ST_LPS33HW_PRESS)
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_PRESSURE, -1,
|
||||
IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
STM_IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
else
|
||||
event = IIO_UNMOD_EVENT_CODE(IIO_TEMP, -1,
|
||||
IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
STM_IIO_EV_TYPE_FIFO_FLUSH, type);
|
||||
iio_push_event(indio_dev, event, st_lps33hw_get_time_ns(indio_dev));
|
||||
mutex_unlock(&indio_dev->mlock);
|
||||
|
||||
|
@ -48,7 +48,7 @@ const static struct st_lps33hw_odr_table_t st_lps33hw_odr_table = {
|
||||
};
|
||||
|
||||
const struct iio_event_spec st_lps33hw_fifo_flush_event = {
|
||||
.type = IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.type = STM_IIO_EV_TYPE_FIFO_FLUSH,
|
||||
.dir = IIO_EV_DIR_EITHER,
|
||||
};
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 048fe8d4c7069bf74d9382964373e44cafc6e344 Mon Sep 17 00:00:00 2001
|
||||
From: mario tesi <mario.tesi@st.com>
|
||||
Date: Thu, 16 Sep 2021 14:42:13 +0200
|
||||
Subject: [PATCH 1/2] Added STMEMS sensor to build system
|
||||
Subject: [PATCH] Added STMEMS sensor to build system
|
||||
|
||||
Signed-off-by: mario tesi <mario.tesi@st.com>
|
||||
---
|
@ -1,49 +0,0 @@
|
||||
From fdef8f9eff9c491f805edc1f477923830c244769 Mon Sep 17 00:00:00 2001
|
||||
From: mario tesi <mario.tesi@st.com>
|
||||
Date: Thu, 16 Sep 2021 14:44:46 +0200
|
||||
Subject: [PATCH 2/2] STMEMS Added iio type patch for STMEMS
|
||||
|
||||
Signed-off-by: mario tesi <mario.tesi@st.com>
|
||||
---
|
||||
include/uapi/linux/iio/types.h | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
|
||||
index 4213cdf..1a9affd 100644
|
||||
--- a/include/uapi/linux/iio/types.h
|
||||
+++ b/include/uapi/linux/iio/types.h
|
||||
@@ -43,6 +43,14 @@ enum iio_chan_type {
|
||||
IIO_ELECTRICALCONDUCTIVITY,
|
||||
IIO_COUNT,
|
||||
IIO_INDEX,
|
||||
+ IIO_SIGN_MOTION,
|
||||
+ IIO_STEP_DETECTOR,
|
||||
+ IIO_STEP_COUNTER,
|
||||
+ IIO_TILT,
|
||||
+ IIO_TAP,
|
||||
+ IIO_TAP_TAP,
|
||||
+ IIO_WRIST_TILT_GESTURE,
|
||||
+ IIO_GESTURE,
|
||||
IIO_GRAVITY,
|
||||
};
|
||||
|
||||
@@ -93,6 +101,7 @@ enum iio_event_type {
|
||||
IIO_EV_TYPE_THRESH_ADAPTIVE,
|
||||
IIO_EV_TYPE_MAG_ADAPTIVE,
|
||||
IIO_EV_TYPE_CHANGE,
|
||||
+ IIO_EV_TYPE_FIFO_FLUSH,
|
||||
};
|
||||
|
||||
enum iio_event_direction {
|
||||
@@ -100,6 +109,8 @@ enum iio_event_direction {
|
||||
IIO_EV_DIR_RISING,
|
||||
IIO_EV_DIR_FALLING,
|
||||
IIO_EV_DIR_NONE,
|
||||
+ IIO_EV_DIR_FIFO_EMPTY,
|
||||
+ IIO_EV_DIR_FIFO_DATA,
|
||||
};
|
||||
|
||||
#endif /* _UAPI_IIO_TYPES_H_ */
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 7f632aaebf1e9558d06dafcd56cd887e34f4c5a6 Mon Sep 17 00:00:00 2001
|
||||
From: Denis Ciocca <denis.ciocca@st.com>
|
||||
Date: Mon, 29 Nov 2021 15:15:48 -0800
|
||||
Subject: [PATCH 1/1] stm: add new iio event used for timesync logic
|
||||
|
||||
Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
|
||||
Change-Id: I05ec93ccdb9f4905d6a6c1900386332edf21fea2
|
||||
---
|
||||
include/uapi/linux/iio/types.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
|
||||
index b9c391c967f7..2e1c0b71fe92 100644
|
||||
--- a/include/uapi/linux/iio/types.h
|
||||
+++ b/include/uapi/linux/iio/types.h
|
||||
@@ -105,6 +105,7 @@ enum iio_event_type {
|
||||
IIO_EV_TYPE_MAG_ADAPTIVE,
|
||||
IIO_EV_TYPE_CHANGE,
|
||||
IIO_EV_TYPE_FIFO_FLUSH,
|
||||
+ IIO_EV_TYPE_TIME_SYNC,
|
||||
};
|
||||
|
||||
enum iio_event_direction {
|
||||
--
|
||||
2.25.1
|
||||
|
@ -1,49 +0,0 @@
|
||||
From 9a63dacc4edd06ced07971c9f39e06f9f79b252a Mon Sep 17 00:00:00 2001
|
||||
From: mario tesi <mario.tesi@st.com>
|
||||
Date: Thu, 2 Sep 2021 14:04:40 +0200
|
||||
Subject: [PATCH] Added iio type patch for STMEMS
|
||||
|
||||
Signed-off-by: mario tesi <mario.tesi@st.com>
|
||||
---
|
||||
include/uapi/linux/iio/types.h | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
|
||||
index fdd81af..af20701 100644
|
||||
--- a/include/uapi/linux/iio/types.h
|
||||
+++ b/include/uapi/linux/iio/types.h
|
||||
@@ -43,6 +43,14 @@ enum iio_chan_type {
|
||||
IIO_ELECTRICALCONDUCTIVITY,
|
||||
IIO_COUNT,
|
||||
IIO_INDEX,
|
||||
+ IIO_SIGN_MOTION,
|
||||
+ IIO_STEP_DETECTOR,
|
||||
+ IIO_STEP_COUNTER,
|
||||
+ IIO_TILT,
|
||||
+ IIO_TAP,
|
||||
+ IIO_TAP_TAP,
|
||||
+ IIO_WRIST_TILT_GESTURE,
|
||||
+ IIO_GESTURE,
|
||||
IIO_GRAVITY,
|
||||
IIO_POSITIONRELATIVE,
|
||||
IIO_PHASE,
|
||||
@@ -103,6 +111,7 @@ enum iio_event_type {
|
||||
IIO_EV_TYPE_THRESH_ADAPTIVE,
|
||||
IIO_EV_TYPE_MAG_ADAPTIVE,
|
||||
IIO_EV_TYPE_CHANGE,
|
||||
+ IIO_EV_TYPE_FIFO_FLUSH,
|
||||
};
|
||||
|
||||
enum iio_event_direction {
|
||||
@@ -110,6 +119,8 @@ enum iio_event_direction {
|
||||
IIO_EV_DIR_RISING,
|
||||
IIO_EV_DIR_FALLING,
|
||||
IIO_EV_DIR_NONE,
|
||||
+ IIO_EV_DIR_FIFO_EMPTY,
|
||||
+ IIO_EV_DIR_FIFO_DATA,
|
||||
};
|
||||
|
||||
#endif /* _UAPI_IIO_TYPES_H_ */
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 7f632aaebf1e9558d06dafcd56cd887e34f4c5a6 Mon Sep 17 00:00:00 2001
|
||||
From: Denis Ciocca <denis.ciocca@st.com>
|
||||
Date: Mon, 29 Nov 2021 15:15:48 -0800
|
||||
Subject: [PATCH 1/1] stm: add new iio event used for timesync logic
|
||||
|
||||
Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
|
||||
Change-Id: I05ec93ccdb9f4905d6a6c1900386332edf21fea2
|
||||
---
|
||||
include/uapi/linux/iio/types.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
|
||||
index b9c391c967f7..2e1c0b71fe92 100644
|
||||
--- a/include/uapi/linux/iio/types.h
|
||||
+++ b/include/uapi/linux/iio/types.h
|
||||
@@ -105,6 +105,7 @@ enum iio_event_type {
|
||||
IIO_EV_TYPE_MAG_ADAPTIVE,
|
||||
IIO_EV_TYPE_CHANGE,
|
||||
IIO_EV_TYPE_FIFO_FLUSH,
|
||||
+ IIO_EV_TYPE_TIME_SYNC,
|
||||
};
|
||||
|
||||
enum iio_event_direction {
|
||||
--
|
||||
2.25.1
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 6b3b528b789d3555952915bc436db6914cda5b8f Mon Sep 17 00:00:00 2001
|
||||
From: mario tesi <mario.tesi@st.com>
|
||||
Date: Thu, 16 Sep 2021 15:33:29 +0200
|
||||
Subject: [PATCH 1/2] Added STMEMS sensor to build system
|
||||
Subject: [PATCH] Added STMEMS sensor to build system
|
||||
|
||||
Signed-off-by: mario tesi <mario.tesi@st.com>
|
||||
---
|
||||
|
@ -1,49 +0,0 @@
|
||||
From 9a63dacc4edd06ced07971c9f39e06f9f79b252a Mon Sep 17 00:00:00 2001
|
||||
From: mario tesi <mario.tesi@st.com>
|
||||
Date: Thu, 2 Sep 2021 14:04:40 +0200
|
||||
Subject: [PATCH] Added iio type patch for STMEMS
|
||||
|
||||
Signed-off-by: mario tesi <mario.tesi@st.com>
|
||||
---
|
||||
include/uapi/linux/iio/types.h | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
|
||||
index fdd81af..af20701 100644
|
||||
--- a/include/uapi/linux/iio/types.h
|
||||
+++ b/include/uapi/linux/iio/types.h
|
||||
@@ -43,6 +43,14 @@ enum iio_chan_type {
|
||||
IIO_ELECTRICALCONDUCTIVITY,
|
||||
IIO_COUNT,
|
||||
IIO_INDEX,
|
||||
+ IIO_SIGN_MOTION,
|
||||
+ IIO_STEP_DETECTOR,
|
||||
+ IIO_STEP_COUNTER,
|
||||
+ IIO_TILT,
|
||||
+ IIO_TAP,
|
||||
+ IIO_TAP_TAP,
|
||||
+ IIO_WRIST_TILT_GESTURE,
|
||||
+ IIO_GESTURE,
|
||||
IIO_GRAVITY,
|
||||
IIO_POSITIONRELATIVE,
|
||||
IIO_PHASE,
|
||||
@@ -103,6 +111,7 @@ enum iio_event_type {
|
||||
IIO_EV_TYPE_THRESH_ADAPTIVE,
|
||||
IIO_EV_TYPE_MAG_ADAPTIVE,
|
||||
IIO_EV_TYPE_CHANGE,
|
||||
+ IIO_EV_TYPE_FIFO_FLUSH,
|
||||
};
|
||||
|
||||
enum iio_event_direction {
|
||||
@@ -110,6 +119,8 @@ enum iio_event_direction {
|
||||
IIO_EV_DIR_RISING,
|
||||
IIO_EV_DIR_FALLING,
|
||||
IIO_EV_DIR_NONE,
|
||||
+ IIO_EV_DIR_FIFO_EMPTY,
|
||||
+ IIO_EV_DIR_FIFO_DATA,
|
||||
};
|
||||
|
||||
#endif /* _UAPI_IIO_TYPES_H_ */
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 7f632aaebf1e9558d06dafcd56cd887e34f4c5a6 Mon Sep 17 00:00:00 2001
|
||||
From: Denis Ciocca <denis.ciocca@st.com>
|
||||
Date: Mon, 29 Nov 2021 15:15:48 -0800
|
||||
Subject: [PATCH 1/1] stm: add new iio event used for timesync logic
|
||||
|
||||
Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
|
||||
Change-Id: I05ec93ccdb9f4905d6a6c1900386332edf21fea2
|
||||
---
|
||||
include/uapi/linux/iio/types.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
|
||||
index b9c391c967f7..2e1c0b71fe92 100644
|
||||
--- a/include/uapi/linux/iio/types.h
|
||||
+++ b/include/uapi/linux/iio/types.h
|
||||
@@ -105,6 +105,7 @@ enum iio_event_type {
|
||||
IIO_EV_TYPE_MAG_ADAPTIVE,
|
||||
IIO_EV_TYPE_CHANGE,
|
||||
IIO_EV_TYPE_FIFO_FLUSH,
|
||||
+ IIO_EV_TYPE_TIME_SYNC,
|
||||
};
|
||||
|
||||
enum iio_event_direction {
|
||||
--
|
||||
2.25.1
|
||||
|
@ -1,49 +0,0 @@
|
||||
From b33998f4362832bf9e49a8252d4ddba493ed399c Mon Sep 17 00:00:00 2001
|
||||
From: mario tesi <mario.tesi@st.com>
|
||||
Date: Thu, 2 Sep 2021 14:04:40 +0200
|
||||
Subject: [PATCH 1/3] Added iio type patch for STMEMS
|
||||
|
||||
Signed-off-by: mario tesi <mario.tesi@st.com>
|
||||
---
|
||||
include/uapi/linux/iio/types.h | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
|
||||
index 48c13147c0a8..b31c0fddba0a 100644
|
||||
--- a/include/uapi/linux/iio/types.h
|
||||
+++ b/include/uapi/linux/iio/types.h
|
||||
@@ -43,6 +43,14 @@ enum iio_chan_type {
|
||||
IIO_ELECTRICALCONDUCTIVITY,
|
||||
IIO_COUNT,
|
||||
IIO_INDEX,
|
||||
+ IIO_SIGN_MOTION,
|
||||
+ IIO_STEP_DETECTOR,
|
||||
+ IIO_STEP_COUNTER,
|
||||
+ IIO_TILT,
|
||||
+ IIO_TAP,
|
||||
+ IIO_TAP_TAP,
|
||||
+ IIO_WRIST_TILT_GESTURE,
|
||||
+ IIO_GESTURE,
|
||||
IIO_GRAVITY,
|
||||
IIO_POSITIONRELATIVE,
|
||||
IIO_PHASE,
|
||||
@@ -104,6 +112,7 @@ enum iio_event_type {
|
||||
IIO_EV_TYPE_THRESH_ADAPTIVE,
|
||||
IIO_EV_TYPE_MAG_ADAPTIVE,
|
||||
IIO_EV_TYPE_CHANGE,
|
||||
+ IIO_EV_TYPE_FIFO_FLUSH,
|
||||
};
|
||||
|
||||
enum iio_event_direction {
|
||||
@@ -111,6 +120,8 @@ enum iio_event_direction {
|
||||
IIO_EV_DIR_RISING,
|
||||
IIO_EV_DIR_FALLING,
|
||||
IIO_EV_DIR_NONE,
|
||||
+ IIO_EV_DIR_FIFO_EMPTY,
|
||||
+ IIO_EV_DIR_FIFO_DATA,
|
||||
};
|
||||
|
||||
#endif /* _UAPI_IIO_TYPES_H_ */
|
||||
--
|
||||
2.25.1
|
||||
|
@ -1,26 +0,0 @@
|
||||
From c302b734296ff72b3de80928294dbafe7a9252dd Mon Sep 17 00:00:00 2001
|
||||
From: Denis Ciocca <denis.ciocca@st.com>
|
||||
Date: Mon, 29 Nov 2021 15:15:48 -0800
|
||||
Subject: [PATCH 3/3] stm: add new iio event used for timesync logic
|
||||
|
||||
Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
|
||||
Change-Id: I05ec93ccdb9f4905d6a6c1900386332edf21fea2
|
||||
---
|
||||
include/uapi/linux/iio/types.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
|
||||
index b31c0fddba0a..95f336b07fc2 100644
|
||||
--- a/include/uapi/linux/iio/types.h
|
||||
+++ b/include/uapi/linux/iio/types.h
|
||||
@@ -113,6 +113,7 @@ enum iio_event_type {
|
||||
IIO_EV_TYPE_MAG_ADAPTIVE,
|
||||
IIO_EV_TYPE_CHANGE,
|
||||
IIO_EV_TYPE_FIFO_FLUSH,
|
||||
+ IIO_EV_TYPE_TIME_SYNC,
|
||||
};
|
||||
|
||||
enum iio_event_direction {
|
||||
--
|
||||
2.25.1
|
||||
|
@ -1,49 +0,0 @@
|
||||
From 9a63dacc4edd06ced07971c9f39e06f9f79b252a Mon Sep 17 00:00:00 2001
|
||||
From: mario tesi <mario.tesi@st.com>
|
||||
Date: Thu, 2 Sep 2021 14:04:40 +0200
|
||||
Subject: [PATCH] Added iio type patch for STMEMS
|
||||
|
||||
Signed-off-by: mario tesi <mario.tesi@st.com>
|
||||
---
|
||||
include/uapi/linux/iio/types.h | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
|
||||
index fdd81af..af20701 100644
|
||||
--- a/include/uapi/linux/iio/types.h
|
||||
+++ b/include/uapi/linux/iio/types.h
|
||||
@@ -43,6 +43,14 @@ enum iio_chan_type {
|
||||
IIO_ELECTRICALCONDUCTIVITY,
|
||||
IIO_COUNT,
|
||||
IIO_INDEX,
|
||||
+ IIO_SIGN_MOTION,
|
||||
+ IIO_STEP_DETECTOR,
|
||||
+ IIO_STEP_COUNTER,
|
||||
+ IIO_TILT,
|
||||
+ IIO_TAP,
|
||||
+ IIO_TAP_TAP,
|
||||
+ IIO_WRIST_TILT_GESTURE,
|
||||
+ IIO_GESTURE,
|
||||
IIO_GRAVITY,
|
||||
IIO_POSITIONRELATIVE,
|
||||
IIO_PHASE,
|
||||
@@ -103,6 +111,7 @@ enum iio_event_type {
|
||||
IIO_EV_TYPE_THRESH_ADAPTIVE,
|
||||
IIO_EV_TYPE_MAG_ADAPTIVE,
|
||||
IIO_EV_TYPE_CHANGE,
|
||||
+ IIO_EV_TYPE_FIFO_FLUSH,
|
||||
};
|
||||
|
||||
enum iio_event_direction {
|
||||
@@ -110,6 +119,8 @@ enum iio_event_direction {
|
||||
IIO_EV_DIR_RISING,
|
||||
IIO_EV_DIR_FALLING,
|
||||
IIO_EV_DIR_NONE,
|
||||
+ IIO_EV_DIR_FIFO_EMPTY,
|
||||
+ IIO_EV_DIR_FIFO_DATA,
|
||||
};
|
||||
|
||||
#endif /* _UAPI_IIO_TYPES_H_ */
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 7f632aaebf1e9558d06dafcd56cd887e34f4c5a6 Mon Sep 17 00:00:00 2001
|
||||
From: Denis Ciocca <denis.ciocca@st.com>
|
||||
Date: Mon, 29 Nov 2021 15:15:48 -0800
|
||||
Subject: [PATCH 1/1] stm: add new iio event used for timesync logic
|
||||
|
||||
Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
|
||||
Change-Id: I05ec93ccdb9f4905d6a6c1900386332edf21fea2
|
||||
---
|
||||
include/uapi/linux/iio/types.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
|
||||
index b9c391c967f7..2e1c0b71fe92 100644
|
||||
--- a/include/uapi/linux/iio/types.h
|
||||
+++ b/include/uapi/linux/iio/types.h
|
||||
@@ -105,6 +105,7 @@ enum iio_event_type {
|
||||
IIO_EV_TYPE_MAG_ADAPTIVE,
|
||||
IIO_EV_TYPE_CHANGE,
|
||||
IIO_EV_TYPE_FIFO_FLUSH,
|
||||
+ IIO_EV_TYPE_TIME_SYNC,
|
||||
};
|
||||
|
||||
enum iio_event_direction {
|
||||
--
|
||||
2.25.1
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 912aec8de4c4896151095e14e1f4bc4a0c953195 Mon Sep 17 00:00:00 2001
|
||||
From: Mario Tesi <mario.tesi@st.com>
|
||||
Date: Fri, 10 Mar 2023 13:21:34 +0100
|
||||
Subject: [PATCH 2/3] Add STM sensors drivers to build system
|
||||
Subject: [PATCH] Add STM sensors drivers to build system
|
||||
|
||||
Signed-off-by: Mario Tesi <mario.tesi@st.com>
|
||||
---
|
@ -1,66 +0,0 @@
|
||||
From 5097de98081ebae94770bb91a99a43c9f93fe853 Mon Sep 17 00:00:00 2001
|
||||
From: Mario Tesi <mario.tesi@st.com>
|
||||
Date: Fri, 10 Mar 2023 13:20:43 +0100
|
||||
Subject: [PATCH 1/3] Added iio type patch for STMEMS
|
||||
|
||||
Signed-off-by: Mario Tesi <mario.tesi@st.com>
|
||||
---
|
||||
drivers/iio/industrialio-event.c | 1 +
|
||||
include/uapi/linux/iio/types.h | 15 +++++++++++++++
|
||||
2 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c
|
||||
index 727e2ef66..59b6f46a1 100644
|
||||
--- a/drivers/iio/industrialio-event.c
|
||||
+++ b/drivers/iio/industrialio-event.c
|
||||
@@ -240,6 +240,7 @@ static const char * const iio_ev_dir_text[] = {
|
||||
[IIO_EV_DIR_FALLING] = "falling",
|
||||
[IIO_EV_DIR_SINGLETAP] = "singletap",
|
||||
[IIO_EV_DIR_DOUBLETAP] = "doubletap",
|
||||
+ [IIO_EV_DIR_WAKE_UP] = "wakeup",
|
||||
};
|
||||
|
||||
static const char * const iio_ev_info_text[] = {
|
||||
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
|
||||
index c79f2f046..8116b4907 100644
|
||||
--- a/include/uapi/linux/iio/types.h
|
||||
+++ b/include/uapi/linux/iio/types.h
|
||||
@@ -47,6 +47,15 @@ enum iio_chan_type {
|
||||
IIO_POSITIONRELATIVE,
|
||||
IIO_PHASE,
|
||||
IIO_MASSCONCENTRATION,
|
||||
+ /* starting custom chan type */
|
||||
+ IIO_SIGN_MOTION = 0x100,
|
||||
+ IIO_STEP_DETECTOR,
|
||||
+ IIO_STEP_COUNTER,
|
||||
+ IIO_TILT,
|
||||
+ IIO_TAP,
|
||||
+ IIO_TAP_TAP,
|
||||
+ IIO_WRIST_TILT_GESTURE,
|
||||
+ IIO_GESTURE,
|
||||
};
|
||||
|
||||
enum iio_modifier {
|
||||
@@ -112,6 +121,8 @@ enum iio_event_type {
|
||||
IIO_EV_TYPE_CHANGE,
|
||||
IIO_EV_TYPE_MAG_REFERENCED,
|
||||
IIO_EV_TYPE_GESTURE,
|
||||
+ /* starting custom event type */
|
||||
+ IIO_EV_TYPE_FIFO_FLUSH = 0x100,
|
||||
};
|
||||
|
||||
enum iio_event_direction {
|
||||
@@ -121,6 +132,10 @@ enum iio_event_direction {
|
||||
IIO_EV_DIR_NONE,
|
||||
IIO_EV_DIR_SINGLETAP,
|
||||
IIO_EV_DIR_DOUBLETAP,
|
||||
+ /* starting custom event direction */
|
||||
+ IIO_EV_DIR_FIFO_EMPTY = 0x100,
|
||||
+ IIO_EV_DIR_FIFO_DATA,
|
||||
+ IIO_EV_DIR_WAKE_UP,
|
||||
};
|
||||
|
||||
#endif /* _UAPI_IIO_TYPES_H_ */
|
||||
--
|
||||
2.25.1
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 87d3713893afe1158a52aa2f1ab6b1342546083e Mon Sep 17 00:00:00 2001
|
||||
From: Mario Tesi <mario.tesi@st.com>
|
||||
Date: Fri, 10 Mar 2023 13:22:17 +0100
|
||||
Subject: [PATCH 3/3] stm: add new iio event used for timesync logic
|
||||
|
||||
Signed-off-by: Mario Tesi <mario.tesi@st.com>
|
||||
---
|
||||
include/uapi/linux/iio/types.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
|
||||
index a85021f0d..42f366c6a 100644
|
||||
--- a/include/uapi/linux/iio/types.h
|
||||
+++ b/include/uapi/linux/iio/types.h
|
||||
@@ -123,6 +123,7 @@ enum iio_event_type {
|
||||
IIO_EV_TYPE_GESTURE,
|
||||
/* starting custom event type */
|
||||
IIO_EV_TYPE_FIFO_FLUSH = 0x100,
|
||||
+ IIO_EV_TYPE_TIME_SYNC,
|
||||
};
|
||||
|
||||
enum iio_event_direction {
|
||||
--
|
||||
2.25.1
|
||||
|
Loading…
Reference in New Issue
Block a user