• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/arm/allwinner/

Lines Matching refs:sensor

29  * Allwinner thermal sensor controller
178 a83t_to_temp(uint32_t val, int sensor)
210 a64_to_temp(uint32_t val, int sensor)
242 h3_to_temp(uint32_t val, int sensor)
248 h3_to_reg(int val, int sensor)
274 h5_to_temp(uint32_t val, int sensor)
285 if (sensor == 0)
287 else if (sensor == 1)
290 printf("Unknown sensor %d\n", sensor);
299 h5_to_reg(int val, int sensor)
307 if (sensor == 0) {
310 } else if (sensor == 1) {
314 printf("Unknown sensor %d\n", sensor);
433 aw_thermal_gettemp(struct aw_thermal_softc *sc, int sensor)
437 val = RD4(sc, THS_DATA0 + (sensor * 4));
439 return (sc->conf->to_temp(val, sensor));
443 aw_thermal_getshut(struct aw_thermal_softc *sc, int sensor)
447 val = RD4(sc, THS_SHUTDOWN0_CTRL + (sensor * 4));
450 return (sc->conf->to_temp(val, sensor));
454 aw_thermal_setshut(struct aw_thermal_softc *sc, int sensor, int temp)
458 val = RD4(sc, THS_SHUTDOWN0_CTRL + (sensor * 4));
460 val |= (sc->conf->to_reg(temp, sensor) << SHUT_T_HOT_SHIFT);
461 WR4(sc, THS_SHUTDOWN0_CTRL + (sensor * 4), val);
465 aw_thermal_gethyst(struct aw_thermal_softc *sc, int sensor)
469 val = RD4(sc, THS_ALARM0_CTRL + (sensor * 4));
472 return (sc->conf->to_temp(val, sensor));
476 aw_thermal_getalarm(struct aw_thermal_softc *sc, int sensor)
480 val = RD4(sc, THS_ALARM0_CTRL + (sensor * 4));
483 return (sc->conf->to_temp(val, sensor));
487 aw_thermal_setalarm(struct aw_thermal_softc *sc, int sensor, int temp)
491 val = RD4(sc, THS_ALARM0_CTRL + (sensor * 4));
493 val |= (sc->conf->to_reg(temp, sensor) << ALARM_T_HOT_SHIFT);
494 WR4(sc, THS_ALARM0_CTRL + (sensor * 4), val);
501 int sensor, val;
504 sensor = arg2;
506 val = aw_thermal_gettemp(sc, sensor) + TEMP_C_TO_K;