From 33271d63ea7295fc0e6f2a95e965ee9b8761a7bc Mon Sep 17 00:00:00 2001 From: Erik Lilliebjerg Date: Sun, 2 Aug 2015 17:55:22 -0700 Subject: iio: common: nvs: Fix threshold high attribute. - 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 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 Tested-by: Robert Collins --- include/linux/nvs_light.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/nvs_light.h b/include/linux/nvs_light.h index 9d04fea25..dc5d67218 100644 --- a/include/linux/nvs_light.h +++ b/include/linux/nvs_light.h @@ -114,6 +114,8 @@ 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, const char *dev_name); +void nvs_light_threshold_calibrate_lo(struct nvs_light *nl, int lo); +void nvs_light_threshold_calibrate_hi(struct nvs_light *nl, int hi); ssize_t nvs_light_dbg(struct nvs_light *nl, char *buf); #endif /* _NVS_LIGHT_H_ */ -- cgit v1.2.2