diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-22 22:55:26 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-22 22:55:26 +0000 |
commit | e4560efe8b8567e3821c4da1b1622045cbf56d48 (patch) | |
tree | 1af332f06d32cac476cda54b9df95018866528e0 /sys/arch/macppc/dev/pm_direct.c | |
parent | 18e73a0ee31aaea3d6233f0cfbfaaa6bb8b96ce7 (diff) |
Remove orphaned adb/pmu stuff; ok hshoexer@ kettenis@
Diffstat (limited to 'sys/arch/macppc/dev/pm_direct.c')
-rw-r--r-- | sys/arch/macppc/dev/pm_direct.c | 95 |
1 files changed, 3 insertions, 92 deletions
diff --git a/sys/arch/macppc/dev/pm_direct.c b/sys/arch/macppc/dev/pm_direct.c index fb531c308eb..fc22ea56242 100644 --- a/sys/arch/macppc/dev/pm_direct.c +++ b/sys/arch/macppc/dev/pm_direct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pm_direct.c,v 1.16 2005/12/10 13:45:38 pedro Exp $ */ +/* $OpenBSD: pm_direct.c,v 1.17 2005/12/22 22:55:25 miod Exp $ */ /* $NetBSD: pm_direct.c,v 1.9 2000/06/08 22:10:46 tsubai Exp $ */ /* @@ -79,9 +79,6 @@ * Variables for internal use */ int pmHardware = PM_HW_UNKNOWN; -u_short pm_existent_ADB_devices = 0x0; /* each bit expresses the existent ADB device */ -u_int pm_LCD_brightness = 0x0; -u_int pm_LCD_contrast = 0x0; /* these values shows that number of data returned after 'send' cmd is sent */ signed char pm_send_cmd_type[] = { @@ -174,9 +171,6 @@ int pm_send_pm2(u_char); int pm_pmgrop_pm2(PMData *); void pm_intr_pm2(void); -/* this function is MRG-Based (for testing) */ -int pm_pmgrop_mrg(PMData *); - /* these functions also use the variables of adb_direct.c */ void pm_adb_get_TALK_result(PMData *); void pm_adb_get_ADB_data(PMData *); @@ -240,19 +234,6 @@ pm_setup_adb() /* - * Check the existent ADB devices - */ -void -pm_check_adb_devices(int id) -{ - u_short ed = 0x1; - - ed <<= id; - pm_existent_ADB_devices |= ed; -} - - -/* * Wait until PM IC is busy */ int @@ -765,47 +746,7 @@ pm_set_date_time(time_t time) pmgrop(&p); } -int -pm_read_brightness() -{ - PMData p; - - p.command = PMU_READ_BRIGHTNESS; - p.num_data = 1; /* XXX why 1? */ - p.s_buf = p.r_buf = p.data; - p.data[0] = 0; - pmgrop(&p); - - return p.data[0]; -} - -void -pm_set_brightness(int val) -{ - PMData p; - - val = 0x7f - val / 2; - if (val < 0x08) - val = 0x08; - if (val > 0x78) - val = 0x78; - - p.command = PMU_SET_BRIGHTNESS; - p.num_data = 1; - p.s_buf = p.r_buf = p.data; - p.data[0] = val; - pmgrop(&p); -} - -void -pm_init_brightness() -{ - int val; - - val = pm_read_brightness(); - pm_set_brightness(val); -} - +#if 0 void pm_eject_pcmcia(int slot) { @@ -820,6 +761,7 @@ pm_eject_pcmcia(int slot) p.data[0] = 5 + slot; /* XXX */ pmgrop(&p); } +#endif /* @@ -865,34 +807,3 @@ pm_battery_info(int battery, struct pmu_battery_info *info) return 1; } - - - -int -pm_read_nvram(int addr) -{ - PMData p; - - p.command = PMU_READ_NVRAM; - p.num_data = 2; - p.s_buf = p.r_buf = p.data; - p.data[0] = addr >> 8; - p.data[1] = addr; - pmgrop(&p); - - return p.data[0]; -} - -void -pm_write_nvram(int addr, int val) -{ - PMData p; - - p.command = PMU_WRITE_NVRAM; - p.num_data = 3; - p.s_buf = p.r_buf = p.data; - p.data[0] = addr >> 8; - p.data[1] = addr; - p.data[2] = val; - pmgrop(&p); -} |