11 Dec, 2015

14 commits


10 Dec, 2015

3 commits

  • The interrupt management is changed by this patch to rely on chip data
    instead of chained interrupts.

    The main goal is to loosen the dependency on the global pxa chip
    structure in favor of the passed chip data. The secondary goal is to
    better show in /proc/interrupts the difference between interrupts for
    gpio0 and gpio1 (directly wired to interrupt controller), and the other
    gpios (wired onto a third line in the interrupt controller).

    The last advantage of this patch is that the interrupt is actually
    requested, so that another driver cannot steal this line, or overwrite
    the handler.

    Signed-off-by: Robert Jarzmik
    Signed-off-by: Linus Walleij

    Robert Jarzmik
     
  • Use the device managed ioremap to simplify the probe function.

    Signed-off-by: Robert Jarzmik
    Signed-off-by: Linus Walleij

    Robert Jarzmik
     
  • The pxa gpio IP is provided by one chip, which holds multiple banks.

    Another reason the driver should register only one gpiochip instead of
    multiple gpiochips (ie. 1 per each bank) is that for pincontrol and
    devicetree integration (think gpio-ranges), it's impossible to have the
    contiguous pin range 0..127 mapped to gpios 0..127.

    This patch, amongst other thinks, paves the path to loosen the bond with
    the global structure variable pxa_gpio_chip.

    Signed-off-by: Robert Jarzmik
    Signed-off-by: Linus Walleij

    Robert Jarzmik
     

09 Dec, 2015

3 commits

  • After adding the DT matching in
    commit 6f29c9afbe636fc0e35c82a11eaf45c3b85eb07a
    "gpio: pca935x: fix of-only probed devices"
    compilation fails like this:

    CC [M] drivers/gpio/gpio-pca953x.o
    gpio-pca953x.c: In function ‘pca953x_probe’:
    gpio-pca953x.c:693:11: error: implicit declaration of
    function ‘of_match_device’ [-Werror=implicit-function-declaration]
    match = of_match_device(pca953x_dt_ids, &client->dev);
    ^
    gpio-pca953x.c:693:9: warning: assignment makes pointer from
    integer without a cast [-Wint-conversion]
    match = of_match_device(pca953x_dt_ids, &client->dev);
    ^
    cc1: some warnings being treated as errors
    ../scripts/Makefile.build:264: recipe for target
    'drivers/gpio/gpio-pca953x.o' failed

    After removing the conditional inclusion guards compilation
    works fine again. Might be a module problem so that
    fix.

    Cc: Ben Dooks
    Signed-off-by: Linus Walleij

    Linus Walleij
     
  • If the pca953x device is probed from OF using the proper OF probing then
    the i2c-client will be NULL and the device probe will fail as id is NULL
    and it isn't an ACPI device (previous drivers would simply OOPS out).

    Add support for the of_device_id table having the same data as the others
    so that the correct paths will be taken when registering a device.

    An example of current valid of node which did not work:

    gpio@38 {
    compatible = "onsemi,pca9654", "nxp,pca9534";
    reg = ;
    interrupt-parent = ;
    interrupts = ;
    };

    Signed-off-by: Ben Dooks
    Signed-off-by: Linus Walleij

    Ben Dooks
     
  • Add onsemi,pca9654 which is also compatible with the nxp,pca9524 as it
    is an 8bit expander with an interrupt output.

    Signed-off-by: Ben Dooks
    Signed-off-by: Linus Walleij

    Ben Dooks
     

07 Dec, 2015

2 commits


04 Dec, 2015

1 commit


01 Dec, 2015

1 commit

  • The ACCES 104-IDI-48 family of PC/104 utility boards feature 48
    individually optically isolated digital inputs. Enabled inputs feature
    change-of-state detection capability; if change-of-state detection is
    enabled, an interrupt is fired off if a change of input level
    (low-to-high or high-to-low) is detected. Change-of-state IRQs are
    enabled/disabled on 8-bit boundaries, for a total of six boundaries.

    This driver provides GPIO and IRQ support for these 48 channels of
    digital input. The base port address for the device may be configured
    via the idi_48_base module parameter. The interrupt line number for the
    device may be configured via the idi_48_irq module parameter.

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

    William Breathitt Gray
     

30 Nov, 2015

4 commits


19 Nov, 2015

11 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
     
  • We need to check if number of gpio is positive if there is no
    such check in devicetree or acpi or whatever called before
    gpiochip_add.

    I suppose that devicetree and acpi do not allow insert gpiochip
    with zero number but I do not know if it is enough to ignore
    this check in gpiochip_add.

    Signed-off-by: Bamvor Jian Zhang
    Signed-off-by: Linus Walleij

    Bamvor Jian Zhang
     
  • There are limitations for the current checker:
    1. Could not check the overlap if the new gpiochip is the secondly
    gpiochip.
    2. Could not check the overlap if the new gpiochip is overlap
    with the left of gpiochip. E.g. if we insert [c, d] between
    [a,b] and [e, f], and e >= c + d, it will successful even if
    c < a + b.
    3. Allow overlap of base of different gpiochip.

    This patch fix these issues by checking the overlap of both right and
    left gpiochip in the same loop statement.

    Signed-off-by: Bamvor Jian Zhang
    [Tweaked to remove unnecessary ret variable]
    Signed-off-by: Linus Walleij

    Bamvor Jian Zhang
     
  • The commit f881bab038c9 ("gpio: keep the GPIO line names internal")
    change the error to warning in gpiochip_set_desc_names. Update the
    comment accordingly.

    Signed-off-by: Bamvor Jian Zhang
    Signed-off-by: Linus Walleij

    Bamvor Jian Zhang
     
  • This patch is a second attempt at what was previously in commit
    6c7e660a27da ("gpio: pxa: set initcall level to module init").

    The goal is the same : enable gpio & pinctrl driver to work
    together. As pinctrl driver will be initialized at device level, the
    gpio should be as well, so that the deferring mechanism is honored.

    Yet this patch should also respect the legacy platforms, so the set of
    constraints is :
    - in legacy platforms (ie. non dt), gpio_[gs]et_*() should be available
    for machine code => core initcall
    - in new platforms (ie. dt based), pinctrl will be available and no
    machine code => device initcall

    In order to fullfill all these constraints, the initcall level is either
    postcore for non devicetree platforms, and device for devicetree platforms.

    Signed-off-by: Robert Jarzmik
    Signed-off-by: Linus Walleij

    Robert Jarzmik
     
  • I'm not as involved in OMAP as I used to be and Grygorii is the most
    active developer working on this driver and has also been reviewing
    patches so let's add him as a driver maintainer instead of me.

    While being there, add the driver's DT binding doc to the file list.

    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: Linus Walleij

    Javier Martinez Canillas
     
  • We should not fall back to the legacy unnamed gpio lookup style if the
    driver requests gpios with different names, because we'll give out the same
    gpio twice. Let's keep track of the names that were used for the device and
    only do the fallback for the first name used.

    Signed-off-by: Dmitry Torokhov
    Acked-by: Mika Westerberg
    Signed-off-by: Linus Walleij

    Dmitry Torokhov
     
  • The TPS65086 PMIC contains several regulators and a GPO controller.
    Add bindings for the TPS65086 GPO controller.

    Signed-off-by: Andrew F. Davis
    Acked-by: Rob Herring
    Signed-off-by: Linus Walleij

    Andrew F. Davis
     
  • 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
     
  • The AC97 specification provides a guide for 16 GPIOs in the codecs. If
    the gpiolib is compiled in the kernel, declare a gpio chip.

    This was tested with a pxa27x board (mioa701) and a wm9713 codec.

    Signed-off-by: Robert Jarzmik
    Signed-off-by: Mark Brown

    Robert Jarzmik
     

16 Nov, 2015

1 commit