notification to acpiac(4), so that the AC status can be reflected correctly
to programs like apm(8).
This for example fixes the AC status on the Microsoft Surface Go 4.
Help from kettenis@
ok deraadt@, kettenis@
-/* $OpenBSD: acpibat.c,v 1.70 2022/04/06 18:59:27 naddy Exp $ */
+/* $OpenBSD: acpibat.c,v 1.71 2024/06/24 15:56:07 mglocker Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
case 0x00: /* Poll sensors */
case 0x80: /* _BST changed */
acpibat_getbst(sc);
+ /*
+ * On some machines the Power Source Device doesn't get
+ * notified when the AC adapter is plugged or unplugged,
+ * but the battery does get notified.
+ */
+ aml_notify_dev(ACPI_DEV_AC, 0x80);
break;
case 0x81: /* _BIF/_BIX changed */
acpibat_getbix(sc);