summaryrefslogtreecommitdiff
path: root/sys/arch/zaurus/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/zaurus/dev')
-rw-r--r--sys/arch/zaurus/dev/zaurus_apm.c6
-rw-r--r--sys/arch/zaurus/dev/zaurus_audio.c24
-rw-r--r--sys/arch/zaurus/dev/zaurus_kbd.c16
-rw-r--r--sys/arch/zaurus/dev/zaurus_scoop.c15
-rw-r--r--sys/arch/zaurus/dev/zaurus_ssp.c13
-rw-r--r--sys/arch/zaurus/dev/zts.c21
6 files changed, 9 insertions, 86 deletions
diff --git a/sys/arch/zaurus/dev/zaurus_apm.c b/sys/arch/zaurus/dev/zaurus_apm.c
index 976a95db3b3..fdcd91475f0 100644
--- a/sys/arch/zaurus/dev/zaurus_apm.c
+++ b/sys/arch/zaurus/dev/zaurus_apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zaurus_apm.c,v 1.19 2010/08/31 17:13:46 deraadt Exp $ */
+/* $OpenBSD: zaurus_apm.c,v 1.20 2010/09/07 16:21:41 deraadt Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de>
@@ -561,7 +561,7 @@ zapm_power_info(struct pxa2x0_apm_softc *pxa_sc, struct apm_power_info *power)
}
/*
- * Called before suspending when all powerhooks are done.
+ * Called before suspending when all ca_activate functions are done.
*/
void
zapm_suspend(struct pxa2x0_apm_softc *pxa_sc)
@@ -588,7 +588,7 @@ zapm_suspend(struct pxa2x0_apm_softc *pxa_sc)
/*
* Called after wake-up from suspend with interrupts still disabled,
- * before any powerhooks are done.
+ * before any ca_activate functions are done.
*/
int
zapm_resume(struct pxa2x0_apm_softc *pxa_sc)
diff --git a/sys/arch/zaurus/dev/zaurus_audio.c b/sys/arch/zaurus/dev/zaurus_audio.c
index 2bd220e2c94..ec620d0dbf5 100644
--- a/sys/arch/zaurus/dev/zaurus_audio.c
+++ b/sys/arch/zaurus/dev/zaurus_audio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zaurus_audio.c,v 1.13 2010/08/30 21:35:57 deraadt Exp $ */
+/* $OpenBSD: zaurus_audio.c,v 1.14 2010/09/07 16:21:41 deraadt Exp $ */
/*
* Copyright (c) 2005 Christopher Pascoe <pascoe@openbsd.org>
@@ -18,7 +18,6 @@
/*
* TODO:
- * - powerhooks (currently only works until first suspend)
* - record support
*/
@@ -57,7 +56,6 @@ int zaudio_match(struct device *, void *, void *);
void zaudio_attach(struct device *, struct device *, void *);
int zaudio_detach(struct device *, int);
int zaudio_activate(struct device *, int);
-void zaudio_powerhook(int, void *);
#define ZAUDIO_OP_SPKR 0
#define ZAUDIO_OP_HP 1
@@ -85,7 +83,6 @@ struct zaudio_softc {
/* i2c device softc */
struct pxa2x0_i2c_softc sc_i2c;
- void *sc_powerhook;
int sc_playing;
struct zaudio_volume sc_volume[2];
@@ -200,12 +197,6 @@ zaudio_attach(struct device *parent, struct device *self, void *aux)
struct pxaip_attach_args *pxa = aux;
int err;
- sc->sc_powerhook = powerhook_establish(zaudio_powerhook, sc);
- if (sc->sc_powerhook == NULL) {
- printf(": unable to establish powerhook\n");
- return;
- }
-
sc->sc_i2s.sc_iot = pxa->pxa_iot;
sc->sc_i2s.sc_dmat = pxa->pxa_dmat;
sc->sc_i2s.sc_size = PXA2X0_I2S_SIZE;
@@ -258,7 +249,7 @@ fail_probe:
fail_i2c:
pxa2x0_i2s_detach_sub(&sc->sc_i2s);
fail_i2s:
- powerhook_disestablish(sc->sc_powerhook);
+ ;
}
int
@@ -266,11 +257,6 @@ zaudio_detach(struct device *self, int flags)
{
struct zaudio_softc *sc = (struct zaudio_softc *)self;
- if (sc->sc_powerhook != NULL) {
- powerhook_disestablish(sc->sc_powerhook);
- sc->sc_powerhook = NULL;
- }
-
pxa2x0_i2c_detach_sub(&sc->sc_i2c);
pxa2x0_i2s_detach_sub(&sc->sc_i2s);
@@ -297,12 +283,6 @@ zaudio_activate(struct device *self, int act)
}
void
-zaudio_powerhook(int why, void *arg)
-{
- zaudio_activate(arg, why);
-}
-
-void
zaudio_init(struct zaudio_softc *sc)
{
pxa2x0_i2c_open(&sc->sc_i2c);
diff --git a/sys/arch/zaurus/dev/zaurus_kbd.c b/sys/arch/zaurus/dev/zaurus_kbd.c
index 5aa281938d6..43f3c0960c3 100644
--- a/sys/arch/zaurus/dev/zaurus_kbd.c
+++ b/sys/arch/zaurus/dev/zaurus_kbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zaurus_kbd.c,v 1.30 2010/08/30 21:35:57 deraadt Exp $ */
+/* $OpenBSD: zaurus_kbd.c,v 1.31 2010/09/07 16:21:41 deraadt Exp $ */
/*
* Copyright (c) 2005 Dale Rahn <drahn@openbsd.org>
*
@@ -109,7 +109,6 @@ struct zkbd_softc {
char sc_rep[MAXKEYS];
int sc_nrep;
#endif
- void *sc_powerhook;
};
struct zkbd_softc *zkbd_dev; /* XXX */
@@ -123,7 +122,6 @@ void zkbd_poll(void *v);
int zkbd_on(void *v);
int zkbd_sync(void *v);
int zkbd_hinge(void *v);
-void zkbd_powerhook(int why, void *arg);
int zkbd_modstate;
@@ -184,12 +182,6 @@ zkbd_attach(struct device *parent, struct device *self, void *aux)
#endif
/* Determine which system we are - XXX */
- sc->sc_powerhook = powerhook_establish(zkbd_powerhook, sc);
- if (sc->sc_powerhook == NULL) {
- printf(": unable to establish powerhook\n");
- return;
- }
-
if (1 /* C3000 */) {
sc->sc_sense_array = gpio_sense_pins_c3000;
sc->sc_strobe_array = gpio_strobe_pins_c3000;
@@ -587,9 +579,3 @@ zkbd_activate(struct device *self, int act)
}
return 0;
}
-
-void
-zkbd_powerhook(int why, void *arg)
-{
- zkbd_activate(arg, why);
-}
diff --git a/sys/arch/zaurus/dev/zaurus_scoop.c b/sys/arch/zaurus/dev/zaurus_scoop.c
index 8f0a3f7cdaf..f14c644c22d 100644
--- a/sys/arch/zaurus/dev/zaurus_scoop.c
+++ b/sys/arch/zaurus/dev/zaurus_scoop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zaurus_scoop.c,v 1.20 2010/08/30 21:35:57 deraadt Exp $ */
+/* $OpenBSD: zaurus_scoop.c,v 1.21 2010/09/07 16:21:41 deraadt Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de>
@@ -40,7 +40,6 @@ struct scoop_softc {
bus_space_tag_t sc_iot;
bus_space_handle_t sc_ioh;
u_int16_t sc_gpwr; /* GPIO state before suspend */
- void *sc_powerhook;
int sc_suspended;
};
@@ -69,7 +68,6 @@ void scoop0_set_card_power(enum card, int);
struct timeout scoop_checkdisk;
void scoop_timeout(void *);
-void scoop_powerhook(int, void *);
int
scoopmatch(struct device *parent, void *match, void *aux)
@@ -121,11 +119,6 @@ scoopattach(struct device *parent, struct device *self, void *aux)
timeout_set(&scoop_checkdisk, scoop_timeout, sc);
printf(": PCMCIA/GPIO controller\n");
-
- sc->sc_powerhook = powerhook_establish(scoop_powerhook, sc);
- if (sc->sc_powerhook == NULL)
- panic("Unable to establish %s powerhook",
- sc->sc_dev.dv_xname);
}
int
@@ -477,9 +470,3 @@ scoop_activate(struct device *self, int act)
}
return 0;
}
-
-void
-scoop_powerhook(int why, void *arg)
-{
- scoop_activate(arg, why);
-}
diff --git a/sys/arch/zaurus/dev/zaurus_ssp.c b/sys/arch/zaurus/dev/zaurus_ssp.c
index b66b75a7824..31282237ae2 100644
--- a/sys/arch/zaurus/dev/zaurus_ssp.c
+++ b/sys/arch/zaurus/dev/zaurus_ssp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zaurus_ssp.c,v 1.7 2010/08/30 21:35:57 deraadt Exp $ */
+/* $OpenBSD: zaurus_ssp.c,v 1.8 2010/09/07 16:21:41 deraadt Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de>
@@ -46,7 +46,6 @@ int zssp_match(struct device *, void *, void *);
void zssp_attach(struct device *, struct device *, void *);
void zssp_init(void);
int zssp_activate(struct device *, int);
-void zssp_powerhook(int, void *);
int zssp_read_max1111(u_int32_t);
u_int32_t zssp_read_ads7846(u_int32_t);
@@ -81,10 +80,6 @@ zssp_attach(struct device *parent, struct device *self, void *aux)
printf("\n");
- if (powerhook_establish(zssp_powerhook, sc) == NULL)
- printf("%s: can't establish power hook\n",
- sc->sc_dev.dv_xname);
-
zssp_init();
}
@@ -123,12 +118,6 @@ zssp_activate(struct device *self, int act)
return 0;
}
-void
-zssp_powerhook(int why, void *arg)
-{
- zssp_activate(arg, why);
-}
-
/*
* Transmit a single data word to one of the ICs, keep the chip selected
* afterwards, and don't wait for data to be returned in SSDR. Interrupts
diff --git a/sys/arch/zaurus/dev/zts.c b/sys/arch/zaurus/dev/zts.c
index 9e8969f8acf..10b98f37bed 100644
--- a/sys/arch/zaurus/dev/zts.c
+++ b/sys/arch/zaurus/dev/zts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zts.c,v 1.13 2010/08/30 21:35:57 deraadt Exp $ */
+/* $OpenBSD: zts.c,v 1.14 2010/09/07 16:21:41 deraadt Exp $ */
/*
* Copyright (c) 2005 Dale Rahn <drahn@openbsd.org>
*
@@ -74,7 +74,6 @@ void zts_attach(struct device *, struct device *, void *);
int zts_activate(struct device *, int);
int zts_enable(void *);
void zts_disable(void *);
-void zts_powerhook(int, void *);
void zts_poll(void *);
int zts_irq(void *);
int zts_ioctl(void *, u_long, caddr_t, int, struct proc *);
@@ -83,7 +82,6 @@ struct zts_softc {
struct device sc_dev;
struct timeout sc_ts_poll;
void *sc_gh;
- void *sc_powerhook;
int sc_enabled;
int sc_running;
int sc_buttons; /* button emulation ? */
@@ -158,12 +156,6 @@ zts_enable(void *v)
timeout_del(&sc->sc_ts_poll);
- sc->sc_powerhook = powerhook_establish(zts_powerhook, sc);
- if (sc->sc_powerhook == NULL) {
- printf("%s: enable failed\n", sc->sc_dev.dv_xname);
- return ENOMEM;
- }
-
pxa2x0_gpio_set_function(GPIO_TP_INT_C3K, GPIO_IN);
/* XXX */
@@ -189,11 +181,6 @@ zts_disable(void *v)
timeout_del(&sc->sc_ts_poll);
- if (sc->sc_powerhook != NULL) {
- powerhook_disestablish(sc->sc_powerhook);
- sc->sc_powerhook = NULL;
- }
-
if (sc->sc_gh != NULL) {
#if 0
pxa2x0_gpio_intr_disestablish(sc->sc_gh);
@@ -254,12 +241,6 @@ zts_activate(struct device *self, int act)
return 0;
}
-void
-zts_powerhook(int why, void *v)
-{
- zts_activate(v, why);
-}
-
struct zts_pos {
int x;
int y;