gpio: Add GPIO support for the ACCES 104-IDIO-16
Subsystems (2)
PATCH v10 1/1 gpio: Add GPIO support for the ACCES 104-IDIO-16
The ACCES 104-IDIO-16 family of PC/104 utility boards feature 16 optically isolated inputs and 16 optically isolated FET solid state outputs. This driver provides GPIO support for these 32 channels of digital I/O. Change-of-State detection interrupts are not supported.
GPIO 0-15 correspond to digital outputs 0-15, while GPIO 16-31 correspond to digital inputs 0-15. The base port address for the device may be set via the idio_16_base module parameter.
---
Changes in v10:
- Rename symbols to be more concise
- Allocate GPIO device private data structure in probe function
drivers/gpio/Kconfig | 10 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-104-idio-16.c | 216 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 227 insertions(+) create mode 100644 drivers/gpio/gpio-104-idio-16.c
drivers/gpio/Kconfig +10 -0
@@ -684,6 +684,16 @@ config GPIO_SX150X endmenu +menu "ISA GPIO drivers" + +config GPIO_104_IDIO_16 + tristate "ACCES 104-IDIO-16 GPIO support" + depends on X86 + help + Enables GPIO support for the ACCES 104-IDIO-16 family. + +endmenu + menu "MFD GPIO expanders" config GPIO_ADP5520
drivers/gpio/Makefile +1 -0
@@ -12,6 +12,7 @@ obj-$(CONFIG_GPIO_ACPI) += gpiolib-acpi.o # Device drivers. Generally keep list sorted alphabetically obj-$(CONFIG_GPIO_GENERIC) += gpio-generic.o +obj-$(CONFIG_GPIO_104_IDIO_16) += gpio-104-idio-16.o obj-$(CONFIG_GPIO_74X164) += gpio-74x164.o obj-$(CONFIG_GPIO_74XX_MMIO) += gpio-74xx-mmio.o obj-$(CONFIG_GPIO_ADNP) += gpio-adnp.o
drivers/gpio/gpio-104-idio-16.c new file +216 -0
216 lines not on this page · raw message
Signature · 1 line
2.4.10
Quoted 9 lines · William Breathitt Gray
The ACCES 104-IDIO-16 family of PC/104 utility boards feature 16 optically isolated inputs and 16 optically isolated FET solid state outputs. This driver provides GPIO support for these 32 channels of digital I/O. Change-of-State detection interrupts are not supported.
GPIO 0-15 correspond to digital outputs 0-15, while GPIO 16-31 correspond to digital inputs 0-15. The base port address for the device may be set via the
idio_16_basemodule parameter.
Quoted 5 lines
Signed-off-by William Breathitt Gray <[email protected]>---
Changes in v10:
- Rename symbols to be more concise
- Allocate GPIO device private data structure in probe function
Yes, exactly like this. :)
Patcha applied for kernel v4.4.
drivers/gpio/Kconfig config GPIO_SX150X · line 695
Quoted 9 lines
drivers/gpio/Kconfig +9
-0+menu "ISA GPIO drivers" + +config GPIO_104_IDIO_16 + tristate "ACCES 104-IDIO-16 GPIO support" + depends on X86 + help + Enables GPIO support for the ACCES 104-IDIO-16 family. + +endmenu
I have five other drivers using port-based I/O:
gpio-f7188x.cgpio-it87.cgpio-sch.cgpio-sch311x.cgpio-ts5500.c
Do you think it makes sense to move all of these in under the "ISA GPIO drivers" menu as well? I guess they all require ISA after all.
(Added their maintainers to the To: line so I can get some input on this.)
Yours,
Linus Walleij
Quoted 40 lines · Linus Walleij
Quoted 9 lines · William Breathitt Gray
The ACCES 104-IDIO-16 family of PC/104 utility boards feature 16 optically isolated inputs and 16 optically isolated FET solid state outputs. This driver provides GPIO support for these 32 channels of digital I/O. Change-of-State detection interrupts are not supported.
GPIO 0-15 correspond to digital outputs 0-15, while GPIO 16-31 correspond to digital inputs 0-15. The base port address for the device may be set via the
idio_16_basemodule parameter.Quoted 5 lines
Signed-off-by William Breathitt Gray <[email protected]>---
Changes in v10:
- Rename symbols to be more concise
- Allocate GPIO device private data structure in probe functionYes, exactly like this. :)
Patcha applied for kernel v4.4.
drivers/gpio/Kconfig config GPIO_SX150X · line 695
Quoted 9 lines
drivers/gpio/Kconfig +9
-0+menu "ISA GPIO drivers" + +config GPIO_104_IDIO_16 + tristate "ACCES 104-IDIO-16 GPIO support" + depends on X86 + help + Enables GPIO support for the ACCES 104-IDIO-16 family. + +endmenuI have five other drivers using port-based I/O:
gpio-f7188x.cgpio-it87.cgpio-sch.cgpio-sch311x.cgpio-ts5500.c
Quoted 6 lines
Do you think it makes sense to move all of these in under the "ISA GPIO drivers" menu as well? I guess they all require ISA after all.
(Added their maintainers to the To: line so I can get some input on this.)
Hi Linus,
The Super-I/Os are connected to a LPC bridge. And since LPC is much like ISA for software, then I guess it makes sense to move the drivers gpio-f7188x and gpio-it87 under a "ISA GPIO drivers" menu.
Simon
Quoted 48 lines · Simon Guinot
Quoted 40 lines · Linus Walleij
Quoted 9 lines · William Breathitt Gray
The ACCES 104-IDIO-16 family of PC/104 utility boards feature 16 optically isolated inputs and 16 optically isolated FET solid state outputs. This driver provides GPIO support for these 32 channels of digital I/O. Change-of-State detection interrupts are not supported.
GPIO 0-15 correspond to digital outputs 0-15, while GPIO 16-31 correspond to digital inputs 0-15. The base port address for the device may be set via the
idio_16_basemodule parameter.Quoted 5 lines
Signed-off-by William Breathitt Gray <[email protected]>---
Changes in v10:
- Rename symbols to be more concise
- Allocate GPIO device private data structure in probe functionYes, exactly like this. :)
Patcha applied for kernel v4.4.
drivers/gpio/Kconfig config GPIO_SX150X · line 695
Quoted 9 lines
drivers/gpio/Kconfig +9
-0+menu "ISA GPIO drivers" + +config GPIO_104_IDIO_16 + tristate "ACCES 104-IDIO-16 GPIO support" + depends on X86 + help + Enables GPIO support for the ACCES 104-IDIO-16 family. + +endmenuI have five other drivers using port-based I/O:
gpio-f7188x.cgpio-it87.cgpio-sch.cgpio-sch311x.cgpio-ts5500.cQuoted 6 lines
Do you think it makes sense to move all of these in under the "ISA GPIO drivers" menu as well? I guess they all require ISA after all.
(Added their maintainers to the To: line so I can get some input on this.)
Quoted 8 lines
Hi Linus,
The Super-I/Os are connected to a LPC bridge. And since LPC is much like ISA for software, then I guess it makes sense to move the drivers gpio-f7188x and gpio-it87 under a "ISA GPIO drivers" menu.
Simon
Part of my purpose in suggesting the "ISA GPIO drivers" menu is my intention to submit a couple more PC/104 drivers for merging into the Linux baseline. Perhaps it may make sense to create subdirectories within the "ISA GPIO Driver" to further organize drivers between "Super-I/O," "PC/104," and other ISA-based buses.
- William Breathitt Gray
Quoted 18 lines · Linus Walleij
drivers/gpio/Kconfig config GPIO_SX150X · line 695
Quoted 9 lines
drivers/gpio/Kconfig +9
-0+menu "ISA GPIO drivers" + +config GPIO_104_IDIO_16 + tristate "ACCES 104-IDIO-16 GPIO support" + depends on X86 + help + Enables GPIO support for the ACCES 104-IDIO-16 family. + +endmenuI have five other drivers using port-based I/O:
gpio-f7188x.cgpio-it87.cgpio-sch.cgpio-sch311x.cgpio-ts5500.c
Quoted 6 lines
Do you think it makes sense to move all of these in under the "ISA GPIO drivers" menu as well? I guess they all require ISA after all.
(Added their maintainers to the To: line so I can get some input on this.)
Not all of them actually require ISA. For example gpio-sch is part of an MFD device which is a PCI device. PCI bus also has notion of I/O ports.
Quoted 23 lines · Mika Westerberg
Quoted 22 lines · Linus Walleij
drivers/gpio/Kconfig config GPIO_SX150X · line 695
Quoted 9 lines
drivers/gpio/Kconfig +9
-0+menu "ISA GPIO drivers" + +config GPIO_104_IDIO_16 + tristate "ACCES 104-IDIO-16 GPIO support" + depends on X86 + help + Enables GPIO support for the ACCES 104-IDIO-16 family. + +endmenuI have five other drivers using port-based I/O:
gpio-f7188x.cgpio-it87.cgpio-sch.cgpio-sch311x.cgpio-ts5500.cDo you think it makes sense to move all of these in under the "ISA GPIO drivers" menu as well? I guess they all require ISA after all.
Quoted 5 lines
Quoted 2 lines
(Added their maintainers to the To: line so I can get some input on this.)
Not all of them actually require ISA. For example gpio-sch is part of an MFD device which is a PCI device. PCI bus also has notion of I/O ports.
Should this driver not be moved under the "MFD GPIO expanders" menu ?
Quoted 1 line · Simon Guinot
Should this driver not be moved under the "MFD GPIO expanders" menu ?
Maybe. It is still part of the PCH (Platform Controller Hub) as far as I can tell so I would not call it a GPIO expander either ;-)
Quoted 23 lines · Mika Westerberg
Quoted 22 lines · Linus Walleij
drivers/gpio/Kconfig config GPIO_SX150X · line 695
Quoted 9 lines
drivers/gpio/Kconfig +9
-0+menu "ISA GPIO drivers" + +config GPIO_104_IDIO_16 + tristate "ACCES 104-IDIO-16 GPIO support" + depends on X86 + help + Enables GPIO support for the ACCES 104-IDIO-16 family. + +endmenuI have five other drivers using port-based I/O:
gpio-f7188x.cgpio-it87.cgpio-sch.cgpio-sch311x.cgpio-ts5500.cDo you think it makes sense to move all of these in under the "ISA GPIO drivers" menu as well? I guess they all require ISA after all.
Quoted 5 lines
Quoted 2 lines
(Added their maintainers to the To: line so I can get some input on this.)
Not all of them actually require ISA. For example gpio-sch is part of an MFD device which is a PCI device. PCI bus also has notion of I/O ports.
Hm, is there a more fitting symbol we should sort it under, which means thingofabob-that-has-portmapped I/O?
Yours,
Linus Walleij
Quoted 25 lines · Linus Walleij
Quoted 23 lines · Mika Westerberg
Quoted 22 lines · Linus Walleij
drivers/gpio/Kconfig config GPIO_SX150X · line 695
Quoted 9 lines
drivers/gpio/Kconfig +9
-0+menu "ISA GPIO drivers" + +config GPIO_104_IDIO_16 + tristate "ACCES 104-IDIO-16 GPIO support" + depends on X86 + help + Enables GPIO support for the ACCES 104-IDIO-16 family. + +endmenuI have five other drivers using port-based I/O:
gpio-f7188x.cgpio-it87.cgpio-sch.cgpio-sch311x.cgpio-ts5500.cDo you think it makes sense to move all of these in under the "ISA GPIO drivers" menu as well? I guess they all require ISA after all.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
(Added their maintainers to the To: line so I can get some input on this.)
Not all of them actually require ISA. For example gpio-sch is part of an MFD device which is a PCI device. PCI bus also has notion of I/O ports.
Hm, is there a more fitting symbol we should sort it under, which means thingofabob-that-has-portmapped I/O?
Well, there's already "Memory mapped GPIO drivers" so how about "I/O mapped GPIO drivers"?
Quoted 29 lines · Mika Westerberg
Quoted 28 lines · Linus Walleij
Quoted 26 lines · Mika Westerberg
Quoted 24 lines · Linus Walleij
drivers/gpio/Kconfig config GPIO_SX150X · line 695
Quoted 9 lines
drivers/gpio/Kconfig +9
-0+menu "ISA GPIO drivers" + +config GPIO_104_IDIO_16 + tristate "ACCES 104-IDIO-16 GPIO support" + depends on X86 + help + Enables GPIO support for the ACCES 104-IDIO-16 family. + +endmenuI have five other drivers using port-based I/O:
gpio-f7188x.cgpio-it87.cgpio-sch.cgpio-sch311x.cgpio-ts5500.cDo you think it makes sense to move all of these in under the "ISA GPIO drivers" menu as well? I guess they all require ISA after all.
(Added their maintainers to the To: line so I can get some input on this.)
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Not all of them actually require ISA. For example gpio-sch is part of an MFD device which is a PCI device. PCI bus also has notion of I/O ports.
Hm, is there a more fitting symbol we should sort it under, which means thingofabob-that-has-portmapped I/O?
Well, there's already "Memory mapped GPIO drivers" so how about "I/O mapped GPIO drivers"?
Sure, "Port-mapped I/O GPIO drivers"
But what should I put as "depends" for that submenu, that is maybe the real question.
Would (ISA || PCI) suffice?
Yours,
Linus Walleij
Quoted 40 lines · Linus Walleij
Quoted 29 lines · Mika Westerberg
Quoted 28 lines · Linus Walleij
Quoted 26 lines · Mika Westerberg
Quoted 24 lines · Linus Walleij
drivers/gpio/Kconfig config GPIO_SX150X · line 695
Quoted 9 lines
drivers/gpio/Kconfig +9
-0+menu "ISA GPIO drivers" + +config GPIO_104_IDIO_16 + tristate "ACCES 104-IDIO-16 GPIO support" + depends on X86 + help + Enables GPIO support for the ACCES 104-IDIO-16 family. + +endmenuI have five other drivers using port-based I/O:
gpio-f7188x.cgpio-it87.cgpio-sch.cgpio-sch311x.cgpio-ts5500.cDo you think it makes sense to move all of these in under the "ISA GPIO drivers" menu as well? I guess they all require ISA after all.
(Added their maintainers to the To: line so I can get some input on this.)
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Not all of them actually require ISA. For example gpio-sch is part of an MFD device which is a PCI device. PCI bus also has notion of I/O ports.
Hm, is there a more fitting symbol we should sort it under, which means thingofabob-that-has-portmapped I/O?
Well, there's already "Memory mapped GPIO drivers" so how about "I/O mapped GPIO drivers"?
Quoted 6 lines
Sure, "Port-mapped I/O GPIO drivers"
But what should I put as "depends" for that submenu, that is maybe the real question.
Would (ISA || PCI) suffice?
x86 has I/O space regardless of ISA or PCI (even though most probably it also has ISA and PCI). Looking at the drivers in question they seem to be x86 drivers so maybe "depends on X86"?
Quoted 3 lines · Mika Westerberg
x86 has I/O space regardless of ISA or PCI (even though most probably it also has ISA and PCI). Looking at the drivers in question they seem to be x86 drivers so maybe "depends on X86"?
Yeah I see it now... x86 had these instructions since ages, I'm stupid for not thinking about it the right way :/
OK I will try to create some meny and shovel it under depends on X86.
Yours,
Linus Walleij