-/* $OpenBSD: aplsmc.c,v 1.22 2023/05/27 19:35:55 kettenis Exp $ */
+/* $OpenBSD: aplsmc.c,v 1.23 2023/05/29 04:24:39 deraadt Exp $ */
/*
* Copyright (c) 2021 Mark Kettenis <kettenis@openbsd.org>
*
if (error)
return;
+#ifndef SMALL_KERNEL
if (ch0i & CH0I_DISCHARGE)
hw_battery_chargemode = -1;
else if (ch0c & CH0C_INHIBIT)
hw_battery_setchargemode = aplsmc_battery_setchargemode;
hw_battery_setchargestart = aplsmc_battery_setchargestart;
hw_battery_setchargestop = aplsmc_battery_setchargestop;
+#endif
}
+#ifndef SMALL_KERNEL
int
aplsmc_battery_setchargemode(int mode)
{
return aplsmc_write_key(sc, SMC_KEY("CHWA"), &chwa, sizeof(chwa));
}
+#endif