(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

iio: light: apds9306: fix default sampling frequency definition

APDS9306_SAMP_FREQ_10HZ is defined as 0. According to the datasheet (Broadcom AV02-4755EN, page 11, ALS_MEAS_RATE), bits[2:0] set the measurement rate: - 000: 25ms (40Hz) - 001: 20ms (20Hz) - 010: 100ms (10Hz) Change APDS9306_SAMP_FREQ_10HZ from 0 to 2 to write the correct value for 10Hz. Datasheet: https://docs.broadcom.com/doc/AV02-4755EN Fixes: 620d1e6c7a3f ("iio: light: Add support for APDS9306 Light Sensor") Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Tsz Shan Chan <tchan@jacques.com.au> Acked-by: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com> Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>


Author Tsz Shan Chan Committer Jonathan Cameron Date Commit Parent d52047d8
+1 -1
1 changed file
+1 -1
1 changed file