-/* $OpenBSD: aplsmc.c,v 1.4 2022/01/12 13:08:06 robert Exp $ */
+/* $OpenBSD: aplsmc.c,v 1.5 2022/01/12 15:05:38 robert Exp $ */
/*
* Copyright (c) 2021 Mark Kettenis <kettenis@openbsd.org>
*
void
aplsmc_refresh_sensors(void *arg)
{
+ extern int hw_power;
struct aplsmc_softc *sc = arg;
struct aplsmc_sensor *sensor;
int64_t value;
sc->sc_sensors[i].flags &= ~SENSOR_FUNKNOWN;
sc->sc_sensors[i].value = value;
}
+
+ if (strcmp(sensor->key, "ACDI") == 0)
+ hw_power = (value > 0);
}
}