summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/arm/xscale/pxa2x0_lcd.c7
-rw-r--r--sys/arch/arm/xscale/pxa2x0_lcd.h3
-rw-r--r--sys/arch/zaurus/zaurus/zaurus_lcd.c20
3 files changed, 16 insertions, 14 deletions
diff --git a/sys/arch/arm/xscale/pxa2x0_lcd.c b/sys/arch/arm/xscale/pxa2x0_lcd.c
index c7f55b49d83..c32df339e3e 100644
--- a/sys/arch/arm/xscale/pxa2x0_lcd.c
+++ b/sys/arch/arm/xscale/pxa2x0_lcd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_lcd.c,v 1.16 2005/02/22 21:53:03 uwe Exp $ */
+/* $OpenBSD: pxa2x0_lcd.c,v 1.17 2005/04/11 03:32:48 uwe Exp $ */
/* $NetBSD: pxa2x0_lcd.c,v 1.8 2003/10/03 07:24:05 bsh Exp $ */
/*
@@ -91,7 +91,6 @@ void pxa2x0_lcd_start_dma(bus_space_tag_t, bus_space_handle_t,
void pxa2x0_lcd_stop_dma(bus_space_tag_t, bus_space_handle_t);
void pxa2x0_lcd_suspend(struct pxa2x0_lcd_softc *);
void pxa2x0_lcd_resume(struct pxa2x0_lcd_softc *);
-void pxa2x0_lcd_powerhook(int, void *);
/*
* Setup display geometry parameters.
@@ -264,8 +263,6 @@ pxa2x0_lcd_attach_sub(struct pxa2x0_lcd_softc *sc,
bzero(&dummy, sizeof(dummy));
pxa2x0_lcd_setup_rasops(&dummy, descr, geom);
}
-
- (void)powerhook_establish(pxa2x0_lcd_powerhook, sc);
}
/*
@@ -848,7 +845,7 @@ pxa2x0_lcd_resume(struct pxa2x0_lcd_softc *sc)
}
void
-pxa2x0_lcd_powerhook(int why, void *v)
+pxa2x0_lcd_power(int why, void *v)
{
struct pxa2x0_lcd_softc *sc = v;
diff --git a/sys/arch/arm/xscale/pxa2x0_lcd.h b/sys/arch/arm/xscale/pxa2x0_lcd.h
index 3ad91375355..1e44f46cd6d 100644
--- a/sys/arch/arm/xscale/pxa2x0_lcd.h
+++ b/sys/arch/arm/xscale/pxa2x0_lcd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_lcd.h,v 1.8 2005/04/06 01:31:05 pascoe Exp $ */
+/* $OpenBSD: pxa2x0_lcd.h,v 1.9 2005/04/11 03:32:48 uwe Exp $ */
/* $NetBSD: pxa2x0_lcd.h,v 1.2 2003/06/17 09:43:14 bsh Exp $ */
/*
* Copyright (c) 2002 Genetec Corporation. All rights reserved.
@@ -140,5 +140,6 @@ int pxa2x0_lcd_ioctl(void *, u_long, caddr_t, int, struct proc *);
paddr_t pxa2x0_lcd_mmap(void *, off_t, int);
int pxa2x0_lcd_show_screen(void *, void *, int, void (*)(void *, int, int),
void *);
+void pxa2x0_lcd_power(int, void *);
#endif /* _ARM_XSCALE_PXA2X0_LCD_H */
diff --git a/sys/arch/zaurus/zaurus/zaurus_lcd.c b/sys/arch/zaurus/zaurus/zaurus_lcd.c
index e23c4627cf3..a85d4d72b51 100644
--- a/sys/arch/zaurus/zaurus/zaurus_lcd.c
+++ b/sys/arch/zaurus/zaurus/zaurus_lcd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zaurus_lcd.c,v 1.13 2005/02/22 22:19:12 uwe Exp $ */
+/* $OpenBSD: zaurus_lcd.c,v 1.14 2005/04/11 03:32:48 uwe Exp $ */
/* $NetBSD: lubbock_lcd.c,v 1.1 2003/08/09 19:38:53 bsh Exp $ */
/*
@@ -31,13 +31,13 @@
*/
/*
- * LCD driver for Intel Lubbock.
+ * LCD driver for Sharp Zaurus (based on the Intel Lubbock driver).
*
* Controlling LCD is almost completely done through PXA2X0's
* integrated LCD controller. Codes for it is arm/xscale/pxa2x0_lcd.c.
*
* Codes in this file provide platform specific things including:
- * LCD on/off switch in on-board PLD register.
+ * LCD on/off switch and backlight brightness
* LCD panel geometry
*/
@@ -161,7 +161,7 @@ void lcd_set_brightness_internal(int);
int lcd_get_backlight(void);
void lcd_set_backlight(int);
void lcd_blank(int);
-void lcd_powerhook(int, void *);
+void lcd_power(int, void *);
int
lcd_match(struct device *parent, void *cf, void *aux)
@@ -193,7 +193,7 @@ lcd_attach(struct device *parent, struct device *self, void *aux)
/* Start with approximately 40% of full brightness. */
lcd_set_brightness(3);
- (void)powerhook_establish(lcd_powerhook, sc);
+ (void)powerhook_establish(lcd_power, sc);
}
int
@@ -347,13 +347,15 @@ lcd_set_brightness_internal(int newval)
*/
if (newval > curval) {
for (i = curval + 1; i <= newval; i++) {
- zssp_write_lz9jg18(CURRENT_BACKLIGHT[i].duty);
+ (void)zssp_ic_send(ZSSP_IC_LZ9JG18,
+ CURRENT_BACKLIGHT[i].duty);
scoop_set_backlight(CURRENT_BACKLIGHT[i].on,
CURRENT_BACKLIGHT[i].cont);
delay(5000);
}
} else {
- zssp_write_lz9jg18(CURRENT_BACKLIGHT[newval].duty);
+ (void)zssp_ic_send(ZSSP_IC_LZ9JG18,
+ CURRENT_BACKLIGHT[newval].duty);
scoop_set_backlight(CURRENT_BACKLIGHT[newval].on,
CURRENT_BACKLIGHT[newval].cont);
}
@@ -395,16 +397,18 @@ lcd_blank(int blank)
}
void
-lcd_powerhook(int why, void *v)
+lcd_power(int why, void *v)
{
switch (why) {
case PWR_SUSPEND:
case PWR_STANDBY:
lcd_set_brightness(0);
+ pxa2x0_lcd_power(why, v);
break;
case PWR_RESUME:
+ pxa2x0_lcd_power(why, v);
lcd_set_brightness(lcd_get_brightness());
break;
}