Lines Matching full:raw
38 * Read ADCIN channel 12 (voltage) and convert RAW value to micro voltage
62 * Table1 (temperature for first 25 RAW values)
63 * Usage: TEMP = rx51_temp_table1[RAW]
64 * RAW is between 1 and 24
73 * Table2 (lowest RAW value for temperature)
74 * Usage: RAW = rx51_temp_table2[TEMP-rx51_temp_table2_first]
76 * RAW is between 25 and 993
97 int raw = rx51_battery_read_adc(di->channel_temp); in rx51_battery_read_temperature() local
99 if (raw < 0) in rx51_battery_read_temperature()
100 dev_err(di->dev, "Could not read ADC: %d\n", raw); in rx51_battery_read_temperature()
103 if (raw <= 0) in rx51_battery_read_temperature()
107 if (raw >= (1 << 10)) in rx51_battery_read_temperature()
111 if (raw < ARRAY_SIZE(rx51_temp_table1)) in rx51_battery_read_temperature()
112 return rx51_temp_table1[raw] * 10; in rx51_battery_read_temperature()
114 /* Binary search RAW value in second inverse table */ in rx51_battery_read_temperature()
117 if (rx51_temp_table2[mid] <= raw) in rx51_battery_read_temperature()
119 else if (rx51_temp_table2[mid] > raw) in rx51_battery_read_temperature()
121 if (rx51_temp_table2[mid] == raw) in rx51_battery_read_temperature()
129 * Read ADCIN channel 4 (BSI) and convert RAW value to micro Ah