summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorBrian Masney <masneyb@onstation.org>2017-04-24 21:34:33 -0400
committerJonathan Cameron <jic23@kernel.org>2017-04-26 06:26:09 +0100
commite4ff6c1b41d66e929e18a9afaa7d7d5788ff3da8 (patch)
treee1232250f41c1097da094ebf06b06274680134af /drivers/iio
parentd6d0014c6b1989f9571eb06c1641de9946c3c980 (diff)
downloadtalos-obmc-linux-e4ff6c1b41d66e929e18a9afaa7d7d5788ff3da8.tar.gz
talos-obmc-linux-e4ff6c1b41d66e929e18a9afaa7d7d5788ff3da8.zip
staging: iio: isl29028: correct proximity sleep times
The sysfs attribute in_proximity_sampling_frequency_available currently shows the values 1 3 5 10 13 20 83 100. These values are supposed to correspond to the sleep values 800 400 200 100 75 50 12.5 0 (all in ms). When passing in a sampling frequency of 3, it actually uses a sleep time of 200ms instead of the expected 400ms value. This patch changes the value shown by this sysfs attribute to use fixed-point numbers so that the correct sampling frequency is shown to the user. This patch also changes the code that updates the proximity sampling frequency to only allow values that are shown in the _available sysfs attribute. The original code showed the value 83 that corresponds to the sleep time 12 ms. The data sheet actually lists 12.5 ms as the sleep time, so the proximity frequency was updated to 80. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud