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