On Wed, 18 Aug 2004 22:10:21 +0400 Evgeniy Polyakov <johnpol at 2ka.mipt.ru> wrote: > On Tue, 17 Aug 2004 14:33:01 +0400 > Evgeniy Polyakov <johnpol at 2ka.mipt.ru> wrote: > > > > 3* The Super-I/O mechanics are not PC8736x-specific. It is a > > > standard(established by Intel some years ago) used by all > > > Super-I/O chips, including those made by National Semiconductor, > > > ITE, Winbond, SMSC and VIA. This means that your driver should > > > most likely be completely generic, and probably doesn't even need > > > to know of any chip ID. It could, OTOH, export an ID test function > > > (although I guess it wouldn't be any different from the register > > > read function with register set to 0x20). > > > > Probably we need to call the testers, I will extend driver to > > support different ID's for now, but only for PC8736*. > > > > Will send files soon. > > Done. > dmesg: > Soekris SuperIO driver is starting... > Found PC87366 [0xe9] at 0x002e-0x0030. > GPIO logical device driver is activating now. > GPIO - activated: 0x6600-0x6610, irq=00 [type=03] > > As before one can access GNU/Arch archive at > http://tservice.net.ru/~s0mbre/2004 branch soekris--main--0. > > Please review and comment. BTW, If someone really want to use this then it requires following patch(also attached): s0mbre at zanzibar:~/aWork/soekris$ tla cat-log patch-16 Revision: soekris--main--0--patch-16 Archive: johnpol at 2ka.mipt.ru-2004 Creator: Evgeniy Polyakov <johnpol at 2ka.mipt.ru> Date: Thu Aug 19 00:54:56 MSD 2004 Standard-date: 2004-08-18 20:54:56 GMT Modified-files: sc_gpio.c New-patches: johnpol at 2ka.mipt.ru-2004/soekris--main--0--patch-16 Summary: Fixed read bug - we must read from GPIO INPUT register, not OUTPUT. Control manipulations in ->activate(). Keywords: Fixed read bug - we must read from GPIO INPUT register, not OUTPUT. Control manipulations in ->activate(). --- orig/sc_gpio.c +++ mod/sc_gpio.c @@ -68,13 +68,14 @@ for (i=0; i<SIO_GPIO_NPINS; ++i) { - gpin[i].flags = GPIO_PIN_OPENDRAIN | GPIO_PIN_PUSHPULL; - //gpin[i].flags = GPIO_PIN_OPENDRAIN; - gpin[i].state = GPIO_PIN_HIGH; + //gpin[i].flags = GPIO_PIN_OPENDRAIN | GPIO_PIN_PUSHPULL; + gpin[i].flags = GPIO_PIN_TRISTATE; gpin[i].mask &= ~(SIO_GPIO_CONF_OUTPUTEN | SIO_GPIO_CONF_PUSHPULL | SIO_GPIO_CONF_PULLUP | SIO_GPIO_CONF_DEBOUNCE); sc_gpio_control(ldev, i, gpin[i].mask, gpin[i].flags); + + gpin[i].state = GPIO_PIN_HIGH; sc_gpio_write(ldev, i, gpin[i].state); } @@ -93,16 +94,16 @@ switch (port) { case 0: - reg = SIO_GPDO0; + reg = SIO_GPDI0; break; case 1: - reg = SIO_GPDO1; + reg = SIO_GPDI1; break; case 2: - reg = SIO_GPDO2; + reg = SIO_GPDI2; break; case 3: - reg = SIO_GPDO3; + reg = SIO_GPDI3; break; } Evgeniy Polyakov ( s0mbre ) Only failure makes us experts. -- Theo de Raadt -------------- next part -------------- A non-text attachment was scrubbed... Name: sc_gpio.c.patch Type: application/octet-stream Size: 908 bytes Desc: not available Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040819/cb9bef53/attachment.obj