Lines Matching refs:sensor
30 * Allwinner thermal sensor controller
161 a83t_to_temp(u_int sensor, uint32_t val)
193 a64_to_temp(u_int sensor, uint32_t val)
222 h3_to_temp(u_int sensor, uint32_t val)
228 h3_to_reg(u_int sensor, int val)
253 h5_to_temp(u_int sensor, uint32_t val)
261 base = sensor == 0 ? H5_TEMP_BASE_H_0 : H5_TEMP_BASE_H_1;
262 mul = sensor == 0 ? H5_TEMP_MUL_H_0 : H5_TEMP_MUL_H_1;
269 h5_to_reg(u_int sensor, int val)
277 base = sensor == 0 ? H5_TEMP_BASE_H_0 : H5_TEMP_BASE_H_1;
278 mul = sensor == 0 ? H5_TEMP_MUL_H_0 : H5_TEMP_MUL_H_1;
384 sunxi_thermal_gettemp(struct sunxi_thermal_softc *sc, int sensor)
388 val = RD4(sc, THS_DATA0 + (sensor * 4));
390 return sc->conf->to_temp(sensor, val);
394 sunxi_thermal_getshut(struct sunxi_thermal_softc *sc, int sensor)
398 val = RD4(sc, THS_SHUTDOWN0_CTRL + (sensor * 4));
401 return sc->conf->to_temp(sensor, val);
405 sunxi_thermal_setshut(struct sunxi_thermal_softc *sc, int sensor, int temp)
409 val = RD4(sc, THS_SHUTDOWN0_CTRL + (sensor * 4));
411 val |= (sc->conf->to_reg(sensor, temp) << SHUT_T_HOT_SHIFT);
412 WR4(sc, THS_SHUTDOWN0_CTRL + (sensor * 4), val);
416 sunxi_thermal_gethyst(struct sunxi_thermal_softc *sc, int sensor)
420 val = RD4(sc, THS_ALARM0_CTRL + (sensor * 4));
423 return sc->conf->to_temp(sensor, val);
427 sunxi_thermal_getalarm(struct sunxi_thermal_softc *sc, int sensor)
431 val = RD4(sc, THS_ALARM0_CTRL + (sensor * 4));
434 return sc->conf->to_temp(sensor, val);
438 sunxi_thermal_setalarm(struct sunxi_thermal_softc *sc, int sensor, int temp)
442 val = RD4(sc, THS_ALARM0_CTRL + (sensor * 4));
444 val |= (sc->conf->to_reg(sensor, temp) << ALARM_T_HOT_SHIFT);
445 WR4(sc, THS_ALARM0_CTRL + (sensor * 4), val);
606 aprint_normal(": Thermal sensor controller\n");