patch-2.2.4 linux/include/asm-ppc/pmu.h
Next file: linux/include/asm-ppc/posix_types.h
Previous file: linux/include/asm-ppc/pgtable.h
Back to the patch index
Back to the overall index
- Lines: 64
- Date:
Wed Mar 10 21:30:32 1999
- Orig file:
v2.2.3/linux/include/asm-ppc/pmu.h
- Orig date:
Thu Nov 19 09:56:29 1998
diff -u --recursive --new-file v2.2.3/linux/include/asm-ppc/pmu.h linux/include/asm-ppc/pmu.h
@@ -9,7 +9,7 @@
/*
* PMU commands
*/
-#define PMU_BACKLIGHT_CTRL 0x11 /* control backlight */
+#define PMU_POWER_CTRL 0x11 /* control power of some devices */
#define PMU_ADB_CMD 0x20 /* send ADB packet */
#define PMU_ADB_POLL_OFF 0x21 /* disable ADB auto-poll */
#define PMU_WRITE_NVRAM 0x33 /* write non-volatile RAM */
@@ -29,6 +29,12 @@
#define PMU_GET_BRIGHTBUTTON 0xd9 /* report brightness up/down pos */
#define PMU_GET_COVER 0xdc /* report cover open/closed */
+/* Bits to use with the PMU_POWER_CTRL command */
+#define PMU_POW_ON 0x80 /* OR this to power ON the device */
+#define PMU_POW_OFF 0x00 /* leave bit 7 to 0 to power it OFF */
+#define PMU_POW_BACKLIGHT 0x01 /* backlight power */
+#define PMU_POW_IRLED 0x04 /* IR led power (on wallstreet) ??? */
+
/* Bits in PMU interrupt and interrupt mask bytes */
#define PMU_INT_ADB_AUTO 0x04 /* ADB autopoll, when PMU_INT_ADB */
#define PMU_INT_PCEJECT 0x04 /* PC-card eject buttons */
@@ -36,13 +42,26 @@
#define PMU_INT_ADB 0x10 /* ADB autopoll or reply data */
#define PMU_INT_TICK 0x80 /* 1-second tick interrupt */
+/* Kind of PMU (model) */
+enum {
+ PMU_UNKNOWN,
+ PMU_OHARE_BASED,
+ PMU_HEATHROW_BASED
+};
/*
* Ioctl commands for the /dev/pmu device
*/
#include <linux/ioctl.h>
+/* no param */
#define PMU_IOC_SLEEP _IO('B', 0)
+/* out param: u32* backlight value: 0 to 31 */
+#define PMU_IOC_GET_BACKLIGHT _IOR('B', 1, sizeof(__u32*))
+/* in param: u32 backlight value: 0 to 31 */
+#define PMU_IOC_SET_BACKLIGHT _IOW('B', 2, sizeof(__u32))
+/* out param: u32* backlight value: 0 to 31 */
+#define PMU_IOC_GET_MODEL _IOR('B', 3, sizeof(__u32*))
#ifdef __KERNEL__
void find_via_pmu(void);
@@ -53,9 +72,14 @@
void pmu_poll(void);
void pmu_enable_backlight(int on);
+void pmu_set_brightness(int level);
+
+void pmu_enable_irled(int on);
void pmu_restart(void);
void pmu_shutdown(void);
+
+int pmu_get_model(void);
/*
* Stuff for putting the powerbook to sleep and waking it again.
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)