summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc
diff options
context:
space:
mode:
authorGeorge Koehler <gkoehler@cvs.openbsd.org>2022-10-21 22:42:37 +0000
committerGeorge Koehler <gkoehler@cvs.openbsd.org>2022-10-21 22:42:37 +0000
commitebdd629c20fba9b043a7e3387800de2d01a9ba53 (patch)
tree41688fb3cd2ad7600b77e067745d207fb2771ee9 /sys/arch/powerpc
parent50a0af2a43e70dc00de390c2c0d8f73169e5134d (diff)
hw.power, machdep.lidaction, machdep.pwraction for macppc
I can now use the power button to power off my macppcs running OpenBSD. The new sysctls machdep.lidaction and machdep.pwraction act like acpibtn(4), but we are missing code to suspend or hibernate a macppc. Small kernels (bsd.rd) continue to ignore the power button. adb(4) sends an environment interrupt when I unplug my PowerBook's AC or close its lid. Rename PMU_INT_WAKEUP to PMU_INT_ENVIRONMENT like other BSDs and Linux. Handle PMU_ENV_LID_CLOSED as a lid sensor and PMU_ENV_AC_POWER by setting sysctl hw.power. Power buttons can either use PMU_ENV_POWER_BUTTON or go through akbd(4); handle both kinds of power buttons in the same way. Other models of macppc, with different power buttons or lids, might not work yet. The lid sensor looks like, $ sysctl hw.sensors hw.sensors.adb0.indicator0=On (lid open) kettenis@ warned against calling prsignal() from interrupt context, and pointed me to task_add(9).
Diffstat (limited to 'sys/arch/powerpc')
0 files changed, 0 insertions, 0 deletions