28 Jan, 2019
1 commit
-
On SoC reset all GPIO interrupts are disable. However, if kexec is
used to boot into a new kernel, the SoC does not experience a
reset. Hence GPIO interrupts can be left enabled from the previous
kernel. It is then possible for the interrupt to fire before an
interrupt handler is registered, resulting in the kernel complaining
of an "unexpected IRQ trap", the interrupt is never cleared, and so
fires again, resulting in an interrupt storm.Disable all GPIO interrupts before registering the GPIO IRQ chip.
Fixes: 7f2691a19627 ("gpio: vf610: add gpiolib/IRQ chip driver for Vybrid")
Signed-off-by: Andrew Lunn
Acked-by: Stefan Agner
Signed-off-by: Linus Walleij
17 Nov, 2018
1 commit
-
Some SoCs need the gpio clock to be enabled before accessing
HW registers. This patch add the optional clock handling.Cc: Linus Walleij
Cc: Stefan Agner
Cc: Shawn Guo
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Dong Aisheng
Signed-off-by: Linus Walleij
12 Sep, 2018
2 commits
-
Just use the SPDX identifier for the license.
Acked-by: Stefan Agner
Signed-off-by: Linus Walleij -
This is a GPIO driver so only include .
Acked-by: Stefan Agner
Signed-off-by: Linus Walleij
16 May, 2018
1 commit
-
Use of_device_get_match_data() instead of open-coding it.
Signed-off-by: Thierry Reding
Signed-off-by: Linus Walleij
08 Nov, 2017
1 commit
-
In order to consolidate the multiple ways to associate an IRQ chip with
a GPIO chip, move more fields into the new struct gpio_irq_chip.Signed-off-by: Thierry Reding
Acked-by: Grygorii Strashko
Signed-off-by: Linus Walleij
14 Aug, 2017
1 commit
-
The Rapid General-Purpose Input and Output with 2 Ports (RGPIO2P)
on MX7ULP is similar to GPIO on Vibrid. But unlike Vibrid, the
RGPIO2P has an extra Port Data Direction Register (PDDR) used
to configure the individual port pins for input or output.We introduce a bool have_paddr with fsl_gpio_soc_data data
to distinguish this differences. And we support getting the output
status by checking the GPIO direction in PDDR.Cc: Alexandre Courbot
Cc: Shawn Guo
Cc: Stefan Agner
Cc: Fugang Duan
Cc: Peter Chen
Signed-off-by: Dong Aisheng
Signed-off-by: Linus Walleij
24 Nov, 2016
1 commit
-
Use builtin_platform_driver() helper to simplify the code.
Signed-off-by: Geliang Tang
Signed-off-by: Linus Walleij
23 Aug, 2016
1 commit
-
The Kconfig currently controlling compilation of this code is:
drivers/gpio/Kconfig:config GPIO_VF610
drivers/gpio/Kconfig: def_bool y...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular infrastructure use, so that
when reading the driver there is no doubt it is builtin-only.We delete the MODULE_LICENSE tag etc. since all that information
is now contained at the top of the file in the comments.We don't replace module.h with init.h since the file already has that.
Cc: Alexandre Courbot
Cc: Stefan Agner
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker
Signed-off-by: Linus Walleij
05 Jan, 2016
1 commit
-
This makes the driver use the data pointer added to the gpio_chip
to store a pointer to the state container instead of relying on
container_of().Cc: Stefan Agner
Signed-off-by: Linus Walleij
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->parentand:
@@
struct gpio_chip var;
@@
-var.dev
+var.parentand:
@@
struct bgpio_chip *var;
@@
-var->gc.dev
+var->gc.parentPlus 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
17 Oct, 2015
1 commit
-
Replace all trivial request/free callbacks that do nothing but call into
pinctrl code with the generic versions.Signed-off-by: Jonas Gorski
Reviewed-by: Thomas Petazzoni
Acked-by: James Hogan
Acked-by: Stefan Agner
Acked-by: Joachim Eastwood
Acked-by: Gregory CLEMENT
Signed-off-by: Linus Walleij
02 Oct, 2015
1 commit
-
The state container of the vf610 GPIO driver is sometimes
extracted from the gpio_chip exploiting the fact that offsetof()
the struct gpio_chip inside the struct vf610_gpio_port is 0, so
the container_of() is in practice a noop. However if a member
is added to struct vf610_gpio_port in front of struct gpio_chip,
things will break. Using proper container_of() avoids this
problem.Semantically this is a noop, the compiler will optimize it away,
but syntactically it makes me happier.Also replace some explicit container_of() calls with the helper
function.Acked-by: Stefan Agner
Signed-off-by: Linus Walleij
16 Sep, 2015
2 commits
-
Most interrupt flow handlers do not use the irq argument. Those few
which use it can retrieve the irq number from the irq descriptor.Remove the argument.
Search and replace was done with coccinelle and some extra helper
scripts around it. Thanks to Julia for her help!Signed-off-by: Thomas Gleixner
Cc: Julia Lawall
Cc: Jiang Liu -
Use irq_set_handler_locked() as it avoids a redundant lookup of the
irq descriptor. Search and replacement was done with coccinelle:Signed-off-by: Thomas Gleixner
Cc: Julia Lawall
Cc: Linus Walleij
Cc: linux-gpio@vger.kernel.org
26 Aug, 2015
1 commit
-
The GPIO IRQ controller is able to generate level triggered
interrupts, however, these were handled by handle_simple_irq so far
which did not take care of IRQ masking. This lead to "nobody cared
(try booting with the "irqpoll" option)" stack traces.Use the generic interrupt handlers depending on the IRQ type.
Signed-off-by: Stefan Agner
Signed-off-by: Linus Walleij
14 Jul, 2015
1 commit
-
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.Preparatory patch for the removal of the 'irq' argument from irq flow
handlers.Signed-off-by: Jiang Liu
Acked-by: Linus Walleij
Cc: Alexandre Courbot
Signed-off-by: Thomas Gleixner
06 Mar, 2015
1 commit
-
Signed-off-by: Axel Lin
Signed-off-by: Linus Walleij
16 Jan, 2015
1 commit
-
This platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
Signed-off-by: Linus Walleij
24 Oct, 2014
1 commit
-
Add a gpiolib and IRQ chip driver for Vybrid ARM SoC using the
Vybrid's GPIO and PORT module. The driver is instanced once per
each GPIO/PORT module pair and handles 32 GPIO's.Signed-off-by: Stefan Agner
Acked-by: Shawn Guo
Signed-off-by: Linus Walleij