18c2ecf20Sopenharmony_ciWhat: /sys/bus/iio/devices/iio:deviceX/in_proximity0_agc_gain 28c2ecf20Sopenharmony_ciWhat: /sys/bus/iio/devices/iio:deviceX/in_proximity0_agc_gain_bias 38c2ecf20Sopenharmony_ciKernelVersion: 4.18 48c2ecf20Sopenharmony_ciContact: linux-iio@vger.kernel.org 58c2ecf20Sopenharmony_ciDescription: 68c2ecf20Sopenharmony_ci This sensor has an automatic gain control (agc) loop 78c2ecf20Sopenharmony_ci which sets the analog signal levels at an optimum 88c2ecf20Sopenharmony_ci level by controlling programmable gain amplifiers. The 98c2ecf20Sopenharmony_ci criteria for optimal gain is determined by the sensor. 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci Return the actual gain value as an integer in [0; 65536] 128c2ecf20Sopenharmony_ci range when read from. 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci The agc gain read when measuring crosstalk shall be 158c2ecf20Sopenharmony_ci written into in_proximity0_agc_gain_bias. 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ciWhat: /sys/bus/iio/devices/iio:deviceX/in_proximity0_calib_phase_temp_a 188c2ecf20Sopenharmony_ciWhat: /sys/bus/iio/devices/iio:deviceX/in_proximity0_calib_phase_temp_b 198c2ecf20Sopenharmony_ciWhat: /sys/bus/iio/devices/iio:deviceX/in_proximity0_calib_phase_light_a 208c2ecf20Sopenharmony_ciWhat: /sys/bus/iio/devices/iio:deviceX/in_proximity0_calib_phase_light_b 218c2ecf20Sopenharmony_ciKernelVersion: 4.18 228c2ecf20Sopenharmony_ciContact: linux-iio@vger.kernel.org 238c2ecf20Sopenharmony_ciDescription: 248c2ecf20Sopenharmony_ci The sensor is able to perform correction of distance 258c2ecf20Sopenharmony_ci measurements due to changing temperature and ambient 268c2ecf20Sopenharmony_ci light conditions. It can be programmed to correct for 278c2ecf20Sopenharmony_ci a second order error polynomial. 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci Phase data has to be collected when temperature and 308c2ecf20Sopenharmony_ci ambient light are modulated independently. 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci Then a least squares curve fit to a second order 338c2ecf20Sopenharmony_ci polynomial has to be generated from the data. The 348c2ecf20Sopenharmony_ci resultant curves have the form ax^2 + bx + c. 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci From those two curves, a and b coefficients shall be 378c2ecf20Sopenharmony_ci stored in in_proximity0_calib_phase_temp_a and 388c2ecf20Sopenharmony_ci in_proximity0_calib_phase_temp_b for temperature and 398c2ecf20Sopenharmony_ci in in_proximity0_calib_phase_light_a and 408c2ecf20Sopenharmony_ci in_proximity0_calib_phase_light_b for ambient light. 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci Those values must be integer in [0; 8355840] range. 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci Finally, the c constant is set by the sensor 458c2ecf20Sopenharmony_ci internally. 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci The value stored in sensor is displayed when read from. 48