From fe5bebef2f85cf4834f6db56c43d4cb0f25cdac8 Mon Sep 17 00:00:00 2001 From: Erik Lilliebjerg Date: Fri, 22 May 2015 06:43:43 -0700 Subject: iio: Add sensor wake_up support - Add wake_up sensor type support. - Remove IIO dependencies from light and proximity headers for portability. - Add driver documentation. - Add ICM20628 compatibility label. - Add global disable allowing no driver interaction with device. - Fix interpolation 64-bit divide in light and proximity modules. - Fix CM32180 device parameter table. - Fix IQS2X6 Kconfig label. Bug 1646541 Change-Id: Ice6d2b435c7f60256ef36601f7c7aaefbcbc53b3 Signed-off-by: Erik Lilliebjerg Reviewed-on: http://git-master/r/746199 (cherry picked from commit 82bd8d8464c2539577e5987f69271afeddce37ec) Reviewed-on: http://git-master/r/754562 (cherry picked from commit 267c198922c6957c6b5f630eb1e9b1aef13035fd) Reviewed-on: http://git-master/r/770738 GVS: Gerrit_Virtual_Submit Reviewed-by: Robert Collins Tested-by: Robert Collins --- include/linux/nvs_light.h | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) (limited to 'include/linux') diff --git a/include/linux/nvs_light.h b/include/linux/nvs_light.h index d5058dabd..9d04fea25 100644 --- a/include/linux/nvs_light.h +++ b/include/linux/nvs_light.h @@ -14,7 +14,6 @@ #ifndef _NVS_LIGHT_H_ #define _NVS_LIGHT_H_ -#include #include #include @@ -23,7 +22,6 @@ #define RET_HW_UPDATE (1) #define NVS_LIGHT_STRING "light" -#define SENSOR_FLAG_ON_CHANGE_MODE 0x2 /* from AOS sensors.h */ /** * struct nvs_light_dynamic - the structure that allows the NVS @@ -108,45 +106,10 @@ struct nvs_light { unsigned int nld_i_hi; /* high index limit to dynamic table */ struct nvs_light_dynamic *nld_tbl; /* ptr to nvs_light_dynamic table */ struct sensor_cfg *cfg; /* pointer to sensor configuration */ - void *nvs_data; /* NVS data for NVS handler */ + void *nvs_st; /* NVS state data for NVS handler */ int (*handler)(void *handle, void *buffer, s64 ts); }; -static const struct iio_chan_spec iio_chan_spec_nvs_light[] = { - { - .type = IIO_LIGHT, - .scan_type = { .sign = 'u', - .realbits = 32, - .storagebits = 32, - .endianness = IIO_CPU, - }, - .info_mask_shared_by_all - = BIT(IIO_CHAN_INFO_RAW) | - BIT(IIO_CHAN_INFO_BATCH_FLUSH) | - BIT(IIO_CHAN_INFO_BATCH_PERIOD) | - BIT(IIO_CHAN_INFO_BATCH_TIMEOUT) | - BIT(IIO_CHAN_INFO_BATCH_FLAGS) | - BIT(IIO_CHAN_INFO_PEAK) | - BIT(IIO_CHAN_INFO_PEAK_SCALE) | - BIT(IIO_CHAN_INFO_SCALE) | - BIT(IIO_CHAN_INFO_OFFSET) | - BIT(IIO_CHAN_INFO_THRESHOLD_LOW) | - BIT(IIO_CHAN_INFO_THRESHOLD_HIGH), - .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | - BIT(IIO_CHAN_INFO_BATCH_FLUSH) | - BIT(IIO_CHAN_INFO_BATCH_PERIOD) | - BIT(IIO_CHAN_INFO_BATCH_TIMEOUT) | - BIT(IIO_CHAN_INFO_BATCH_FLAGS) | - BIT(IIO_CHAN_INFO_PEAK) | - BIT(IIO_CHAN_INFO_PEAK_SCALE) | - BIT(IIO_CHAN_INFO_SCALE) | - BIT(IIO_CHAN_INFO_OFFSET) | - BIT(IIO_CHAN_INFO_THRESHOLD_LOW) | - BIT(IIO_CHAN_INFO_THRESHOLD_HIGH), - }, - IIO_CHAN_SOFT_TIMESTAMP(1) -}; - int nvs_light_read(struct nvs_light *nl); int nvs_light_enable(struct nvs_light *nl); int nvs_light_of_dt(struct nvs_light *nl, const struct device_node *np, -- cgit v1.2.2