03 May, 2016

1 commit

  • The ACCES 104-IDIO-16 series communicates via the ISA bus. As such, it
    is more appropriate to use the ISA bus driver over the platform driver
    to control the ACCES 104-IDIO-16 GPIO driver.

    This patch also adds support for multiple devices via the base and irq
    module array parameters. Each element of the base array corresponds to a
    discrete device; each element of the irq array corresponds to the
    respective device addressed in the respective base array element.

    Acked-by: Linus Walleij
    Cc: Alexandre Courbot
    Signed-off-by: William Breathitt Gray
    Signed-off-by: Greg Kroah-Hartman

    William Breathitt Gray
     

16 Feb, 2016

2 commits


05 Jan, 2016

1 commit


11 Dec, 2015

1 commit

  • The ACCES 104-IDIO-16 uses a single interrupt to indicate a possible
    change-of-state in any of the digital input lines. As such, only a
    single write to the device's "Clear Interrupt" register is necessary to
    acknowledge the IRQ for all respective GPIO.

    This patch moves the "Clear Interrupt" register write operation from the
    irq_ack callback to the IRQ handler function, wherefore each interrupt
    may be cleared respectively by executing a single outb call at the end
    of the idio_16_irq_handler function, rather than multiple redundant outb
    calls as a result of the generic_handle_irq call for each masked GPIO.

    Signed-off-by: William Breathitt Gray
    Signed-off-by: Linus Walleij

    William Breathitt Gray
     

30 Nov, 2015

1 commit


19 Nov, 2015

3 commits

  • To prevent confusion, and to match the existing coding style used in
    other GPIO drivers, symbol names within the 104-idio-16 GPIO driver
    should be lowercase.

    Signed-off-by: William Breathitt Gray
    Reviewed-by: Alexandre Courbot
    Signed-off-by: Linus Walleij

    William Breathitt Gray
     
  • The ACCES 104-IDIO-16 series offers Change-of-State detection interrupt
    functionality; if Change-of-State detection is enabled, an interrupt is
    fired off if any input line changes state (i.e. goes from low to high,
    or from high to low). This patch adds support to handle these interrupts
    and allows the user to mask which GPIO lines are affected. The interrupt
    line number for the device may be set via the idio_16_irq module
    parameter.

    Signed-off-by: William Breathitt Gray
    Signed-off-by: Linus Walleij

    William Breathitt Gray
     
  • The name .dev in a struct is normally reserved for a struct device
    that is let us say a superclass to the thing described by the struct.
    struct gpio_chip stands out by confusingly using a struct device *dev
    to point to the parent device (such as a platform_device) that
    represents the hardware. As we want to give gpio_chip:s real devices,
    this is not working. We need to rename this member to parent.

    This was done by two coccinelle scripts, I guess it is possible to
    combine them into one, but I don't know such stuff. They look like
    this:

    @@
    struct gpio_chip *var;
    @@
    -var->dev
    +var->parent

    and:

    @@
    struct gpio_chip var;
    @@
    -var.dev
    +var.parent

    and:

    @@
    struct bgpio_chip *var;
    @@
    -var->gc.dev
    +var->gc.parent

    Plus a few instances of bgpio that I couldn't figure out how
    to teach Coccinelle to rewrite.

    This patch hits all over the place, but I *strongly* prefer this
    solution to any piecemal approaches that just exercise patch
    mechanics all over the place. It mainly hits drivers/gpio and
    drivers/pinctrl which is my own backyard anyway.

    Cc: Haavard Skinnemoen
    Cc: Rafał Miłecki
    Cc: Richard Purdie
    Cc: Mauro Carvalho Chehab
    Cc: Alek Du
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Acked-by: Dmitry Torokhov
    Acked-by: Greg Kroah-Hartman
    Acked-by: Lee Jones
    Acked-by: Jiri Kosina
    Acked-by: Hans-Christian Egtvedt
    Acked-by: Jacek Anaszewski
    Signed-off-by: Linus Walleij

    Linus Walleij
     

27 Oct, 2015

1 commit

  • 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.

    Signed-off-by: William Breathitt Gray
    Signed-off-by: Linus Walleij

    William Breathitt Gray