summaryrefslogtreecommitdiff
path: root/drivers/iio/humidity/dht11.c
diff options
context:
space:
mode:
authorSanchayan Maity <maitysanchayan@gmail.com>2015-07-14 16:53:22 +0300
committerJonathan Cameron <jic23@kernel.org>2015-07-20 20:41:16 +0300
commit5e9972cd6f1a69ee8a8ee8664d3e4c4ea59c0901 (patch)
treebd6a8e015650efcaa5f20092fecc173f7956fb01 /drivers/iio/humidity/dht11.c
parentf686a36b4b79782a94f07769fb1c0187d24ea8a8 (diff)
downloadlinux-5e9972cd6f1a69ee8a8ee8664d3e4c4ea59c0901.tar.xz
iio: adc: vf610: Determine sampling frequencies by using minimum sample time
The driver currently does not take into account the minimum sample time as per the Figure 6-8 Chapter 9.1.1 12-bit ADC electrical characteristics. We set a static amount of cycles instead of considering the sample time as a given value, which depends on hardware characteristics. Determine sampling frequencies by first reading the device tree property node and then calculating the required Long Sample Time Adder (LSTAdder) value, based on the ADC clock frequency and sample time value obtained from the device tree. This LSTAdder value is then used for calculating the sampling frequencies possible. In case the sample time property is not specified through the device tree, a safe default value of 1000ns is assumed. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Acked-by: Stefan Agner <stefan@agner.ch> Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/humidity/dht11.c')
0 files changed, 0 insertions, 0 deletions