diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-18 13:20:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-18 13:20:42 +0300 |
commit | 14800df6a020d38847fec77ac5a43dc221e5edfc (patch) | |
tree | d6b780dc9ac8c389a7dd326a303993f5ef03fb3f /drivers/iio/light | |
parent | bb5786b9286c253557a0115bc8d21879e61b7b94 (diff) | |
parent | 10856d88f7653b42196ca5b2775bbc1f15122a58 (diff) | |
download | linux-14800df6a020d38847fec77ac5a43dc221e5edfc.tar.xz |
Merge tag 'iio-fixes-for-5.6a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes:
First set of IIO fixes in the 5.6 cycle.
* adxl372
- Fix marking of buffered values as big endian.
* ak8974
- Fix wrong handling of negative values when read from sysfs.
* at91-sama5d2
- Fix differential mode by ensuring configuration set correctly.
* ping
- Use the write sensor type for of_ping_match table.
* sps30
- Kconfig build dependency fix.
* st-sensors
- Fix a wrong identification of which part the SMO8840 ACPI ID indicates.
* stm32-dsfdm
- Fix a sleep in atomic issue by not using a trigger when it makes no sense.
* stm32-timer
- Make sure master mode is disabled when stopping.
* vcnl400
- Update some sampling periods based on new docs.
* tag 'iio-fixes-for-5.6a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
iio: ping: set pa_laser_ping_cfg in of_ping_match
iio: chemical: sps30: fix missing triggered buffer dependency
iio: st_sensors: remap SMO8840 to LIS2DH12
iio: light: vcnl4000: update sampling periods for vcnl4040
iio: light: vcnl4000: update sampling periods for vcnl4200
iio: accel: adxl372: Set iio_chan BE
iio: magnetometer: ak8974: Fix negative raw values in sysfs
iio: trigger: stm32-timer: disable master mode when stopping
iio: adc: stm32-dfsdm: fix sleep in atomic context
iio: adc: at91-sama5d2_adc: fix differential channels in triggered mode
Diffstat (limited to 'drivers/iio/light')
-rw-r--r-- | drivers/iio/light/vcnl4000.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c index b0e241aaefb4..e5b00a6611ac 100644 --- a/drivers/iio/light/vcnl4000.c +++ b/drivers/iio/light/vcnl4000.c @@ -167,16 +167,17 @@ static int vcnl4200_init(struct vcnl4000_data *data) data->vcnl4200_ps.reg = VCNL4200_PS_DATA; switch (id) { case VCNL4200_PROD_ID: - /* Integration time is 50ms, but the experiments */ - /* show 54ms in total. */ - data->vcnl4200_al.sampling_rate = ktime_set(0, 54000 * 1000); - data->vcnl4200_ps.sampling_rate = ktime_set(0, 4200 * 1000); + /* Default wait time is 50ms, add 20% tolerance. */ + data->vcnl4200_al.sampling_rate = ktime_set(0, 60000 * 1000); + /* Default wait time is 4.8ms, add 20% tolerance. */ + data->vcnl4200_ps.sampling_rate = ktime_set(0, 5760 * 1000); data->al_scale = 24000; break; case VCNL4040_PROD_ID: - /* Integration time is 80ms, add 10ms. */ - data->vcnl4200_al.sampling_rate = ktime_set(0, 100000 * 1000); - data->vcnl4200_ps.sampling_rate = ktime_set(0, 100000 * 1000); + /* Default wait time is 80ms, add 20% tolerance. */ + data->vcnl4200_al.sampling_rate = ktime_set(0, 96000 * 1000); + /* Default wait time is 5ms, add 20% tolerance. */ + data->vcnl4200_ps.sampling_rate = ktime_set(0, 6000 * 1000); data->al_scale = 120000; break; } |