diff options
| author | Erik Lilliebjerg <elilliebjerg@nvidia.com> | 2015-02-18 20:16:13 -0500 |
|---|---|---|
| committer | Robert Collins <rcollins@nvidia.com> | 2017-07-17 19:06:04 -0400 |
| commit | ff81845bddccfbc8e6e00f4d68cfc83440a656ae (patch) | |
| tree | 7e92e45c885b71ed78b80e0c5a24376be944a1fe /include/linux | |
| parent | 777025c0620994534316af0224fe8fb62e3d20df (diff) | |
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 <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/709626
Reviewed-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-by: Ira Zhuang <izhuang@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nvs_proximity.h | 6 |
1 files changed, 5 insertions, 1 deletions
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 @@ | |||
| 1 | /* Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. | 1 | /* Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. |
| 2 | * | 2 | * |
| 3 | * This software is licensed under the terms of the GNU General Public | 3 | * This software is licensed under the terms of the GNU General Public |
| 4 | * License version 2, as published by the Free Software Foundation, and | 4 | * License version 2, as published by the Free Software Foundation, and |
| @@ -15,6 +15,7 @@ | |||
| 15 | #define _NVS_PROXIMITY_H_ | 15 | #define _NVS_PROXIMITY_H_ |
| 16 | 16 | ||
| 17 | #include <linux/iio/iio.h> | 17 | #include <linux/iio/iio.h> |
| 18 | #include <linux/of.h> | ||
| 18 | #include <linux/nvs.h> | 19 | #include <linux/nvs.h> |
| 19 | 20 | ||
| 20 | #define RET_POLL_NEXT (-1) | 21 | #define RET_POLL_NEXT (-1) |
| @@ -22,6 +23,7 @@ | |||
| 22 | #define RET_HW_UPDATE (1) | 23 | #define RET_HW_UPDATE (1) |
| 23 | 24 | ||
| 24 | #define NVS_PROXIMITY_STRING "proximity" | 25 | #define NVS_PROXIMITY_STRING "proximity" |
| 26 | #define SENSOR_FLAG_ON_CHANGE_MODE 0x2 /* from AOS sensors.h */ | ||
| 25 | 27 | ||
| 26 | /** | 28 | /** |
| 27 | * struct nvs_proximity - the common structure between the | 29 | * struct nvs_proximity - the common structure between the |
| @@ -112,5 +114,7 @@ static const struct iio_chan_spec iio_chan_spec_nvs_proximity[] = { | |||
| 112 | 114 | ||
| 113 | int nvs_proximity_enable(struct nvs_proximity *np); | 115 | int nvs_proximity_enable(struct nvs_proximity *np); |
| 114 | int nvs_proximity_read(struct nvs_proximity *np); | 116 | int nvs_proximity_read(struct nvs_proximity *np); |
| 117 | int nvs_proximity_of_dt(struct nvs_proximity *np, const struct device_node *dn, | ||
| 118 | const char *dev_name); | ||
| 115 | 119 | ||
| 116 | #endif /* _NVS_PROXIMITY_H_ */ | 120 | #endif /* _NVS_PROXIMITY_H_ */ |
