1*1c287992SMathieu OthaceheWhat: /sys/bus/iio/devices/iio:deviceX/in_proximity0_agc_gain 2*1c287992SMathieu OthaceheWhat: /sys/bus/iio/devices/iio:deviceX/in_proximity0_agc_gain_bias 3*1c287992SMathieu OthaceheKernelVersion: 4.18 4*1c287992SMathieu OthaceheContact: linux-iio@vger.kernel.org 5*1c287992SMathieu OthaceheDescription: 6*1c287992SMathieu Othacehe This sensor has an automatic gain control (agc) loop 7*1c287992SMathieu Othacehe which sets the analog signal levels at an optimum 8*1c287992SMathieu Othacehe level by controlling programmable gain amplifiers. The 9*1c287992SMathieu Othacehe criteria for optimal gain is determined by the sensor. 10*1c287992SMathieu Othacehe 11*1c287992SMathieu Othacehe Return the actual gain value as an integer in [0; 65536] 12*1c287992SMathieu Othacehe range when read from. 13*1c287992SMathieu Othacehe 14*1c287992SMathieu Othacehe The agc gain read when measuring crosstalk shall be 15*1c287992SMathieu Othacehe written into in_proximity0_agc_gain_bias. 16*1c287992SMathieu Othacehe 17*1c287992SMathieu OthaceheWhat: /sys/bus/iio/devices/iio:deviceX/in_proximity0_calib_phase_temp_a 18*1c287992SMathieu OthaceheWhat: /sys/bus/iio/devices/iio:deviceX/in_proximity0_calib_phase_temp_b 19*1c287992SMathieu OthaceheWhat: /sys/bus/iio/devices/iio:deviceX/in_proximity0_calib_phase_light_a 20*1c287992SMathieu OthaceheWhat: /sys/bus/iio/devices/iio:deviceX/in_proximity0_calib_phase_light_b 21*1c287992SMathieu OthaceheKernelVersion: 4.18 22*1c287992SMathieu OthaceheContact: linux-iio@vger.kernel.org 23*1c287992SMathieu OthaceheDescription: 24*1c287992SMathieu Othacehe The sensor is able to perform correction of distance 25*1c287992SMathieu Othacehe measurements due to changing temperature and ambient 26*1c287992SMathieu Othacehe light conditions. It can be programmed to correct for 27*1c287992SMathieu Othacehe a second order error polynomial. 28*1c287992SMathieu Othacehe 29*1c287992SMathieu Othacehe Phase data has to be collected when temperature and 30*1c287992SMathieu Othacehe ambient light are modulated independently. 31*1c287992SMathieu Othacehe 32*1c287992SMathieu Othacehe Then a least squares curve fit to a second order 33*1c287992SMathieu Othacehe polynomial has to be generated from the data. The 34*1c287992SMathieu Othacehe resultant curves have the form ax^2 + bx + c. 35*1c287992SMathieu Othacehe 36*1c287992SMathieu Othacehe From those two curves, a and b coefficients shall be 37*1c287992SMathieu Othacehe stored in in_proximity0_calib_phase_temp_a and 38*1c287992SMathieu Othacehe in_proximity0_calib_phase_temp_b for temperature and 39*1c287992SMathieu Othacehe in in_proximity0_calib_phase_light_a and 40*1c287992SMathieu Othacehe in_proximity0_calib_phase_light_b for ambient light. 41*1c287992SMathieu Othacehe 42*1c287992SMathieu Othacehe Those values must be integer in [0; 8355840] range. 43*1c287992SMathieu Othacehe 44*1c287992SMathieu Othacehe Finally, the c constant is set by the sensor 45*1c287992SMathieu Othacehe internally. 46*1c287992SMathieu Othacehe 47*1c287992SMathieu Othacehe The value stored in sensor is displayed when read from. 48