23 Feb, 2016
1 commit
-
Use devm_gpiochip_add_data() for GPIO registration and remove the
call for gpiochip_remove() from error path.Also remove the need of driver callback .remove.
Signed-off-by: Laxman Dewangan
Cc: Alexandre Courbot
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().Signed-off-by: Linus Walleij
30 Nov, 2015
1 commit
-
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.Signed-off-by: Krzysztof Kozlowski
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
02 Sep, 2014
1 commit
-
This switches the ADNP GPIO driver to use the gpiolib
irqchip helpers. Also do some random refactoring to make it
look like most other GPIO drivers.Cc: Roland Stigge
Cc: Lars Poeschel
Cc: Thierry Reding
Signed-off-by: Linus Walleij
22 Jul, 2014
1 commit
-
Signed-off-by: abdoulaye berthe
Signed-off-by: Linus Walleij
18 Mar, 2014
1 commit
-
This switches all GPIO and pin control drivers with irqchips
that were using .startup() and .shutdown() callbacks to lock
GPIO lines for IRQ usage over to using the .request_resources()
and .release_resources() callbacks just introduced into the
irqchip vtable.Cc: Thomas Gleixner
Cc: Jean-Jacques Hiblot
Signed-off-by: Linus Walleij
04 Dec, 2013
3 commits
-
Conflicts:
drivers/gpio/gpio-em.c -
This uses the new API for tagging GPIO lines as in use by
IRQs. This enforces a few semantic checks on how the underlying
GPIO line is used.Only compile tested on the lpc32xx.
ChangeLog v2->v3:
- Switch to using the startup()/shutdown() callbacks again.
Still satisfy the mask/unmask semantics.
ChangeLog v1->v2:
- Use the .enable() callback from the irq_chip
- Call .unmask() from the .enable() callback to satisfy semantics.Cc: Lars Poeschel
Cc: Thierry Reding
Signed-off-by: Linus Walleij -
This switches the two members of struct gpio_chip that were
defined as unsigned foo:1 to bool, because that is indeed what
they are. Switch all users in the gpio and pinctrl subsystems
to assign these values with true/false instead of 0/1. The
users outside these subsystems will survive since true/false
is 1/0, atleast we set some kind of more strict typing example.Signed-off-by: Linus Walleij
16 Oct, 2013
1 commit
-
This variable is confusingly named, the different Linux IRQs
aren't any more virtual than any other Linux IRQ. Give it a
non-misleading name.Acked-by: Lars Poeschel
Signed-off-by: Linus Walleij
02 Oct, 2013
1 commit
-
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.Signed-off-by: Sachin Kamat
Signed-off-by: Linus Walleij
16 Aug, 2013
1 commit
-
In case request_threaded_irq inside adnp_irq_setup fails, the driver
segfaults. This is because irq_domain_remove is called twice with
the same pointer. First time in adnp_irq_setup and then a second time
after leaving adnp_irq_setup in the error path of adnp_i2c_probe
inside adnp_teardown.
This fixes this by removing the call to irq_domain_remove from
adnp_irq_setup.Signed-off-by: Lars Poeschel
Signed-off-by: Linus Walleij
29 Nov, 2012
4 commits
-
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.Signed-off-by: Bill Pemberton
Cc: Grant Likely
Acked-by: Linus Walleij
Cc: Peter Tyser
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devinitconst is no
longer needed.Signed-off-by: Bill Pemberton
Cc: Grant Likely
Acked-by: Linus Walleij
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Grant Likely
Cc: Peter Tyser
Cc: Santosh Shilimkar
Cc: Kevin Hilman
Acked-by: Linus Walleij
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Grant Likely
Cc: Peter Tyser
Acked-by: Linus Walleij
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman
19 Sep, 2012
1 commit
-
This commit adds a driver for the Avionic Design N-bit GPIO expander.
The expander provides a variable number of GPIO pins with interrupt
support.Changes in v2:
- allow building the driver as a module
- assign of_node unconditionally
- use linear mapping IRQ domain
- properly cleanup IRQ domain
- add OF device table and annotate device tables
- emulate rising and falling edge triggers
- increase #gpio-cells to 2
- drop support for !OF
- use IS_ENABLED to conditionalize DEBUG_FS codeChanges in v3:
- make IRQ support runtime configurable (interrupt-controller property)
- drop interrupt-controller and #interrupt-cells from DT binding
- add inline to_adnp() function to wrap container_of() macro
- consistently use adnp as name for struct adnp variables
- remove irq_mask_cur and rename irq_mask to irq_enable
- fix a subtle deadlock in adnp_gpio_direction_output()
- remove dynamic allocations from debugfs code
- rename regs to num_regs to avoid confusion
- annotate non-trivial code with comments
- don't acquire mutex in adnp_gpio_get()
- assume NO_IRQ == 0Cc: Grant Likely
Cc: devicetree-discuss@lists.ozlabs.org
Cc: Linus Walleij
Cc: linux-kernel@vger.kernel.org
Acked-by: Rob Herring
Signed-off-by: Thierry Reding
Signed-off-by: Linus Walleij