05 Apr, 2019

1 commit


10 Dec, 2018

1 commit

  • The problem is reported for allmodconfig build setup:

    ERROR: "irq_chip_retrigger_hierarchy" [drivers/gpio/gpio-lpc18xx.ko] undefined!
    make[2]: *** [scripts/Makefile.modpost:92: __modpost] Error 1
    make[1]: *** [Makefile:1271: modules] Error 2

    My testing in runtime shows that it is sufficient to remove .irq_retrigger
    callback, which is assigned to unexported irq_chip_retrigger_hierarchy()
    function, I did't observe any regressions, and thus apparently it is a
    better fix rather than exporting the function defined in kernel/irq/chip.c
    (see commit 52b2a05fa7c8 ("genirq: Export IRQ functions for module use"))
    or sticking the GPIO controller driver build to built-in option only.

    Reported-by: kbuild test robot
    Fixes: 5ddabfe8d3de ("gpio: lpc18xx: add GPIO pin interrupt controller support")
    Signed-off-by: Vladimir Zapolskiy
    Signed-off-by: Linus Walleij

    Vladimir Zapolskiy
     

07 Dec, 2018

4 commits

  • The change adds support of LPC18xx/LPC43xx GPIO pin interrupt controller
    block within SoC GPIO controller. The new interrupt controller driver
    allows to configure and capture edge or level interrupts on 8 arbitrary
    selectedinput GPIO pins, and lift the signals to be reported as NVIC rising
    edge interrupts. Configuration of a particular GPIO pin to serve as
    interrupt and its mapping to an interrupt on NVIC is done by SCU pin
    controller, for more details see description of 'nxp,gpio-pin-interrupt'
    device tree property of a GPIO pin [1].

    From LPC18xx and LPC43xx User Manuals the GPIO controller consists of
    the following blocks:
    * GPIO pin interrupt block at 0x40087000, this change adds its support,
    * GPIO GROUP0 interrupt block at 0x40088000,
    * GPIO GROUP1 interrupt block at 0x40089000,
    * GPIO port block at 0x400F4000, it is supported by the original driver.

    While all 4 sub-controller blocks have their own I/O addresses, moreover
    all 3 interrupt blocks are APB0 peripherals and high-speed GPIO block is
    an AHB slave, according to the hardware manual the GPIO controller is
    seen as a single block, and 4 sub-controllers have the shared reset signal
    RGU #28 and clock to register interface CLK_CPU_GPIO on CCU1.

    Likely support of two GPIO group interrupt blocks won't be added in short
    term, because the mechanism to mask several interrupt sources is not well
    defined.

    [1] Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.txt

    Signed-off-by: Vladimir Zapolskiy
    Signed-off-by: Linus Walleij

    Vladimir Zapolskiy
     
  • Slightly simplify deregistration of the GPIO controller driver.

    Signed-off-by: Vladimir Zapolskiy
    Signed-off-by: Linus Walleij

    Vladimir Zapolskiy
     
  • This is a non-functional change, it simplifies multiple access to
    'struct device' pointer derived from a platform device pointer,
    the new local variable will also be used in the following changes.

    Signed-off-by: Vladimir Zapolskiy
    Signed-off-by: Linus Walleij

    Vladimir Zapolskiy
     
  • Replace GPLv2 header with the SPDX identifier.

    Signed-off-by: Vladimir Zapolskiy
    Signed-off-by: Linus Walleij

    Vladimir Zapolskiy
     

13 Sep, 2016

1 commit

  • These structures are only used to copy into other structures, so declare
    them as const.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct gpio_chip i@p = { ... };

    @ok@
    identifier r.i;
    expression e;
    position p;
    @@
    e = i@p;

    @bad@
    position p != {r.p,ok.p};
    identifier r.i;
    struct gpio_chip e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct gpio_chip i = { ... };
    //

    Signed-off-by: Julia Lawall
    Acked-by: Joachim Eastwood
    Signed-off-by: Linus Walleij

    Julia Lawall
     

05 Jan, 2016

1 commit


19 Nov, 2015

1 commit

  • 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
     

17 Oct, 2015

1 commit


05 May, 2015

1 commit