On Sat, 23 Mar 2002, Wan Tat Chee wrote:

> As for Probing the GPIO inputs, Here's a small patch (disabled by default)
> that should do the job (I was wondering why there was a non-zero
> input value on the GPIO status lines). Note: I've modified it from
> my earlier source which used the saa_readb() macro, I hope it works :).
>

Oops. Forgot to toggle the GPRESCAN bit to latch new inputs for GPIO
Status. Also, aligned the MODE and STATUS hex digits for easier
comparison. Please Replace with this version.

Datapoint: My FV2K indicates:
saa7130[0]/video: DEBUG: INITIAL gpio_mode  = 00006000
saa7130[0]/video: DEBUG: INITIAL gpio_state = 00030500


------- saa7134-0.1.5-gpioprobe-rev.diff -----------------------------
--- saa7134-0.1.5/saa7134-video.c       Thu Mar 21 19:06:08 2002
+++ saa7134-0.1.5-fv2k/saa7134-video.c  Sat Mar 23 17:41:50 2002
@@ -2039,6 +2039,16 @@

 int saa7134_video_init(struct saa7134_dev *dev)
 {
+#if 0
+       unsigned long gpiomode, gpiostate;
+       gpiomode = saa_readl(SAA7134_GPIO_GPMODE0 >> 2);
+       saa_andorb(SAA7134_GPIO_GPMODE3,SAA7134_GPIO_GPRESCAN,0);               /* to 
+be safe */
+       saa_andorb(SAA7134_GPIO_GPMODE3,SAA7134_GPIO_GPRESCAN,SAA7134_GPIO_GPRESCAN);
+       saa_andorb(SAA7134_GPIO_GPMODE3,SAA7134_GPIO_GPRESCAN,0);               /* 
+toggle GPRESCAN */
+       gpiostate = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2);
+       dprintk("DEBUG: INITIAL gpio_mode  = %08lx\n",gpiomode);
+       dprintk("DEBUG: INITIAL gpio_state = %08lx\n",gpiostate);
+#endif
        /* sanitycheck insmod options */
        if (gbuffers < 2 || gbuffers > VIDEO_MAX_FRAME)
                gbuffers = 2;
------- cut here -----------------------------------------------------
----
Wan Tat Chee (Lecturer)
School of Computer Science, Univ. Science Malaysia,
11800 Minden, Penang, Malaysia.          Ofc Ph: +604 657-7888 x 3617
Internet: [EMAIL PROTECTED]            Web: http://nrg.cs.usm.my/~tcwan
GPG Key : http://nrg.cs.usm.my/~tcwan/tcw_gpg.asc
F'print :  FB0F CED7 85A5 ECF9 DEF0  50E8 A550 A0D2 8638 B1EB



_______________________________________________
Video4linux-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/video4linux-list

Reply via email to