-/* $OpenBSD: pm_direct.c,v 1.30 2019/09/03 17:51:52 deraadt Exp $ */
+/* $OpenBSD: pm_direct.c,v 1.31 2022/09/18 21:36:41 gkoehler Exp $ */
/* $NetBSD: pm_direct.c,v 1.9 2000/06/08 22:10:46 tsubai Exp $ */
/*
PM_VIA_CLR_INTR(); /* clear VIA1 interrupt */
/* ask PM what happened */
- pmdata.command = 0x78;
+ pmdata.command = PMU_INT_ACK;
pmdata.num_data = 0;
pmdata.s_buf = &pmdata.data[2];
pmdata.r_buf = &pmdata.data[2];
}
/* this command enables the interrupt by operating ADB devices */
- pmdata.command = 0x20;
+ pmdata.command = PMU_ADB_CMD;
pmdata.num_data = 4;
pmdata.s_buf = pmdata.data;
pmdata.r_buf = pmdata.data;
-/* $OpenBSD: pm_direct.h,v 1.13 2012/09/02 08:16:40 mpi Exp $ */
+/* $OpenBSD: pm_direct.h,v 1.14 2022/09/18 21:36:41 gkoehler Exp $ */
/* $NetBSD: pm_direct.h,v 1.7 2005/01/07 04:59:58 briggs Exp $ */
/*
#define PMU_SMART_BATTERY_STATE 0x6f /* Read battery state */
+#define PMU_ADB_CMD 0x20 /* Send ADB packet */
+#define PMU_INT_ACK 0x78 /* Read interrupt bits */
#define PMU_I2C 0x9a /* I2C */
/* Bits in PMU interrupt and interrupt mask bytes */