From ff81845bddccfbc8e6e00f4d68cfc83440a656ae Mon Sep 17 00:00:00 2001 From: Erik Lilliebjerg Date: Wed, 18 Feb 2015 18:16:13 -0700 Subject: sensors: Fix IIO buffer corruption - Fix buffer corruption during FIFO flush by preserving buffer offsets when data buffer pointer passed in is NULL. A NULL pointer signals a FIFO flush. - Expanded scale and offset per channel. - Abstract HW driver from Linux IIO allowing drop in for sensor hub RTOS. - The option to increase resolution from micro to nano from kernel for more floating point precision in user space. Used when fusion is not on AP. - Add a generic IIO sensor type for Linux sensor support, i.e. non-Android specific sensor. - Expand the IIO layer to allow for a status byte. Allows non-AP fusion as well as adds a sideband for FSYNC data, (sync signal from camera). - Allow for a data-less sensor event, (sends timestamp only). Think step and significant motion. - Allow for versatile timestamp size in case from sensor hub. - Add orientation matrix debug input. - Add debug output to light module. Bug 1612040 Change-Id: I34685676cd92790e033d05149fef3541f7d57400 Signed-off-by: Erik Lilliebjerg Reviewed-on: http://git-master/r/709626 Reviewed-by: Joshua Cha Reviewed-by: Ira Zhuang Reviewed-by: Robert Collins --- include/linux/nvs_proximity.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/nvs_proximity.h b/include/linux/nvs_proximity.h index d8707b376..1e040c256 100644 --- a/include/linux/nvs_proximity.h +++ b/include/linux/nvs_proximity.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. +/* Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -15,6 +15,7 @@ #define _NVS_PROXIMITY_H_ #include +#include #include #define RET_POLL_NEXT (-1) @@ -22,6 +23,7 @@ #define RET_HW_UPDATE (1) #define NVS_PROXIMITY_STRING "proximity" +#define SENSOR_FLAG_ON_CHANGE_MODE 0x2 /* from AOS sensors.h */ /** * struct nvs_proximity - the common structure between the @@ -112,5 +114,7 @@ static const struct iio_chan_spec iio_chan_spec_nvs_proximity[] = { int nvs_proximity_enable(struct nvs_proximity *np); int nvs_proximity_read(struct nvs_proximity *np); +int nvs_proximity_of_dt(struct nvs_proximity *np, const struct device_node *dn, + const char *dev_name); #endif /* _NVS_PROXIMITY_H_ */ -- cgit v1.2.2