CVS commit: src/sys/arch/zaurus/dev

2024-05-01 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed May  1 19:11:46 UTC 2024

Modified Files:
src/sys/arch/zaurus/dev: wm8750_zaudio.c

Log Message:
s/Diffrential/Differential/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/zaurus/dev/wm8750_zaudio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/wm8750_zaudio.c
diff -u src/sys/arch/zaurus/dev/wm8750_zaudio.c:1.3 src/sys/arch/zaurus/dev/wm8750_zaudio.c:1.4
--- src/sys/arch/zaurus/dev/wm8750_zaudio.c:1.3	Wed May  8 13:40:17 2019
+++ src/sys/arch/zaurus/dev/wm8750_zaudio.c	Wed May  1 19:11:45 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: wm8750_zaudio.c,v 1.3 2019/05/08 13:40:17 isaki Exp $	*/
+/*	$NetBSD: wm8750_zaudio.c,v 1.4 2024/05/01 19:11:45 andvar Exp $	*/
 /*	$OpenBSD: zaurus_audio.c,v 1.8 2005/08/18 13:23:02 robert Exp $	*/
 
 /*
@@ -51,7 +51,7 @@
 #include "opt_zaudio.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wm8750_zaudio.c,v 1.3 2019/05/08 13:40:17 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wm8750_zaudio.c,v 1.4 2024/05/01 19:11:45 andvar Exp $");
 
 #include 
 #include 
@@ -192,7 +192,7 @@ static const uint16_t record_regs[][2] =
 	{ ADCTL1_REG, ADCTL1_TSDEN | ADCTL1_SET_VSEL(3)
 	  | ADCTL1_SET_DATSEL(1) },
 
-	/* Diffrential input select: LINPUT1-RINPUT1, stereo */
+	/* Differential input select: LINPUT1-RINPUT1, stereo */
 	{ ADCINPMODE_REG, 0x000 },
 
 	/* L-R differential, micboost 20dB */



CVS commit: src/sys/arch/zaurus/dev

2024-05-01 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed May  1 19:11:46 UTC 2024

Modified Files:
src/sys/arch/zaurus/dev: wm8750_zaudio.c

Log Message:
s/Diffrential/Differential/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/zaurus/dev/wm8750_zaudio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2021-11-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 20 00:17:10 UTC 2021

Modified Files:
src/sys/arch/zaurus/dev: w100.c

Log Message:
- Accept anti-aliased fonts.
- Clear garbage from screen when attach.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/zaurus/dev/w100.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/w100.c
diff -u src/sys/arch/zaurus/dev/w100.c:1.3 src/sys/arch/zaurus/dev/w100.c:1.4
--- src/sys/arch/zaurus/dev/w100.c:1.3	Sat Nov 21 17:22:03 2020
+++ src/sys/arch/zaurus/dev/w100.c	Sat Nov 20 00:17:10 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: w100.c,v 1.3 2020/11/21 17:22:03 thorpej Exp $ */
+/* $NetBSD: w100.c,v 1.4 2021/11/20 00:17:10 rin Exp $ */
 /*
  * Copyright (c) 2002, 2003  Genetec Corporation.  All rights reserved.
  * Written by Hiroyuki Bessho for Genetec Corporation.
@@ -28,7 +28,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: w100.c,v 1.3 2020/11/21 17:22:03 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: w100.c,v 1.4 2021/11/20 00:17:10 rin Exp $");
 
 #include 
 #include 
@@ -257,7 +257,7 @@ w100_setup_rasops(struct w100_softc *sc,
 struct w100_wsscreen_descr *descr, const struct w100_panel_geometry *geom)
 {
 
-	rinfo->ri_flg = descr->flags;
+	rinfo->ri_flg = descr->flags | RI_CLEAR | RI_ENABLE_ALPHA;
 	rinfo->ri_depth = descr->depth;
 	rinfo->ri_width = sc->display_width;
 	rinfo->ri_height = sc->display_height;



CVS commit: src/sys/arch/zaurus/dev

2021-11-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 20 00:17:10 UTC 2021

Modified Files:
src/sys/arch/zaurus/dev: w100.c

Log Message:
- Accept anti-aliased fonts.
- Clear garbage from screen when attach.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/zaurus/dev/w100.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2021-04-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Apr 13 13:18:50 UTC 2021

Modified Files:
src/sys/arch/zaurus/dev: w100lcd.c

Log Message:
Make LCD BrightnessUp/BrightnessDown work on C7x0/860.

Patch from steleto:
 https://gist.github.com/steleto/10f62a074bff0c188fcc10c14ef40b5a
and also confirmed by me on SL-C700.

Worth to pullup to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/zaurus/dev/w100lcd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/w100lcd.c
diff -u src/sys/arch/zaurus/dev/w100lcd.c:1.2 src/sys/arch/zaurus/dev/w100lcd.c:1.3
--- src/sys/arch/zaurus/dev/w100lcd.c:1.2	Fri Feb 10 11:25:42 2012
+++ src/sys/arch/zaurus/dev/w100lcd.c	Tue Apr 13 13:18:50 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: w100lcd.c,v 1.2 2012/02/10 11:25:42 tsutsui Exp $ */
+/* $NetBSD: w100lcd.c,v 1.3 2021/04/13 13:18:50 tsutsui Exp $ */
 /*
  * Copyright (c) 2002, 2003  Genetec Corporation.  All rights reserved.
  * Written by Hiroyuki Bessho for Genetec Corporation.
@@ -39,7 +39,9 @@
  * LCD on/off switch and backlight brightness are done in lcdctl.c.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: w100lcd.c,v 1.2 2012/02/10 11:25:42 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: w100lcd.c,v 1.3 2021/04/13 13:18:50 tsutsui Exp $");
+
+#include "lcdctl.h"
 
 #include 
 #include 
@@ -58,6 +60,9 @@ __KERNEL_RCSID(0, "$NetBSD: w100lcd.c,v 
 
 #include 
 #include 
+#if NLCDCTL > 0
+#include 
+#endif
 
 /*
  * wsdisplay glue



CVS commit: src/sys/arch/zaurus/dev

2021-04-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Apr 13 13:18:50 UTC 2021

Modified Files:
src/sys/arch/zaurus/dev: w100lcd.c

Log Message:
Make LCD BrightnessUp/BrightnessDown work on C7x0/860.

Patch from steleto:
 https://gist.github.com/steleto/10f62a074bff0c188fcc10c14ef40b5a
and also confirmed by me on SL-C700.

Worth to pullup to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/zaurus/dev/w100lcd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2020-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Nov 21 17:22:03 UTC 2020

Modified Files:
src/sys/arch/zaurus/dev: w100.c zkbd.c

Log Message:
malloc(9) -> kmem(9)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/zaurus/dev/w100.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/zaurus/dev/zkbd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/w100.c
diff -u src/sys/arch/zaurus/dev/w100.c:1.2 src/sys/arch/zaurus/dev/w100.c:1.3
--- src/sys/arch/zaurus/dev/w100.c:1.2	Sun Nov 10 21:16:34 2019
+++ src/sys/arch/zaurus/dev/w100.c	Sat Nov 21 17:22:03 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: w100.c,v 1.2 2019/11/10 21:16:34 chs Exp $ */
+/* $NetBSD: w100.c,v 1.3 2020/11/21 17:22:03 thorpej Exp $ */
 /*
  * Copyright (c) 2002, 2003  Genetec Corporation.  All rights reserved.
  * Written by Hiroyuki Bessho for Genetec Corporation.
@@ -28,13 +28,13 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: w100.c,v 1.2 2019/11/10 21:16:34 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: w100.c,v 1.3 2020/11/21 17:22:03 thorpej Exp $");
 
 #include 
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 			/* for cold */
 
 #include 
@@ -235,7 +235,7 @@ w100_new_screen(struct w100_softc *sc, i
 	struct w100_screen *scr = NULL;
 	int error = 0;
 
-	scr = malloc(sizeof(*scr), M_DEVBUF, M_WAITOK | M_ZERO);
+	scr = kmem_zalloc(sizeof(*scr), KM_SLEEP);
 	scr->buf_va = (u_char *)bus_space_vaddr(sc->iot, sc->ioh_vram);
 	scr->depth = depth;
 

Index: src/sys/arch/zaurus/dev/zkbd.c
diff -u src/sys/arch/zaurus/dev/zkbd.c:1.19 src/sys/arch/zaurus/dev/zkbd.c:1.20
--- src/sys/arch/zaurus/dev/zkbd.c:1.19	Sun Nov 10 21:16:34 2019
+++ src/sys/arch/zaurus/dev/zkbd.c	Sat Nov 21 17:22:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: zkbd.c,v 1.19 2019/11/10 21:16:34 chs Exp $	*/
+/*	$NetBSD: zkbd.c,v 1.20 2020/11/21 17:22:03 thorpej Exp $	*/
 /* $OpenBSD: zaurus_kbd.c,v 1.28 2005/12/21 20:36:03 deraadt Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: zkbd.c,v 1.19 2019/11/10 21:16:34 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zkbd.c,v 1.20 2020/11/21 17:22:03 thorpej Exp $");
 
 #include "opt_wsdisplay_compat.h"
 #if 0	/* XXX */
@@ -29,7 +29,7 @@ __KERNEL_RCSID(0, "$NetBSD: zkbd.c,v 1.1
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -283,10 +283,10 @@ zkbd_attach(device_t parent, device_t se
 		aprint_error_dev(sc->sc_dev,
 		"couldn't establish power handler\n");
 
-	sc->sc_okeystate = malloc(sc->sc_nsense * sc->sc_nstrobe,
-	M_DEVBUF, M_WAITOK | M_ZERO);
-	sc->sc_keystate = malloc(sc->sc_nsense * sc->sc_nstrobe,
-	M_DEVBUF, M_WAITOK | M_ZERO);
+	sc->sc_okeystate = kmem_zalloc(sc->sc_nsense * sc->sc_nstrobe,
+	KM_SLEEP);
+	sc->sc_keystate = kmem_zalloc(sc->sc_nsense * sc->sc_nstrobe,
+	KM_SLEEP);
 
 	/* set all the strobe bits */
 	for (i = 0; i < sc->sc_nstrobe; i++) {



CVS commit: src/sys/arch/zaurus/dev

2020-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Nov 21 17:22:03 UTC 2020

Modified Files:
src/sys/arch/zaurus/dev: w100.c zkbd.c

Log Message:
malloc(9) -> kmem(9)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/zaurus/dev/w100.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/zaurus/dev/zkbd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2019-11-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  2 23:03:53 UTC 2019

Modified Files:
src/sys/arch/zaurus/dev: zrc.c

Log Message:
Fix build errors with options WSDISPLAY_COMPAT_RAWKBD.

- Add missing RAWKEY_* macro definitions (taken from OpenBSD)
- Explicitly include "opt_wsdisplay_compat.h" for
  #ifdef WSDISPLAY_COMPAT_RAWKBD conditionals.
  (it is not properly pulled at least in netbsd-8)
 https://mail-index.netbsd.org/port-zaurus/2019/11/02/msg83.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/zaurus/dev/zrc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2019-11-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  2 23:03:53 UTC 2019

Modified Files:
src/sys/arch/zaurus/dev: zrc.c

Log Message:
Fix build errors with options WSDISPLAY_COMPAT_RAWKBD.

- Add missing RAWKEY_* macro definitions (taken from OpenBSD)
- Explicitly include "opt_wsdisplay_compat.h" for
  #ifdef WSDISPLAY_COMPAT_RAWKBD conditionals.
  (it is not properly pulled at least in netbsd-8)
 https://mail-index.netbsd.org/port-zaurus/2019/11/02/msg83.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/zaurus/dev/zrc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/zrc.c
diff -u src/sys/arch/zaurus/dev/zrc.c:1.9 src/sys/arch/zaurus/dev/zrc.c:1.10
--- src/sys/arch/zaurus/dev/zrc.c:1.9	Sat Oct 27 17:18:14 2012
+++ src/sys/arch/zaurus/dev/zrc.c	Sat Nov  2 23:03:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: zrc.c,v 1.9 2012/10/27 17:18:14 chs Exp $	*/
+/*	$NetBSD: zrc.c,v 1.10 2019/11/02 23:03:53 tsutsui Exp $	*/
 /*	$OpenBSD: zaurus_remote.c,v 1.1 2005/11/17 05:26:31 uwe Exp $	*/
 
 /*
@@ -17,8 +17,10 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "opt_wsdisplay_compat.h"
+
 #include 
-__KERNEL_RCSID(0, "$NetBSD: zrc.c,v 1.9 2012/10/27 17:18:14 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zrc.c,v 1.10 2019/11/02 23:03:53 tsutsui Exp $");
 
 #include 
 #include 
@@ -131,6 +133,11 @@ static const keysym_t zrc_keydesc[] = {
 };
 
 #ifdef WSDISPLAY_COMPAT_RAWKBD
+/* XXX see OpenBSD's  */
+#define	RAWKEY_Null		0x00
+#define	RAWKEY_AudioMute	0x85
+#define	RAWKEY_AudioLower	0x86
+#define	RAWKEY_AudioRaise 	0x87
 #define	RAWKEY_AudioRewind	0xa0
 #define	RAWKEY_AudioForward	0xa1
 #define	RAWKEY_AudioPlay	0xa2



CVS commit: src/sys/arch/zaurus/dev

2013-03-30 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Mar 30 08:35:06 UTC 2013

Modified Files:
src/sys/arch/zaurus/dev: zkbd.c

Log Message:
Apply patch from steleto, arranged by me.
- Avoid chattering for SL-C7x0/860
- Add more stuck keys.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/zaurus/dev/zkbd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/zkbd.c
diff -u src/sys/arch/zaurus/dev/zkbd.c:1.17 src/sys/arch/zaurus/dev/zkbd.c:1.18
--- src/sys/arch/zaurus/dev/zkbd.c:1.17	Sat Oct 27 17:18:14 2012
+++ src/sys/arch/zaurus/dev/zkbd.c	Sat Mar 30 08:35:06 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: zkbd.c,v 1.17 2012/10/27 17:18:14 chs Exp $	*/
+/*	$NetBSD: zkbd.c,v 1.18 2013/03/30 08:35:06 nonaka Exp $	*/
 /* $OpenBSD: zaurus_kbd.c,v 1.28 2005/12/21 20:36:03 deraadt Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zkbd.c,v 1.17 2012/10/27 17:18:14 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: zkbd.c,v 1.18 2013/03/30 08:35:06 nonaka Exp $);
 
 #include opt_wsdisplay_compat.h
 #if 0	/* XXX */
@@ -75,6 +75,14 @@ static const int gpio_strobe_pins_c3000[
 	114
 };
 
+static const int stuck_keys_c3000[] = {
+	1,  7,  15, 22, 23, 31, 39, 47,
+	53, 55, 60, 63, 66, 67, 69, 71,
+	72, 73, 74, 75, 76, 77, 78, 79,
+	82, 85, 86, 87, 90, 91, 92, 94,
+	95
+};
+
 static const int gpio_sense_pins_c860[] = {
 	58,
 	59,
@@ -101,11 +109,11 @@ static const int gpio_strobe_pins_c860[]
 	77
 };
 
-static const int stuck_keys[] = {
-	7,
-	15,
-	23,
-	31
+static const int stuck_keys_c860[] = {
+	0,  1,  47, 53, 55, 60, 63, 66,
+	67, 69, 71, 72, 73, 74, 76, 77,
+	78, 79, 80, 81, 82, 83, 85, 86,
+	87, 88, 89, 90, 91, 92, 94, 95
 };
 
 #define REP_DELAY1 400
@@ -158,7 +166,8 @@ static void	zkbd_attach(device_t, device
 CFATTACH_DECL_NEW(zkbd, sizeof(struct zkbd_softc),
 	zkbd_match, zkbd_attach, NULL, NULL);
 
-static int	zkbd_irq(void *v);
+static int	zkbd_irq_c3000(void *v);
+static int	zkbd_irq_c860(void *v);
 static void	zkbd_poll(void *v);
 static int	zkbd_on(void *v);
 static int	zkbd_sync(void *v);
@@ -238,8 +247,8 @@ zkbd_attach(device_t parent, device_t se
 		sc-sc_strobe_array = gpio_strobe_pins_c3000;
 		sc-sc_nsense = __arraycount(gpio_sense_pins_c3000);
 		sc-sc_nstrobe = __arraycount(gpio_strobe_pins_c3000);
-		sc-sc_stuck_keys = stuck_keys;
-		sc-sc_nstuck = __arraycount(stuck_keys);
+		sc-sc_stuck_keys = stuck_keys_c3000;
+		sc-sc_nstuck = __arraycount(stuck_keys_c3000);
 		sc-sc_maxkbdcol = 10;
 		sc-sc_onkey_pin = 95;
 		sc-sc_sync_pin = 16;
@@ -254,8 +263,8 @@ zkbd_attach(device_t parent, device_t se
 		sc-sc_strobe_array = gpio_strobe_pins_c860;
 		sc-sc_nsense = __arraycount(gpio_sense_pins_c860);
 		sc-sc_nstrobe = __arraycount(gpio_strobe_pins_c860);
-		sc-sc_stuck_keys = NULL;
-		sc-sc_nstuck = 0;
+		sc-sc_stuck_keys = stuck_keys_c860;
+		sc-sc_nstuck = __arraycount(stuck_keys_c860);
 		sc-sc_maxkbdcol = 0;
 		sc-sc_onkey_pin = -1;
 		sc-sc_sync_pin = -1;
@@ -296,8 +305,13 @@ zkbd_attach(device_t parent, device_t se
 		if (pin == -1)
 			continue;
 		pxa2x0_gpio_set_function(pin, GPIO_IN);
-		pxa2x0_gpio_intr_establish(pin, IST_EDGE_BOTH, IPL_TTY,
-		zkbd_irq, sc);
+		if (ZAURUS_ISC1000 || ZAURUS_ISC3000) {
+			pxa2x0_gpio_intr_establish(pin, IST_EDGE_BOTH,
+			IPL_TTY, zkbd_irq_c3000, sc);
+		} else if (ZAURUS_ISC860) {
+			pxa2x0_gpio_intr_establish(pin, IST_EDGE_RISING,
+			IPL_TTY, zkbd_irq_c860, sc);
+		}
 	}
 
 	if (sc-sc_onkey_pin = 0)
@@ -346,7 +360,7 @@ zkbd_rawrepeat(void *v)
 /* XXX are some not in the array? */
 /* handle keypress interrupt */
 static int
-zkbd_irq(void *v)
+zkbd_irq_c3000(void *v)
 {
 
 	zkbd_poll(v);
@@ -354,6 +368,19 @@ zkbd_irq(void *v)
 	return 1;
 }
 
+/* Avoid chattering only for SL-C7x0/860 */
+static int
+zkbd_irq_c860(void *v)
+{
+	struct zkbd_softc *sc = (struct zkbd_softc *)v;
+
+	if (!callout_pending(sc-sc_roll_to)) {
+		zkbd_poll(v);
+	}
+
+	return 1;
+}
+
 static void
 zkbd_poll(void *v)
 {



CVS commit: src/sys/arch/zaurus/dev

2013-03-30 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Mar 30 08:35:06 UTC 2013

Modified Files:
src/sys/arch/zaurus/dev: zkbd.c

Log Message:
Apply patch from steleto, arranged by me.
- Avoid chattering for SL-C7x0/860
- Add more stuck keys.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/zaurus/dev/zkbd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2012-08-12 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Aug 12 08:59:58 UTC 2012

Modified Files:
src/sys/arch/zaurus/dev: w100reg.h

Log Message:
fix RCSID.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/zaurus/dev/w100reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/w100reg.h
diff -u src/sys/arch/zaurus/dev/w100reg.h:1.1 src/sys/arch/zaurus/dev/w100reg.h:1.2
--- src/sys/arch/zaurus/dev/w100reg.h:1.1	Sun Jan 29 10:12:42 2012
+++ src/sys/arch/zaurus/dev/w100reg.h	Sun Aug 12 08:59:58 2012
@@ -1,4 +1,4 @@
-/* $NetBSD */
+/* $NetBSD: w100reg.h,v 1.2 2012/08/12 08:59:58 nonaka Exp $ */
 
 #define W100_REG_PCLK_CTRL   0x0090
 



CVS commit: src/sys/arch/zaurus/dev

2012-08-12 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Aug 12 08:59:58 UTC 2012

Modified Files:
src/sys/arch/zaurus/dev: w100reg.h

Log Message:
fix RCSID.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/zaurus/dev/w100reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2012-05-07 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon May  7 18:36:16 UTC 2012

Modified Files:
src/sys/arch/zaurus/dev: zkbdmap.h

Log Message:
Fix wrong raw keycode in xt_keymap_c860[] so that right shift properly works
on Xserver on C7x0/860.  From steleto.

Should be pulled up to netbsd-6.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/zaurus/dev/zkbdmap.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/zkbdmap.h
diff -u src/sys/arch/zaurus/dev/zkbdmap.h:1.6 src/sys/arch/zaurus/dev/zkbdmap.h:1.7
--- src/sys/arch/zaurus/dev/zkbdmap.h:1.6	Sun Jan 29 10:12:42 2012
+++ src/sys/arch/zaurus/dev/zkbdmap.h	Mon May  7 18:36:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: zkbdmap.h,v 1.6 2012/01/29 10:12:42 tsutsui Exp $	*/
+/*	$NetBSD: zkbdmap.h,v 1.7 2012/05/07 18:36:16 tsutsui Exp $	*/
 /* $OpenBSD: zaurus_kbdmap.h,v 1.19 2005/05/10 08:26:12 espie Exp $ */
 
 /*
@@ -327,7 +327,7 @@ static const char xt_keymap_c860[] = {
 /* KC(72), */	0x00, /* NC */
 /* KC(73), */	0x00, /* NC */
 /* KC(74), */	0x00, /* NC */
-/* KC(75), */	0x00, /* NC */
+/* KC(75), */	0x36, /* KS_Shift_R, */
 /* KC(76), */	0x00, /* NC */
 /* KC(77), */	0x00, /* NC */
 /* KC(78), */	0x00, /* NC */
@@ -335,7 +335,7 @@ static const char xt_keymap_c860[] = {
 /* KC(80), */	0x00, /* NC */
 /* KC(81), */	0x00, /* NC */
 /* KC(82), */	0x00, /* NC */
-/* KC(83), */	0x36, /* KS_Shift_R, */
+/* KC(83), */	0x00, /* NC */
 /* KC(84), */	0x2a, /* KS_Shift_L, */
 /* KC(85), */	0x00, /* NC */
 /* KC(86), */	0x00, /* NC */



CVS commit: src/sys/arch/zaurus/dev

2012-05-07 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon May  7 18:36:16 UTC 2012

Modified Files:
src/sys/arch/zaurus/dev: zkbdmap.h

Log Message:
Fix wrong raw keycode in xt_keymap_c860[] so that right shift properly works
on Xserver on C7x0/860.  From steleto.

Should be pulled up to netbsd-6.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/zaurus/dev/zkbdmap.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2012-01-27 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jan 27 14:48:22 UTC 2012

Modified Files:
src/sys/arch/zaurus/dev: lcdctl.c scoop.c

Log Message:
Allow calling scoop_set_backlight() even before scoop is attached and
schedule initial values in that case as ioexp does. Suggested by nonaka@.
Now lcdctl no longer has to defer lcdctl_set_brightness() by
config_finalize_register(9), which is a bit too late.
(i.e. no backlight during USB/SD probe by config_interrupt(9) in previous)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/zaurus/dev/lcdctl.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/zaurus/dev/scoop.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/lcdctl.c
diff -u src/sys/arch/zaurus/dev/lcdctl.c:1.1 src/sys/arch/zaurus/dev/lcdctl.c:1.2
--- src/sys/arch/zaurus/dev/lcdctl.c:1.1	Wed Jan 25 16:51:17 2012
+++ src/sys/arch/zaurus/dev/lcdctl.c	Fri Jan 27 14:48:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: lcdctl.c,v 1.1 2012/01/25 16:51:17 tsutsui Exp $	*/
+/*	$NetBSD: lcdctl.c,v 1.2 2012/01/27 14:48:22 tsutsui Exp $	*/
 
 /*-
  * Copyright (C) 2012 NONAKA Kimihiro non...@netbsd.org
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lcdctl.c,v 1.1 2012/01/25 16:51:17 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: lcdctl.c,v 1.2 2012/01/27 14:48:22 tsutsui Exp $);
 
 #include ioexp.h
 
@@ -79,7 +79,6 @@ static void	lcdctl_attach(device_t, devi
 CFATTACH_DECL_NEW(lcdctl, sizeof(struct lcdctl_softc),
 	lcdctl_match, lcdctl_attach, NULL, NULL);
 
-static int lcdctl_finalize(device_t);
 static void lcdctl_brightness_up(device_t);
 static void lcdctl_brightness_down(device_t);
 static void lcdctl_display_on(device_t);
@@ -119,8 +118,10 @@ lcdctl_attach(device_t parent, device_t 
 	sc-sc_nbacklighttbl = __arraycount(lcdctl_backlight_c3000);
 	sc-sc_backlighttbl = lcdctl_backlight_c3000;
 
-	/* schedule adjustment of LCD brightness after all devices are ready */
-	config_finalize_register(self, lcdctl_finalize);
+	/* Start with approximately 40% of full brightness. */
+	lcdctl_set_brightness(sc, 3);
+
+	lcdctl_sc = sc;
 
 	if (!pmf_event_register(self, PMFE_DISPLAY_BRIGHTNESS_UP,
 	lcdctl_brightness_up, true))
@@ -136,19 +137,6 @@ lcdctl_attach(device_t parent, device_t 
 		aprint_error_dev(self, couldn't register event handler\n);
 }
 
-static int
-lcdctl_finalize(device_t dv)
-{
-	struct lcdctl_softc *sc = device_private(dv);
-
-	/* Start with approximately 40% of full brightness. */
-	lcdctl_set_brightness(sc, 3);
-
-	lcdctl_sc = sc;
-
-	return 0;
-}
-
 static void
 lcdctl_brightness_up(device_t dv)
 {

Index: src/sys/arch/zaurus/dev/scoop.c
diff -u src/sys/arch/zaurus/dev/scoop.c:1.9 src/sys/arch/zaurus/dev/scoop.c:1.10
--- src/sys/arch/zaurus/dev/scoop.c:1.9	Tue Jul 19 15:11:49 2011
+++ src/sys/arch/zaurus/dev/scoop.c	Fri Jan 27 14:48:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: scoop.c,v 1.9 2011/07/19 15:11:49 dyoung Exp $	*/
+/*	$NetBSD: scoop.c,v 1.10 2012/01/27 14:48:22 tsutsui Exp $	*/
 /*	$OpenBSD: zaurus_scoop.c,v 1.12 2005/11/17 05:26:31 uwe Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: scoop.c,v 1.9 2011/07/19 15:11:49 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: scoop.c,v 1.10 2012/01/27 14:48:22 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -58,6 +58,10 @@ static int	scoop_gpio_pin_read(struct sc
 static void	scoop_gpio_pin_write(struct scoop_softc *, int, int);
 static void	scoop_gpio_pin_ctl(struct scoop_softc *, int, int);
 
+static struct scoop_softc *backlight_sc;
+static uint8_t backlight_on_init = 1;
+static uint8_t backlight_cont_init = 0;
+
 enum scoop_card {
 	SD_CARD,
 	CF_CARD		/* socket 0 (external) */
@@ -108,9 +112,13 @@ scoopattach(device_t parent, device_t se
 	if (ZAURUS_ISC3000  sc-sc_dev-dv_unit == 1) {
 		scoop_gpio_pin_ctl(sc, SCOOP1_AKIN_PULLUP, GPIO_PIN_OUTPUT);
 		scoop_gpio_pin_write(sc, SCOOP1_AKIN_PULLUP, GPIO_PIN_LOW);
+		backlight_sc = sc;
+		scoop_set_backlight(backlight_on_init, backlight_cont_init);
 	} else if (ZAURUS_ISC860) {
 		scoop_gpio_pin_ctl(sc, SCOOP0_AKIN_PULLUP, GPIO_PIN_OUTPUT);
 		scoop_gpio_pin_write(sc, SCOOP0_AKIN_PULLUP, GPIO_PIN_LOW);
+		backlight_sc = sc;
+		scoop_set_backlight(backlight_on_init, backlight_cont_init);
 	}
 }
 
@@ -161,25 +169,19 @@ scoop_gpio_pin_ctl(struct scoop_softc *s
 void
 scoop_set_backlight(int on, int cont)
 {
-	struct scoop_softc *sc;
-#if 0
-	struct scoop_softc *sc0;
+	struct scoop_softc *sc = backlight_sc;
 
-	sc0 = device_lookup_private(scoop_cd, 0);
-#endif
-
-	sc = device_lookup_private(scoop_cd, 1);
-	if (sc != NULL) {
-		/* C3000 */
-		scoop_gpio_pin_write(sc, SCOOP1_BACKLIGHT_CONT, !cont);
-		scoop_gpio_pin_write(sc, SCOOP1_BACKLIGHT_ON, on);
-	}
-#if 0
-	else if (sc0 != NULL) {
-		scoop_gpio_pin_write(sc0,
-		SCOOP0_BACKLIGHT_CONT, cont);
+	if (sc == NULL) {
+		backlight_cont_init = 

CVS commit: src/sys/arch/zaurus/dev

2012-01-27 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jan 27 15:07:42 UTC 2012

Modified Files:
src/sys/arch/zaurus/dev: zlcd.c

Log Message:
Update comments for recent lcdctl changes.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/zaurus/dev/zlcd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/zlcd.c
diff -u src/sys/arch/zaurus/dev/zlcd.c:1.16 src/sys/arch/zaurus/dev/zlcd.c:1.17
--- src/sys/arch/zaurus/dev/zlcd.c:1.16	Wed Jan 25 16:51:17 2012
+++ src/sys/arch/zaurus/dev/zlcd.c	Fri Jan 27 15:07:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: zlcd.c,v 1.16 2012/01/25 16:51:17 tsutsui Exp $	*/
+/*	$NetBSD: zlcd.c,v 1.17 2012/01/27 15:07:41 tsutsui Exp $	*/
 /*	$OpenBSD: zaurus_lcd.c,v 1.20 2006/06/02 20:50:14 miod Exp $	*/
 /* NetBSD: lubbock_lcd.c,v 1.1 2003/08/09 19:38:53 bsh Exp */
 
@@ -38,12 +38,13 @@
  * 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 and backlight brightness
  *   LCD panel geometry
+ *
+ * LCD on/off switch and backlight brightness are done in lcdctl.c.
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zlcd.c,v 1.16 2012/01/25 16:51:17 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: zlcd.c,v 1.17 2012/01/27 15:07:41 tsutsui Exp $);
 
 #include lcdctl.h
 



CVS commit: src/sys/arch/zaurus/dev

2012-01-27 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jan 27 14:48:22 UTC 2012

Modified Files:
src/sys/arch/zaurus/dev: lcdctl.c scoop.c

Log Message:
Allow calling scoop_set_backlight() even before scoop is attached and
schedule initial values in that case as ioexp does. Suggested by nonaka@.
Now lcdctl no longer has to defer lcdctl_set_brightness() by
config_finalize_register(9), which is a bit too late.
(i.e. no backlight during USB/SD probe by config_interrupt(9) in previous)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/zaurus/dev/lcdctl.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/zaurus/dev/scoop.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2012-01-27 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jan 27 15:07:42 UTC 2012

Modified Files:
src/sys/arch/zaurus/dev: zlcd.c

Log Message:
Update comments for recent lcdctl changes.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/zaurus/dev/zlcd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2012-01-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Jan 25 15:58:11 UTC 2012

Modified Files:
src/sys/arch/zaurus/dev: zaudio.c zrc.c ztp.c

Log Message:
Defer device initializations which implicitly depend on scoop or ioexp
via config_finalize_register(9).


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/zaurus/dev/zaudio.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/zaurus/dev/zrc.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/zaurus/dev/ztp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/zaudio.c
diff -u src/sys/arch/zaurus/dev/zaudio.c:1.17 src/sys/arch/zaurus/dev/zaudio.c:1.18
--- src/sys/arch/zaurus/dev/zaudio.c:1.17	Sat Jan 21 18:56:51 2012
+++ src/sys/arch/zaurus/dev/zaudio.c	Wed Jan 25 15:58:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: zaudio.c,v 1.17 2012/01/21 18:56:51 nonaka Exp $	*/
+/*	$NetBSD: zaudio.c,v 1.18 2012/01/25 15:58:10 tsutsui Exp $	*/
 /*	$OpenBSD: zaurus_audio.c,v 1.8 2005/08/18 13:23:02 robert Exp $	*/
 
 /*
@@ -50,7 +50,7 @@
 #include opt_zaudio.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zaudio.c,v 1.17 2012/01/21 18:56:51 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: zaudio.c,v 1.18 2012/01/25 15:58:10 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -132,6 +132,7 @@ static void	zaudio_attach(device_t, devi
 CFATTACH_DECL_NEW(zaudio, sizeof(struct zaudio_softc), 
 zaudio_match, zaudio_attach, NULL, NULL);
 
+static int	zaudio_finalize(device_t);
 static bool	zaudio_suspend(device_t, const pmf_qual_t *);
 static bool	zaudio_resume(device_t, const pmf_qual_t *);
 static void	zaudio_volume_up(device_t);
@@ -381,7 +382,8 @@ zaudio_attach(device_t parent, device_t 
 	(void) pxa2x0_gpio_intr_establish(GPIO_HP_IN_C3000, IST_EDGE_BOTH,
 	IPL_BIO, zaudio_jack_intr, sc);
 
-	zaudio_init(sc);
+	/* zaudio_init() implicitly depends on ioexp or scoop */
+	config_finalize_register(self, zaudio_finalize);
 
 	audio_attach_mi(wm8750_hw_if, sc, self);
 
@@ -405,6 +407,15 @@ fail_i2s:
 	pmf_device_deregister(self);
 }
 
+static int
+zaudio_finalize(device_t dv)
+{
+	struct zaudio_softc *sc = device_private(dv);
+
+	zaudio_init(sc);
+	return 0;
+}
+
 static bool
 zaudio_suspend(device_t dv, const pmf_qual_t *qual)
 {

Index: src/sys/arch/zaurus/dev/zrc.c
diff -u src/sys/arch/zaurus/dev/zrc.c:1.7 src/sys/arch/zaurus/dev/zrc.c:1.8
--- src/sys/arch/zaurus/dev/zrc.c:1.7	Sun Jun 19 16:20:09 2011
+++ src/sys/arch/zaurus/dev/zrc.c	Wed Jan 25 15:58:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: zrc.c,v 1.7 2011/06/19 16:20:09 nonaka Exp $	*/
+/*	$NetBSD: zrc.c,v 1.8 2012/01/25 15:58:10 tsutsui Exp $	*/
 /*	$OpenBSD: zaurus_remote.c,v 1.1 2005/11/17 05:26:31 uwe Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zrc.c,v 1.7 2011/06/19 16:20:09 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: zrc.c,v 1.8 2012/01/25 15:58:10 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -101,6 +101,7 @@ static void	zrc_attach(struct device *, 
 CFATTACH_DECL_NEW(zrc, sizeof(struct zrc_softc), 
 zrc_match, zrc_attach, NULL, NULL);
 
+static int	zrc_finalize(device_t);
 static int	zrc_intr(void *);
 static void	zrc_timeout(void *);
 static int	zrc_scan(void);
@@ -190,11 +191,8 @@ zrc_attach(device_t parent, device_t sel
 		return;
 	}
 
-	/* Enable the pullup while waiting for an interrupt. */
-	if (ZAURUS_ISC1000)
-		ioexp_akin_pullup(1);
-	else
-		scoop_akin_pullup(1);
+	/* defer enabling pullup until ioexp or scoop is attached */
+	config_finalize_register(self, zrc_finalize);
 
 	sc-sc_keydown = KEY_RELEASE;
 
@@ -207,6 +205,19 @@ zrc_attach(device_t parent, device_t sel
 }
 
 static int
+zrc_finalize(device_t dv)
+{
+
+	/* Enable the pullup while waiting for an interrupt. */
+	if (ZAURUS_ISC1000)
+		ioexp_akin_pullup(1);
+	else
+		scoop_akin_pullup(1);
+
+	return 0;
+}
+
+static int
 zrc_intr(void *v)
 {
 	struct zrc_softc *sc = v;

Index: src/sys/arch/zaurus/dev/ztp.c
diff -u src/sys/arch/zaurus/dev/ztp.c:1.10 src/sys/arch/zaurus/dev/ztp.c:1.11
--- src/sys/arch/zaurus/dev/ztp.c:1.10	Wed Feb 24 22:37:56 2010
+++ src/sys/arch/zaurus/dev/ztp.c	Wed Jan 25 15:58:10 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ztp.c,v 1.10 2010/02/24 22:37:56 dyoung Exp $	*/
+/*	$NetBSD: ztp.c,v 1.11 2012/01/25 15:58:10 tsutsui Exp $	*/
 /* $OpenBSD: zts.c,v 1.9 2005/04/24 18:55:49 uwe Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ztp.c,v 1.10 2010/02/24 22:37:56 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: ztp.c,v 1.11 2012/01/25 15:58:10 tsutsui Exp $);
 
 #include lcd.h
 
@@ -114,6 +114,7 @@ static void	ztp_attach(device_t, device_
 CFATTACH_DECL_NEW(ztp, sizeof(struct ztp_softc),
 	ztp_match, ztp_attach, NULL, NULL);
 
+static int	ztp_finalize(device_t);
 static int	ztp_enable(void *);
 static void	ztp_disable(void *);
 static bool	ztp_suspend(device_t dv, const pmf_qual_t *);
@@ -149,19 

CVS commit: src/sys/arch/zaurus/dev

2012-01-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Jan 25 15:58:11 UTC 2012

Modified Files:
src/sys/arch/zaurus/dev: zaudio.c zrc.c ztp.c

Log Message:
Defer device initializations which implicitly depend on scoop or ioexp
via config_finalize_register(9).


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/zaurus/dev/zaudio.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/zaurus/dev/zrc.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/zaurus/dev/ztp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2011-06-23 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Jun 23 10:56:03 UTC 2011

Modified Files:
src/sys/arch/zaurus/dev: zaudio.c ziic.c

Log Message:
set PXA2X0_I2C_BASE to sc-sc_addr in the correct position.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/zaurus/dev/zaudio.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/zaurus/dev/ziic.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/zaudio.c
diff -u src/sys/arch/zaurus/dev/zaudio.c:1.14 src/sys/arch/zaurus/dev/zaudio.c:1.15
--- src/sys/arch/zaurus/dev/zaudio.c:1.14	Wed Jun 22 16:18:54 2011
+++ src/sys/arch/zaurus/dev/zaudio.c	Thu Jun 23 10:56:03 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: zaudio.c,v 1.14 2011/06/22 16:18:54 kiyohara Exp $	*/
+/*	$NetBSD: zaudio.c,v 1.15 2011/06/23 10:56:03 nonaka Exp $	*/
 /*	$OpenBSD: zaurus_audio.c,v 1.8 2005/08/18 13:23:02 robert Exp $	*/
 
 /*
@@ -51,7 +51,7 @@
 #include opt_zaudio.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zaudio.c,v 1.14 2011/06/22 16:18:54 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: zaudio.c,v 1.15 2011/06/23 10:56:03 nonaka Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -344,7 +344,6 @@
 
 	sc-sc_i2s.sc_iot = pxa2x0_bs_tag;
 	sc-sc_i2s.sc_dmat = pxa2x0_bus_dma_tag;
-	sc-sc_i2c.sc_addr = PXA2X0_I2C_BASE;
 	sc-sc_i2s.sc_size = PXA2X0_I2S_SIZE;
 	if (pxa2x0_i2s_attach_sub(sc-sc_i2s)) {
 		aprint_error_dev(self, unable to attach I2S\n);

Index: src/sys/arch/zaurus/dev/ziic.c
diff -u src/sys/arch/zaurus/dev/ziic.c:1.1 src/sys/arch/zaurus/dev/ziic.c:1.2
--- src/sys/arch/zaurus/dev/ziic.c:1.1	Sun Jun 19 16:20:09 2011
+++ src/sys/arch/zaurus/dev/ziic.c	Thu Jun 23 10:56:03 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ziic.c,v 1.1 2011/06/19 16:20:09 nonaka Exp $	*/
+/*	$NetBSD: ziic.c,v 1.2 2011/06/23 10:56:03 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ziic.c,v 1.1 2011/06/19 16:20:09 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: ziic.c,v 1.2 2011/06/23 10:56:03 nonaka Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -80,6 +80,7 @@
 	if (strcmp(cf-cf_name, pxa-pxa_name))
 		return 0;
 
+	pxa-pxa_addr = PXA2X0_I2C_BASE;
 	pxa-pxa_size = PXA2X0_I2C_SIZE;
 	return 1;
 }
@@ -97,6 +98,7 @@
 
 	psc-sc_dev = self;
 	psc-sc_iot = pxa-pxa_iot;
+	psc-sc_addr = pxa-pxa_addr;
 	psc-sc_size = pxa-pxa_size;
 	psc-sc_flags = 0;
 	if (pxa2x0_i2c_attach_sub(psc)) {



CVS commit: src/sys/arch/zaurus/dev

2011-06-23 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Thu Jun 23 10:56:03 UTC 2011

Modified Files:
src/sys/arch/zaurus/dev: zaudio.c ziic.c

Log Message:
set PXA2X0_I2C_BASE to sc-sc_addr in the correct position.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/zaurus/dev/zaudio.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/zaurus/dev/ziic.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2011-06-21 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Tue Jun 21 17:17:27 UTC 2011

Modified Files:
src/sys/arch/zaurus/dev: zkbd.c zlcd.c zlcdvar.h

Log Message:
use pmf_event_inject() instead of call lcd_blank() directly.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/zaurus/dev/zkbd.c \
src/sys/arch/zaurus/dev/zlcd.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/zaurus/dev/zlcdvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/zkbd.c
diff -u src/sys/arch/zaurus/dev/zkbd.c:1.12 src/sys/arch/zaurus/dev/zkbd.c:1.13
--- src/sys/arch/zaurus/dev/zkbd.c:1.12	Sun Jun 19 16:20:09 2011
+++ src/sys/arch/zaurus/dev/zkbd.c	Tue Jun 21 17:17:27 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: zkbd.c,v 1.12 2011/06/19 16:20:09 nonaka Exp $	*/
+/*	$NetBSD: zkbd.c,v 1.13 2011/06/21 17:17:27 nonaka Exp $	*/
 /* $OpenBSD: zaurus_kbd.c,v 1.28 2005/12/21 20:36:03 deraadt Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zkbd.c,v 1.12 2011/06/19 16:20:09 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: zkbd.c,v 1.13 2011/06/21 17:17:27 nonaka Exp $);
 
 #include opt_wsdisplay_compat.h
 #if 0	/* XXX */
@@ -44,7 +44,6 @@
 
 #include zaurus/zaurus/zaurus_var.h
 #include zaurus/dev/zkbdmap.h
-#include zaurus/dev/zlcdvar.h
 
 static const int gpio_sense_pins_c3000[] = {
 	12,
@@ -299,11 +298,10 @@
 {
 	struct zkbd_softc *sc = (struct zkbd_softc *)v;
 	int i, j, col, pin, type, keysdown = 0;
-	int stuck;
 	int keystate;
 	int s;
 #ifdef WSDISPLAY_COMPAT_RAWKBD
-	int npress = 0, ncbuf = 0, c;
+	int npress = 0, ncbuf = 0;
 	char cbuf[MAXKEYS * 2];
 #endif
 
@@ -374,7 +372,7 @@
 		(sc-sc_keystate[14] ? (1  2) : 0)); /* 'alt' */
 
 	for (i = 0; i  sc-sc_nsense * sc-sc_nstrobe; i++) {
-		stuck = 0;
+		int stuck = 0;
 		/* extend  xt_keymap to do this faster. */
 		/* ignore 'stuck' keys' */
 		for (j = 0; j  __arraycount(stuck_keys); j++) {
@@ -390,9 +388,9 @@
 		keysdown |= keystate; /* if any keys held */
 
 #ifdef WSDISPLAY_COMPAT_RAWKBD
-		if (sc-sc_polling == 0  sc-sc_rawkbd) {
-			if ((keystate) || (sc-sc_okeystate[i] != keystate)) {
-c = sc-sc_xt_keymap[i];
+		if (!sc-sc_polling  sc-sc_rawkbd) {
+			if (keystate || sc-sc_okeystate[i] != keystate) {
+int c = sc-sc_xt_keymap[i];
 if (c  0x80) {
 	cbuf[ncbuf++] = 0xe0;
 }
@@ -412,7 +410,7 @@
 		}
 #endif
 
-		if ((!sc-sc_rawkbd)  (sc-sc_okeystate[i] != keystate)) {
+		if (!sc-sc_rawkbd  (sc-sc_okeystate[i] != keystate)) {
 			type = keystate ? WSCONS_EVENT_KEY_DOWN :
 			WSCONS_EVENT_KEY_UP;
 
@@ -428,7 +426,7 @@
 	}
 
 #ifdef WSDISPLAY_COMPAT_RAWKBD
-	if (sc-sc_polling == 0  sc-sc_rawkbd) {
+	if (!sc-sc_polling  sc-sc_rawkbd) {
 		wskbd_rawinput(sc-sc_wskbddev, cbuf, ncbuf);
 		sc-sc_nrep = npress;
 		if (npress != 0)
@@ -513,9 +511,9 @@
 		if (lid_suspend)
 			apm_suspends++;
 #endif
-		lcd_blank(1);
+		pmf_event_inject(NULL, PMFE_DISPLAY_OFF);
 	} else {
-		lcd_blank(0);
+		pmf_event_inject(NULL, PMFE_DISPLAY_ON);
 	}
 
 	return 1;
Index: src/sys/arch/zaurus/dev/zlcd.c
diff -u src/sys/arch/zaurus/dev/zlcd.c:1.12 src/sys/arch/zaurus/dev/zlcd.c:1.13
--- src/sys/arch/zaurus/dev/zlcd.c:1.12	Sun Jun 19 16:20:09 2011
+++ src/sys/arch/zaurus/dev/zlcd.c	Tue Jun 21 17:17:27 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: zlcd.c,v 1.12 2011/06/19 16:20:09 nonaka Exp $	*/
+/*	$NetBSD: zlcd.c,v 1.13 2011/06/21 17:17:27 nonaka Exp $	*/
 /*	$OpenBSD: zaurus_lcd.c,v 1.20 2006/06/02 20:50:14 miod Exp $	*/
 /* NetBSD: lubbock_lcd.c,v 1.1 2003/08/09 19:38:53 bsh Exp */
 
@@ -43,7 +43,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zlcd.c,v 1.12 2011/06/19 16:20:09 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: zlcd.c,v 1.13 2011/06/21 17:17:27 nonaka Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -169,6 +169,7 @@
 static void	lcd_set_brightness_internal(int);
 static int	lcd_get_backlight(void);
 static void	lcd_set_backlight(int);
+static void	lcd_blank(int);
 
 static int
 lcd_match(device_t parent, cfdata_t cf, void *aux)
@@ -266,14 +267,12 @@
 {
 
 	lcd_blank(0);
-	lcd_set_backlight(1);
 }
 
 static void
 lcd_display_off(device_t dv)
 {
 
-	lcd_set_backlight(0);
 	lcd_blank(1);
 }
 
@@ -501,7 +500,7 @@
 	else if (newval  maxval)
 		newval = maxval;
 
-	if (lcd_get_backlight()  !lcdisblank)
+	if (lcdislit  !lcdisblank)
 		lcd_set_brightness_internal(newval);
 
 	if (newval  0)
@@ -565,7 +564,7 @@
 	}
 }
 
-void
+static void
 lcd_blank(int blank)
 {
 

Index: src/sys/arch/zaurus/dev/zlcdvar.h
diff -u src/sys/arch/zaurus/dev/zlcdvar.h:1.1 src/sys/arch/zaurus/dev/zlcdvar.h:1.2
--- src/sys/arch/zaurus/dev/zlcdvar.h:1.1	Sun Jun 19 16:20:09 2011
+++ src/sys/arch/zaurus/dev/zlcdvar.h	Tue Jun 21 17:17:27 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: zlcdvar.h,v 1.1 2011/06/19 16:20:09 nonaka Exp $	*/
+/*	$NetBSD: zlcdvar.h,v 1.2 2011/06/21 17:17:27 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD 

CVS commit: src/sys/arch/zaurus/dev

2011-06-21 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Tue Jun 21 18:13:20 UTC 2011

Modified Files:
src/sys/arch/zaurus/dev: zkbd.c zlcd.c zlcdvar.h

Log Message:
backout previous.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/zaurus/dev/zkbd.c \
src/sys/arch/zaurus/dev/zlcd.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/zaurus/dev/zlcdvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/zkbd.c
diff -u src/sys/arch/zaurus/dev/zkbd.c:1.13 src/sys/arch/zaurus/dev/zkbd.c:1.14
--- src/sys/arch/zaurus/dev/zkbd.c:1.13	Tue Jun 21 17:17:27 2011
+++ src/sys/arch/zaurus/dev/zkbd.c	Tue Jun 21 18:13:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: zkbd.c,v 1.13 2011/06/21 17:17:27 nonaka Exp $	*/
+/*	$NetBSD: zkbd.c,v 1.14 2011/06/21 18:13:19 nonaka Exp $	*/
 /* $OpenBSD: zaurus_kbd.c,v 1.28 2005/12/21 20:36:03 deraadt Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zkbd.c,v 1.13 2011/06/21 17:17:27 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: zkbd.c,v 1.14 2011/06/21 18:13:19 nonaka Exp $);
 
 #include opt_wsdisplay_compat.h
 #if 0	/* XXX */
@@ -44,6 +44,7 @@
 
 #include zaurus/zaurus/zaurus_var.h
 #include zaurus/dev/zkbdmap.h
+#include zaurus/dev/zlcdvar.h
 
 static const int gpio_sense_pins_c3000[] = {
 	12,
@@ -298,10 +299,11 @@
 {
 	struct zkbd_softc *sc = (struct zkbd_softc *)v;
 	int i, j, col, pin, type, keysdown = 0;
+	int stuck;
 	int keystate;
 	int s;
 #ifdef WSDISPLAY_COMPAT_RAWKBD
-	int npress = 0, ncbuf = 0;
+	int npress = 0, ncbuf = 0, c;
 	char cbuf[MAXKEYS * 2];
 #endif
 
@@ -372,7 +374,7 @@
 		(sc-sc_keystate[14] ? (1  2) : 0)); /* 'alt' */
 
 	for (i = 0; i  sc-sc_nsense * sc-sc_nstrobe; i++) {
-		int stuck = 0;
+		stuck = 0;
 		/* extend  xt_keymap to do this faster. */
 		/* ignore 'stuck' keys' */
 		for (j = 0; j  __arraycount(stuck_keys); j++) {
@@ -388,9 +390,9 @@
 		keysdown |= keystate; /* if any keys held */
 
 #ifdef WSDISPLAY_COMPAT_RAWKBD
-		if (!sc-sc_polling  sc-sc_rawkbd) {
-			if (keystate || sc-sc_okeystate[i] != keystate) {
-int c = sc-sc_xt_keymap[i];
+		if (sc-sc_polling == 0  sc-sc_rawkbd) {
+			if ((keystate) || (sc-sc_okeystate[i] != keystate)) {
+c = sc-sc_xt_keymap[i];
 if (c  0x80) {
 	cbuf[ncbuf++] = 0xe0;
 }
@@ -410,7 +412,7 @@
 		}
 #endif
 
-		if (!sc-sc_rawkbd  (sc-sc_okeystate[i] != keystate)) {
+		if ((!sc-sc_rawkbd)  (sc-sc_okeystate[i] != keystate)) {
 			type = keystate ? WSCONS_EVENT_KEY_DOWN :
 			WSCONS_EVENT_KEY_UP;
 
@@ -426,7 +428,7 @@
 	}
 
 #ifdef WSDISPLAY_COMPAT_RAWKBD
-	if (!sc-sc_polling  sc-sc_rawkbd) {
+	if (sc-sc_polling == 0  sc-sc_rawkbd) {
 		wskbd_rawinput(sc-sc_wskbddev, cbuf, ncbuf);
 		sc-sc_nrep = npress;
 		if (npress != 0)
@@ -511,9 +513,9 @@
 		if (lid_suspend)
 			apm_suspends++;
 #endif
-		pmf_event_inject(NULL, PMFE_DISPLAY_OFF);
+		lcd_blank(1);
 	} else {
-		pmf_event_inject(NULL, PMFE_DISPLAY_ON);
+		lcd_blank(0);
 	}
 
 	return 1;
Index: src/sys/arch/zaurus/dev/zlcd.c
diff -u src/sys/arch/zaurus/dev/zlcd.c:1.13 src/sys/arch/zaurus/dev/zlcd.c:1.14
--- src/sys/arch/zaurus/dev/zlcd.c:1.13	Tue Jun 21 17:17:27 2011
+++ src/sys/arch/zaurus/dev/zlcd.c	Tue Jun 21 18:13:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: zlcd.c,v 1.13 2011/06/21 17:17:27 nonaka Exp $	*/
+/*	$NetBSD: zlcd.c,v 1.14 2011/06/21 18:13:19 nonaka Exp $	*/
 /*	$OpenBSD: zaurus_lcd.c,v 1.20 2006/06/02 20:50:14 miod Exp $	*/
 /* NetBSD: lubbock_lcd.c,v 1.1 2003/08/09 19:38:53 bsh Exp */
 
@@ -43,7 +43,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zlcd.c,v 1.13 2011/06/21 17:17:27 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: zlcd.c,v 1.14 2011/06/21 18:13:19 nonaka Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -169,7 +169,6 @@
 static void	lcd_set_brightness_internal(int);
 static int	lcd_get_backlight(void);
 static void	lcd_set_backlight(int);
-static void	lcd_blank(int);
 
 static int
 lcd_match(device_t parent, cfdata_t cf, void *aux)
@@ -267,12 +266,14 @@
 {
 
 	lcd_blank(0);
+	lcd_set_backlight(1);
 }
 
 static void
 lcd_display_off(device_t dv)
 {
 
+	lcd_set_backlight(0);
 	lcd_blank(1);
 }
 
@@ -500,7 +501,7 @@
 	else if (newval  maxval)
 		newval = maxval;
 
-	if (lcdislit  !lcdisblank)
+	if (lcd_get_backlight()  !lcdisblank)
 		lcd_set_brightness_internal(newval);
 
 	if (newval  0)
@@ -564,7 +565,7 @@
 	}
 }
 
-static void
+void
 lcd_blank(int blank)
 {
 

Index: src/sys/arch/zaurus/dev/zlcdvar.h
diff -u src/sys/arch/zaurus/dev/zlcdvar.h:1.2 src/sys/arch/zaurus/dev/zlcdvar.h:1.3
--- src/sys/arch/zaurus/dev/zlcdvar.h:1.2	Tue Jun 21 17:17:27 2011
+++ src/sys/arch/zaurus/dev/zlcdvar.h	Tue Jun 21 18:13:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: zlcdvar.h,v 1.2 2011/06/21 17:17:27 nonaka Exp $	*/
+/*	$NetBSD: zlcdvar.h,v 1.3 2011/06/21 18:13:19 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -32,6 +32,13 @@
 #ifndef	

CVS commit: src/sys/arch/zaurus/dev

2011-06-21 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Tue Jun 21 17:17:27 UTC 2011

Modified Files:
src/sys/arch/zaurus/dev: zkbd.c zlcd.c zlcdvar.h

Log Message:
use pmf_event_inject() instead of call lcd_blank() directly.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/zaurus/dev/zkbd.c \
src/sys/arch/zaurus/dev/zlcd.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/zaurus/dev/zlcdvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2011-06-21 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Tue Jun 21 18:13:20 UTC 2011

Modified Files:
src/sys/arch/zaurus/dev: zkbd.c zlcd.c zlcdvar.h

Log Message:
backout previous.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/zaurus/dev/zkbd.c \
src/sys/arch/zaurus/dev/zlcd.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/zaurus/dev/zlcdvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2011-06-19 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Jun 19 09:26:29 UTC 2011

Removed Files:
src/sys/arch/zaurus/dev: zapm.h

Log Message:
Delete unused file.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r0 src/sys/arch/zaurus/dev/zapm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2011-06-19 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Jun 19 09:26:29 UTC 2011

Removed Files:
src/sys/arch/zaurus/dev: zapm.h

Log Message:
Delete unused file.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r0 src/sys/arch/zaurus/dev/zapm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/zaurus/dev

2010-04-06 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Tue Apr  6 15:56:14 UTC 2010

Modified Files:
src/sys/arch/zaurus/dev: zmci.c

Log Message:
Enable SD 4bit bus width mode.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/zaurus/dev/zmci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/zmci.c
diff -u src/sys/arch/zaurus/dev/zmci.c:1.1 src/sys/arch/zaurus/dev/zmci.c:1.2
--- src/sys/arch/zaurus/dev/zmci.c:1.1	Tue Apr 21 03:00:30 2009
+++ src/sys/arch/zaurus/dev/zmci.c	Tue Apr  6 15:56:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: zmci.c,v 1.1 2009/04/21 03:00:30 nonaka Exp $	*/
+/*	$NetBSD: zmci.c,v 1.2 2010/04/06 15:56:14 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2006-2008 NONAKA Kimihiro non...@netbsd.org
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zmci.c,v 1.1 2009/04/21 03:00:30 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: zmci.c,v 1.2 2010/04/06 15:56:14 nonaka Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -119,7 +119,7 @@
 	sc-sc.sc_tag.set_power = zmci_set_power;
 	sc-sc.sc_tag.card_detect = zmci_card_detect;
 	sc-sc.sc_tag.write_protect = zmci_write_protect;
-	sc-sc.sc_caps = 0;
+	sc-sc.sc_caps = PMC_CAPS_4BIT;
 
 	if (pxamci_attach_sub(self, pxa)) {
 		aprint_error_dev(self, unable to attach MMC controller\n);



CVS commit: src/sys/arch/zaurus/dev

2010-01-08 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Jan  8 19:42:11 UTC 2010

Modified Files:
src/sys/arch/zaurus/dev: zaudio.c zkbd.c zlcd.c zssp.c ztp.c

Log Message:
Expand PMF_FN_* macros.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/zaurus/dev/zaudio.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/zaurus/dev/zkbd.c \
src/sys/arch/zaurus/dev/zlcd.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/zaurus/dev/zssp.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/zaurus/dev/ztp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/zaudio.c
diff -u src/sys/arch/zaurus/dev/zaudio.c:1.10 src/sys/arch/zaurus/dev/zaudio.c:1.11
--- src/sys/arch/zaurus/dev/zaudio.c:1.10	Sat Apr 18 05:20:21 2009
+++ src/sys/arch/zaurus/dev/zaudio.c	Fri Jan  8 19:42:11 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: zaudio.c,v 1.10 2009/04/18 05:20:21 nonaka Exp $	*/
+/*	$NetBSD: zaudio.c,v 1.11 2010/01/08 19:42:11 dyoung Exp $	*/
 /*	$OpenBSD: zaurus_audio.c,v 1.8 2005/08/18 13:23:02 robert Exp $	*/
 
 /*
@@ -49,7 +49,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zaudio.c,v 1.10 2009/04/18 05:20:21 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: zaudio.c,v 1.11 2010/01/08 19:42:11 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -84,8 +84,8 @@
 
 static int	zaudio_match(device_t, cfdata_t, void *);
 static void	zaudio_attach(device_t, device_t, void *);
-static bool	zaudio_suspend(device_t dv PMF_FN_ARGS);
-static bool	zaudio_resume(device_t dv PMF_FN_ARGS);
+static bool	zaudio_suspend(device_t dv, pmf_qual_t);
+static bool	zaudio_resume(device_t dv, pmf_qual_t);
 
 #define ZAUDIO_OP_SPKR	0
 #define ZAUDIO_OP_HP	1
@@ -369,7 +369,7 @@
 }
 
 static bool
-zaudio_suspend(device_t dv PMF_FN_ARGS)
+zaudio_suspend(device_t dv, pmf_qual_t qual)
 {
 	struct zaudio_softc *sc = device_private(dv);
 
@@ -380,7 +380,7 @@
 }
 
 static bool
-zaudio_resume(device_t dv PMF_FN_ARGS)
+zaudio_resume(device_t dv, pmf_qual_t qual)
 {
 	struct zaudio_softc *sc = device_private(dv);
 

Index: src/sys/arch/zaurus/dev/zkbd.c
diff -u src/sys/arch/zaurus/dev/zkbd.c:1.9 src/sys/arch/zaurus/dev/zkbd.c:1.10
--- src/sys/arch/zaurus/dev/zkbd.c:1.9	Thu Jan 29 16:00:33 2009
+++ src/sys/arch/zaurus/dev/zkbd.c	Fri Jan  8 19:42:11 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: zkbd.c,v 1.9 2009/01/29 16:00:33 nonaka Exp $	*/
+/*	$NetBSD: zkbd.c,v 1.10 2010/01/08 19:42:11 dyoung Exp $	*/
 /* $OpenBSD: zaurus_kbd.c,v 1.28 2005/12/21 20:36:03 deraadt Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zkbd.c,v 1.9 2009/01/29 16:00:33 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: zkbd.c,v 1.10 2010/01/08 19:42:11 dyoung Exp $);
 
 #include opt_wsdisplay_compat.h
 #include lcd.h
@@ -131,7 +131,7 @@
 static int	zkbd_on(void *v);
 static int	zkbd_sync(void *v);
 static int	zkbd_hinge(void *v);
-static bool	zkbd_resume(device_t dv PMF_FN_ARGS);
+static bool	zkbd_resume(device_t dv, pmf_qual_t);
 
 int zkbd_modstate;
 
@@ -594,7 +594,7 @@
 }
 
 static bool
-zkbd_resume(device_t dv PMF_FN_ARGS)
+zkbd_resume(device_t dv, pmf_qual_t qual)
 {
 	struct zkbd_softc *sc = device_private(dv);
 
Index: src/sys/arch/zaurus/dev/zlcd.c
diff -u src/sys/arch/zaurus/dev/zlcd.c:1.9 src/sys/arch/zaurus/dev/zlcd.c:1.10
--- src/sys/arch/zaurus/dev/zlcd.c:1.9	Thu Jan 29 16:00:33 2009
+++ src/sys/arch/zaurus/dev/zlcd.c	Fri Jan  8 19:42:11 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: zlcd.c,v 1.9 2009/01/29 16:00:33 nonaka Exp $	*/
+/*	$NetBSD: zlcd.c,v 1.10 2010/01/08 19:42:11 dyoung Exp $	*/
 /*	$OpenBSD: zaurus_lcd.c,v 1.20 2006/06/02 20:50:14 miod Exp $	*/
 /* NetBSD: lubbock_lcd.c,v 1.1 2003/08/09 19:38:53 bsh Exp */
 
@@ -43,7 +43,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zlcd.c,v 1.9 2009/01/29 16:00:33 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: zlcd.c,v 1.10 2010/01/08 19:42:11 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -154,8 +154,8 @@
 CFATTACH_DECL_NEW(zlcd, sizeof(struct pxa2x0_lcd_softc),
 	lcd_match, lcd_attach, NULL, NULL);
 
-static bool	lcd_suspend(device_t dv PMF_FN_ARGS);
-static bool	lcd_resume(device_t dv PMF_FN_ARGS);
+static bool	lcd_suspend(device_t dv, pmf_qual_t);
+static bool	lcd_resume(device_t dv, pmf_qual_t);
 
 void	lcd_cnattach(void);
 int	lcd_max_brightness(void);
@@ -208,7 +208,7 @@
  * power management
  */
 static bool
-lcd_suspend(device_t dv PMF_FN_ARGS)
+lcd_suspend(device_t dv, pmf_qual_t qual)
 {
 	struct pxa2x0_lcd_softc *sc = device_private(dv);
 
@@ -219,7 +219,7 @@
 }
 
 static bool
-lcd_resume(device_t dv PMF_FN_ARGS)
+lcd_resume(device_t dv, pmf_qual_t qual)
 {
 	struct pxa2x0_lcd_softc *sc = device_private(dv);
 

Index: src/sys/arch/zaurus/dev/zssp.c
diff -u src/sys/arch/zaurus/dev/zssp.c:1.7 src/sys/arch/zaurus/dev/zssp.c:1.8
--- src/sys/arch/zaurus/dev/zssp.c:1.7	Wed Mar 11 09:10:39 2009
+++ src/sys/arch/zaurus/dev/zssp.c	Fri Jan  8 19:42:11 2010
@@ 

CVS commit: src/sys/arch/zaurus/dev

2009-12-12 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Dec 12 11:38:45 UTC 2009

Modified Files:
src/sys/arch/zaurus/dev: zapm.c

Log Message:
use APM_BATT_FLAG_CHARGING.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/zaurus/dev/zapm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/zapm.c
diff -u src/sys/arch/zaurus/dev/zapm.c:1.6 src/sys/arch/zaurus/dev/zapm.c:1.7
--- src/sys/arch/zaurus/dev/zapm.c:1.6	Fri Apr  3 04:13:17 2009
+++ src/sys/arch/zaurus/dev/zapm.c	Sat Dec 12 11:38:45 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: zapm.c,v 1.6 2009/04/03 04:13:17 uwe Exp $	*/
+/*	$NetBSD: zapm.c,v 1.7 2009/12/12 11:38:45 nonaka Exp $	*/
 /*	$OpenBSD: zaurus_apm.c,v 1.13 2006/12/12 23:14:28 dim Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zapm.c,v 1.6 2009/04/03 04:13:17 uwe Exp $);
+__KERNEL_RCSID(0, $NetBSD: zapm.c,v 1.7 2009/12/12 11:38:45 nonaka Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -809,7 +809,7 @@
 zapm_set_charging(sc, 0);
 			}
 		} else if (!charge_completed) {
-			charging = 1;
+			charging = APM_BATT_FLAG_CHARGING;
 			volt = zapm_get_battery_volt();
 			zapm_set_charging(sc, 1);
 			DPRINTF((zapm_poll: start charging volt %d\n, volt));



CVS commit: src/sys/arch/zaurus/dev

2009-12-12 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Dec 12 14:29:34 UTC 2009

Modified Files:
src/sys/arch/zaurus/dev: zapm.c

Log Message:
report collect charge state.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/zaurus/dev/zapm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/zapm.c
diff -u src/sys/arch/zaurus/dev/zapm.c:1.8 src/sys/arch/zaurus/dev/zapm.c:1.9
--- src/sys/arch/zaurus/dev/zapm.c:1.8	Sat Dec 12 13:12:49 2009
+++ src/sys/arch/zaurus/dev/zapm.c	Sat Dec 12 14:29:34 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: zapm.c,v 1.8 2009/12/12 13:12:49 nonaka Exp $	*/
+/*	$NetBSD: zapm.c,v 1.9 2009/12/12 14:29:34 nonaka Exp $	*/
 /*	$OpenBSD: zaurus_apm.c,v 1.13 2006/12/12 23:14:28 dim Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zapm.c,v 1.8 2009/12/12 13:12:49 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: zapm.c,v 1.9 2009/12/12 14:29:34 nonaka Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -402,16 +402,32 @@
 		pinfo-ac_state = val;
 	else
 		pinfo-ac_state = sc-ac_state;
+	DPRINTF((zapm: pinfo-ac_state: %d\n, pinfo-ac_state));
+
 	if (config_hook_call(CONFIG_HOOK_GET,
 			 CONFIG_HOOK_CHARGE, val) != -1)
 		pinfo-battery_state = val;
-	else
-		pinfo-battery_state = sc-battery_state;
+	else {
+		DPRINTF((zapm: sc-battery_state: %#x\n, sc-battery_state));
+		if (sc-battery_state  APM_BATT_FLAG_CHARGING)
+			pinfo-battery_flags = APM_BATT_FLAG_CHARGING;
+		else if (sc-battery_state  APM_BATT_FLAG_CRITICAL)
+			pinfo-battery_flags = APM_BATT_FLAG_CRITICAL;
+		else if (sc-battery_state  APM_BATT_FLAG_LOW)
+			pinfo-battery_flags = APM_BATT_FLAG_LOW;
+		else if (sc-battery_state  APM_BATT_FLAG_HIGH)
+			pinfo-battery_flags = APM_BATT_FLAG_HIGH;
+		else
+			pinfo-battery_flags = APM_BATT_FLAG_UNKNOWN;
+	}
+	DPRINTF((zapm: pinfo-battery_flags: %#x\n, pinfo-battery_flags));
+
 	if (config_hook_call(CONFIG_HOOK_GET,
 			 CONFIG_HOOK_BATTERYVAL, val) != -1)
 		pinfo-battery_life = val;
 	else
 		pinfo-battery_life = sc-battery_life;
+	DPRINTF((zapm: pinfo-battery_life: %d\n, pinfo-battery_life));
 
 	return 0;
 }



CVS commit: src/sys/arch/zaurus/dev

2009-12-11 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Dec 12 07:49:31 UTC 2009

Modified Files:
src/sys/arch/zaurus/dev: ztp.c

Log Message:
Use tpcalib_ioctl() instead of hpc_tpanel_ioctl().


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/zaurus/dev/ztp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/dev/ztp.c
diff -u src/sys/arch/zaurus/dev/ztp.c:1.7 src/sys/arch/zaurus/dev/ztp.c:1.8
--- src/sys/arch/zaurus/dev/ztp.c:1.7	Tue Mar  3 18:42:19 2009
+++ src/sys/arch/zaurus/dev/ztp.c	Sat Dec 12 07:49:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ztp.c,v 1.7 2009/03/03 18:42:19 nonaka Exp $	*/
+/*	$NetBSD: ztp.c,v 1.8 2009/12/12 07:49:31 nonaka Exp $	*/
 /* $OpenBSD: zts.c,v 1.9 2005/04/24 18:55:49 uwe Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ztp.c,v 1.7 2009/03/03 18:42:19 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: ztp.c,v 1.8 2009/12/12 07:49:31 nonaka Exp $);
 
 #include lcd.h
 
@@ -535,7 +535,7 @@
 
 	case WSMOUSEIO_SCALIBCOORDS:
 	case WSMOUSEIO_GCALIBCOORDS:
-		return hpc_tpanel_ioctl(sc-sc_tpcalib, cmd, data, flag, l);
+		return tpcalib_ioctl(sc-sc_tpcalib, cmd, data, flag, l);
 	}
 
 	return EPASSTHROUGH;