Add support for Fintek F81865 Super I/O's GPIO via a new ftgpio driver.
Device is properly probed and attached (dmesg | grep -e superio -e gpio while bootverbose):
pcib0: allocated type 4 (0x2e-0x2f) for rid 0 of superio0 pcib0: allocated type 4 (0x4e-0x4f) for rid 0 of superio1 pcib0: allocated type 4 (0x2e-0x2f) for rid 0 of superio0 superio0: <Fintek F81865> at port 0x2e-0x2f on isa0 gpio0: <GPIO Controller on Fintek Super I/O> at GPIO ldn 0x06 on superio0 gpio0: group GPIO0 io is 0x0 (ioreg=0xf0) gpio0: pin 0<GPIO00> io is input gpio0: group GPIO0 drive is 0x0 (ioreg=0xf3) gpio0: pin 0<GPIO00> drive is opendrain … gpio0: group GPIO5 io is 0xc0 (ioreg=0xa0) gpio0: pin 47<GPIO57> io is output gpio0: group GPIO5 drive is 0x0 (ioreg=0xa3) gpio0: pin 47<GPIO57> drive is opendrain … gpio0: group GPIO6 io is 0x0 (ioreg=0x90) gpio0: pin 52<GPIO64> io is input gpio0: group GPIO6 drive is 0x0 (ioreg=0x93) gpio0: pin 52<GPIO64> drive is opendrain gpio0: groups GPIO1..GPIO6 enabled gpiobus0: <GPIO bus> on gpio0 gpioled0: empty pin mask gpioled1: empty pin mask gpioc0: <GPIO controller> on gpio0
And gpioctl let me set and clear a pin controling a LED successfully:
# gpioctl -l pin 00: 1 GPIO00<IN,OD> … pin 47: 0 GPIO57<OUT,OD> … pin 52: 1 GPIO64<IN,OD> # gpioctl 47 1 # gpioctl 47 0