summaryrefslogtreecommitdiffstats
path: root/include/linux/nvs_light.h
Commit message (Collapse)AuthorAge
* iio: common: NVS light module v.103Erik Lilliebjerg2017-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add ability to change dynamic resolution table index limits at runtime. - Add ability to have individual thresholds per entry in the dynamic resolution table and the ability to change these thresholds at runtime as well as in the device tree. - Add ability to have absolute HW value thresholds per entry in the dynamic resolution table that determines when to switch to the next table entry. And these can be changed at runtime as well as be set in the device tree. - Add the ability, as a WAR, to cap the maximum lux value. - Fix dynamic resolution lux calculation. - Fix threshold high calculation. - Add above new features to cm3217 and cm3218x drivers. - Add forced ARA to cm3218x driver as WAR for POR random registers. Bug 1725551 Bug 200171152 Change-Id: Ide9fa9b3748338b8858d576b795bd77a9c136e54 Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com> Reviewed-on: http://git-master/r/1007652 (cherry picked from commit 2d6370c6338acdbd6ed9bdbe26904003acb3165f) Reviewed-on: http://git-master/r/1013015 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Robert Collins <rcollins@nvidia.com> Tested-by: Robert Collins <rcollins@nvidia.com>
* iio: common: nvs: NVS v207 DT fixesErik Lilliebjerg2017-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Expanded the NVS device tree parsing return values to include the number of changes made to allow efficient processing for sensor hub. - Add documentation to the NVS device tree parsing call. - Fix drivers using the NVS device tree configuration call for the new change. - Add one-shot sensor support to the NVS IIO interface layer. - Fix the flags attribute debug print in the NVS IIO interface layer. - Fix a possible divide by 0 in the common ALS module. - Fix a possible divide by 0 in the common proximity module. - Fix calibration proximity reporting in common proximity module. - Add a configuration option to not reverse the proximity range if the HW supports this. Typically, the proximity HW value gets larger the closer an object gets. By default NVS reverses this by subtracting the value from the maximum possible value. The configuration option allows this feature to be disabled. Bug 200137195 Change-Id: Ia278cc298fe54cd67e1600f3039c70e69f898ed9 Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com> Reviewed-on: http://git-master/r/805080 (cherry picked from commit 5a685485642d333c0ed75da5714ef734ca9dc363) Reviewed-on: http://git-master/r/807680 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Robert Collins <rcollins@nvidia.com> Tested-by: Robert Collins <rcollins@nvidia.com>
* iio: common: nvs: Fix threshold high attribute.Erik Lilliebjerg2017-07-17
| | | | | | | | | | | | | | | | | | | | | - Fix the old value on a threshold high attribute write. - Simplify ALS calibation by entering just the calibrated values at runtime. This is opposed to also having to enter uncalibrated values and only via the device tree. - Add ability to modify interpolation (calibrated and uncalibrated) values at runtime. Bug 1671144 Change-Id: I6a9b132d306a64f1fca3161f3520e6677d5f647b Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com> Reviewed-on: http://git-master/r/777749 (cherry picked from commit 93077f4b94531b8aeae93eb7db892e9c8420f012) Reviewed-on: http://git-master/r/781168 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Robert Collins <rcollins@nvidia.com> Tested-by: Robert Collins <rcollins@nvidia.com>
* iio: Add sensor wake_up supportErik Lilliebjerg2017-07-17
| | | | | | | | | | | | | | | | | | | | | | | | - 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 <elilliebjerg@nvidia.com> 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 <rcollins@nvidia.com> Tested-by: Robert Collins <rcollins@nvidia.com>
* sensors: Fix IIO buffer corruptionErik Lilliebjerg2017-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | - 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>
* iio: Remove IIO_ST macroDan Willemsen2017-07-17
| | | | Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
* iio: nvs: Fixing iio_chan_spec variable definitionsIshan Mittal2017-07-17
| | | | Change-Id: I93532e8d26fe874776702190dc3363165ca11394
* iio: light: Add Android sensors API 1.3 support.Erik Lilliebjerg2017-07-17
- Add support for SENSORS_DEVICE_API_VERSION_1_3 - Add support for LTR659PS - Add support for ISL2902x - Add common light (ALS) module - Add common proximity module - Fix JSA1127 overflows Bug 200032233 Change-Id: I2f3393b64de6ab85f32a7e019b991caec336cb78 Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com> Reviewed-on: http://git-master/r/663645 (cherry picked from commit cf7c3261fe9485d265073587cdc04f8e6312fbee) Reviewed-on: http://git-master/r/657335 Reviewed-by: Robert Collins <rcollins@nvidia.com> Tested-by: Robert Collins <rcollins@nvidia.com>