summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Stuehler <uwe@cvs.openbsd.org>2005-02-23 02:08:02 +0000
committerUwe Stuehler <uwe@cvs.openbsd.org>2005-02-23 02:08:02 +0000
commit5d2a9f33ba22525df75f3864e21eb3fc27448ee5 (patch)
tree06620a04b41db711f4361c9a2ca9acc87b4d6911
parent0b8fcd2f12ebeb07ed53ae58f6892b42d8bee144 (diff)
Make no distinction between standby and suspend requests for now.
-rw-r--r--share/man/man4/man4.zaurus/apm.411
-rw-r--r--sys/arch/arm/xscale/pxa2x0_apm.c44
2 files changed, 6 insertions, 49 deletions
diff --git a/share/man/man4/man4.zaurus/apm.4 b/share/man/man4/man4.zaurus/apm.4
index f598ef353d6..bf0627a9a9e 100644
--- a/share/man/man4/man4.zaurus/apm.4
+++ b/share/man/man4/man4.zaurus/apm.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: apm.4,v 1.2 2005/02/22 13:34:42 jmc Exp $
+.\" $OpenBSD: apm.4,v 1.3 2005/02/23 02:08:01 uwe Exp $
.\"
.\" Copyright (c) 1998 Marco S. Hyman
.\"
@@ -30,10 +30,8 @@ functions are translated into the appropriate Power Manager requests.
Currently only battery level, AC connection, and charging status is available
from the
.Nm
-device.
-Suspend mode is
-.Ud .
-Standby and other power events are
+device, and no distinction is made between standby and suspend requests.
+Other power events are
.Em NOT YET SUPPORTED .
.Pp
Configuration options:
@@ -59,7 +57,6 @@ They are defined in
.Pq Li "struct apm_event_info"
.Em Not implemented . DO NOT USE .
.It Dv APM_IOC_STANDBY
-.Em NOT YET SUPPORTED on zaurus
.Pq Li "no parameters"
Request
.Dq standby
@@ -301,7 +298,7 @@ driver source code contains these copyrights:
.Pp
\&...and has been hacked on by many others since.
.Sh BUGS
-Standby mode and power events are not supported.
+Power events are not supported.
.Pp
If the battery is charging, the battery life remaining is incorrectly
reported as 100% until charging is complete.
diff --git a/sys/arch/arm/xscale/pxa2x0_apm.c b/sys/arch/arm/xscale/pxa2x0_apm.c
index 9b05b1e375d..e843ce9c508 100644
--- a/sys/arch/arm/xscale/pxa2x0_apm.c
+++ b/sys/arch/arm/xscale/pxa2x0_apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_apm.c,v 1.4 2005/02/22 21:53:03 uwe Exp $ */
+/* $OpenBSD: pxa2x0_apm.c,v 1.5 2005/02/23 02:08:01 uwe Exp $ */
/*-
* Copyright (c) 2001 Alexander Guy. All rights reserved.
@@ -80,7 +80,6 @@ int apm_battlow; /* XXX unused */
void apm_power_info(struct pxa2x0_apm_softc *,
struct apm_power_info *);
-void apm_standby(struct pxa2x0_apm_softc *);
void apm_suspend(struct pxa2x0_apm_softc *);
void apm_resume(struct pxa2x0_apm_softc *);
void apm_periodic_check(struct pxa2x0_apm_softc *);
@@ -198,7 +197,6 @@ struct pxa2x0_memcfg pxa2x0_memcfg = {
#define PI2C_VOLTAGE_LOW 0x13 /* 1.00V */
#define PI2C_VOLTAGE_HIGH 0x1a /* 1.35V */
-void pxa2x0_apm_standby(struct pxa2x0_apm_softc *);
void pxa2x0_apm_sleep(struct pxa2x0_apm_softc *);
void pxa2x0_pi2c_open(bus_space_tag_t, bus_space_handle_t);
@@ -246,33 +244,6 @@ apm_power_info(struct pxa2x0_apm_softc *sc,
}
void
-apm_standby(struct pxa2x0_apm_softc *sc)
-{
-
- dopowerhooks(PWR_STANDBY);
-
- if (cold)
- vfs_syncwait(0);
-
- /*
- * Clear pending standby requests. Do not enter standby mode if
- * suspend was requested in the meantime.
- */
- apm_userstandbys = 0;
- if (apm_suspends) {
- /*
- * Arbitrary delay to avoid reinitializing some devices
- * too fast, since PWR_RESUME hooks will be run before
- * PWR_SUSPEND hooks. Perhaps this is overly paranoid.
- */
- delay(500000);
- return;
- }
-
- pxa2x0_apm_standby((struct pxa2x0_apm_softc *)sc);
-}
-
-void
apm_suspend(struct pxa2x0_apm_softc *sc)
{
@@ -307,12 +278,9 @@ apm_periodic_check(struct pxa2x0_apm_softc *sc)
* the processor run mode to avoid falling back to sleep after a
* wake-up event.
*/
- if (apm_suspends) {
+ if (apm_suspends || apm_userstandbys) {
apm_suspend(sc);
apm_resume(sc);
- } else if (apm_userstandbys) {
- apm_standby(sc);
- apm_resume(sc);
}
}
@@ -646,14 +614,6 @@ pxa2x0_wakeup_config(u_int32_t wsrc, int enable)
(wsrc & PXA2X0_WAKEUP_KEYNS_ALL) != 0);
}
-void
-pxa2x0_apm_standby(struct pxa2x0_apm_softc *sc)
-{
-
- /* XXX standby mode is not supported. */
- delay(1000000);
-}
-
struct pxa2x0_sleep_data {
/* OS timer registers */
u_int32_t sd_osmr0, sd_osmr1, sd_osmr2, sd_osmr3;