20 Jul, 2020
1 commit
-
This makes the driver use the irqchip template to assign
properties to the gpio_irq_chip instead of using the
explicit calls to gpiochip_irqchip_add_nested() and
gpiochip_set_nested_irqchip(). The irqchip is instead
added while adding the gpiochip.Signed-off-by: Linus Walleij
Acked-by: Michael Hennerich
Cc: Nikolaus Voss
Cc: Michael Hennerich
Link: https://lore.kernel.org/r/20200716150502.195821-1-linus.walleij@linaro.org
31 May, 2019
1 commit
-
Based on 1 normalized pattern(s):
licensed under the gpl 2 or later
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 82 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Allison Randal
Reviewed-by: Kate Stewart
Reviewed-by: Richard Fontana
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190524100845.150836982@linutronix.de
Signed-off-by: Greg Kroah-Hartman
09 Feb, 2019
2 commits
-
Interupts were generated using GPIN interrupts of
ADP5588. These interrupts have two important limitations:
1. Interrupts can only be generated for either rising or
falling edges but not both.
2. Interrupts are reasserted as long as the interrupt condition
persists (i.e. high or low level on that GPIN). This generates
lots of interrupts unless the event is very short.To overcome this, ADP5588 provides an event system which queues
up to 10 events in a buffer. GPIN events are queued whenever the
GPIN is asserted or deasserted. This makes it possible to support
generating GPIN interrupts for both edges and to generate only one
interrupt per state change.
Thus it is possible to chain the gpio-keys driver for some GPIOs.Signed-off-by: Nikolaus Voss
Acked-by: Michael Hennerich
Signed-off-by: Linus Walleij -
Make platform data optional and add DT id table.
Switch to dynamically mapped GPIOs and IRQs if not provided
via platform data.Signed-off-by: Nikolaus Voss
Acked-by: Michael Hennerich
Signed-off-by: Linus Walleij
23 Oct, 2018
1 commit
-
Pull GPIO updates from Linus Walleij:
"This is the bulk of GPIO changes for the v4.20 series:Core changes:
- A patch series from Hans Verkuil to make it possible to
enable/disable IRQs on a GPIO line at runtime and drive GPIO lines
as output without having to put/get them from scratch.The irqchip callbacks have been improved so that they can use only
the fastpatch callbacks to enable/disable irqs like any normal
irqchip, especially the gpiod_lock_as_irq() has been improved to be
callable in fastpath context.A bunch of rework had to be done to achieve this but it is a big
win since I never liked to restrict this to slowpath. The only call
requireing slowpath was try_module_get() and this is kept at the
.request_resources() slowpath callback. In the GPIO CEC driver this
is a big win sine a single line is used for both outgoing and
incoming traffic, and this needs to use IRQs for incoming traffic
while actively driving the line for outgoing traffic.- Janusz Krzysztofik improved the GPIO array API to pass a "cookie"
(struct gpio_array) and a bitmap for setting or getting multiple
GPIO lines at once.This improvement orginated in a specific need to speed up an OMAP1
driver and has led to a much better API and real performance gains
when the state of the array can be used to bypass a lot of checks
and code when we want things to go really fast.The previous code would minimize the number of calls down to the
driver callbacks assuming the CPU speed was orders of magnitude
faster than the I/O latency, but this assumption was wrong on
several platforms: what we needed to do was to profile and improve
the speed on the hot path of the array functions and this change is
now completed.- Clean out the painful and hard to grasp BNF experiments from the
device tree bindings. Future approaches are looking into using JSON
schema for this purpose. (Rob Herring is floating a patch series.)New drivers:
- The RCAR driver now supports r8a774a1 (RZ/G2M).
- Synopsys GPIO via CREGs driver.
Major improvements:
- Modernization of the EP93xx driver to use irqdomain and other
contemporary concepts.- The ingenic driver has been merged into the Ingenic pin control
driver and removed from the GPIO subsystem.- Debounce support in the ftgpio010 driver"
* tag 'gpio-v4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (116 commits)
gpio: Clarify kerneldoc on gpiochip_set_chained_irqchip()
gpio: Remove unused 'irqchip' argument to gpiochip_set_cascaded_irqchip()
gpio: Drop parent irq assignment during cascade setup
mmc: pwrseq_simple: Fix incorrect handling of GPIO bitmap
gpio: fix SNPS_CREG kconfig dependency warning
gpiolib: Initialize gdev field before is used
gpio: fix kernel-doc after devres.c file rename
gpio: fix doc string for devm_gpiochip_add_data() to not talk about irq_chip
gpio: syscon: Fix possible NULL ptr usage
gpiolib: Show correct direction from the beginning
pinctrl: msm: Use init_valid_mask exported function
gpiolib: Add init_valid_mask exported function
GPIO: add single-register GPIO via CREG driver
dt-bindings: Document the Synopsys GPIO via CREG bindings
gpio: mockup: use device properties instead of platform_data
gpio: Slightly more helpful debugfs
gpio: omap: Remove set but not used variable 'dev'
gpio: omap: drop omap_gpio_list
Accept partial 'gpio-line-names' property.
gpio: omap: get rid of the conditional PM runtime calls
...
29 Aug, 2018
2 commits
-
no functional changes
Signed-off-by: Michael Hennerich
Signed-off-by: Linus Walleij -
This fixes:
[BUG] gpio: gpio-adp5588: A possible sleep-in-atomic-context bug
in adp5588_gpio_write()
[BUG] gpio: gpio-adp5588: A possible sleep-in-atomic-context bug
in adp5588_gpio_direction_input()Reported-by: Jia-Ju Bai
Signed-off-by: Michael Hennerich
Signed-off-by: Linus Walleij
14 Jan, 2018
1 commit
-
This driver has no business including , it is a
driver so include .Signed-off-by: Linus Walleij
29 May, 2017
1 commit
-
include/linux/i2c is not for client devices. Move the header file to a
more appropriate location.Signed-off-by: Wolfram Sang
Acked-by: Dmitry Torokhov
Signed-off-by: Linus Walleij
23 Feb, 2016
1 commit
-
Use devm_gpiochip_add_data() for GPIO registration and remove the
call for gpiochip_remove() from remove callback.Signed-off-by: Laxman Dewangan
Cc: Michael Hennerich
Acked-by: Michael Hennerich
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: Jean-Francois Dagenais
Signed-off-by: Linus Walleij
28 Jul, 2015
1 commit
-
set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also modify IRQ_NOPROBE and this has been maintained although it
is not clear that is really needed as most platforms don't use probing.
There appears to be a great deal of blind copy and paste of this code.Signed-off-by: Rob Herring
Cc: Michael Hennerich
Acked-by: Linus Walleij
Cc: Alexandre Courbot
Cc: Ray Jui
Cc: Stephen Warren
Cc: Thierry Reding
Cc: linux-gpio@vger.kernel.org
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Linus Walleij
08 Apr, 2015
3 commits
-
commit 3de07e5aaf290a0b58919 ("drivers: gpio: use devm_kzalloc")
introduce devm_kzalloc() for allocating the memory. In this case kfree
is not required to use. Above commit id introduced the bug that kfree
is not removed from the remove function.This patch fix the above bug.
Signed-off-by: Varka Bhadram
Signed-off-by: Linus Walleij -
Signed-off-by: Varka Bhadram
Signed-off-by: Linus Walleij -
We can use devres API for allocating memory. No need of using kfree.
Signed-off-by: Varka Bhadram
Signed-off-by: Linus Walleij
22 Jul, 2014
1 commit
-
Signed-off-by: abdoulaye berthe
Signed-off-by: Linus Walleij
09 May, 2014
1 commit
-
The site-specific OOM messages are unnecessary, because they
duplicate the MM subsystem generic OOM message.Signed-off-by: Jingoo Han
Reviewed-by: Javier Martinez Canillas
Signed-off-by: Linus Walleij
13 Feb, 2014
2 commits
-
which is already found in the common header for adp5588
Signed-off-by: Jean-Francois Dagenais
Acked-by: Michael Hennerich
Signed-off-by: Linus Walleij -
As discussed here: http://ez.analog.com/message/35852,
the 5587 revC and 5588 revB spec sheets contain a mistake
in the GPIO_DAT_STATx register description.According to R.Shnell at ADI, as well as my own
observations, it should read:
"GPIO data status (shows GPIO state when read for inputs)".This commit changes the get value function accordingly.
Signed-off-by: Jean-Francois Dagenais
Acked-by: Michael Hennerich
Signed-off-by: Linus Walleij
04 Dec, 2013
1 commit
-
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 Aug, 2013
1 commit
-
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.Signed-off-by: Jingoo Han
Signed-off-by: Linus Walleij
29 Nov, 2012
3 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 __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
04 Sep, 2012
1 commit
-
Signed-off-by: Axel Lin
Signed-off-by: Linus Walleij
11 Apr, 2012
1 commit
-
The variable 'bit' is uninitialized in the first iteration of for
loop. Fix it.Signed-off-by: Axel Lin
Signed-off-by: Grant Likely
13 Dec, 2011
1 commit
-
This patch adds a kernel message, containing GPIO range and device
name on successful device registration, and removes duplicate messages from the following drivers:
* gpio-adp5588
* gpio-bt8xx
* gpio-cs5535
* gpio-janz-ttl
* gpio-nomadik
* gpio-pcf857x
* gpio-xilinx
* drivers/of/gpio.cSigned-off-by: Hartmut Knaack
[grant.likely@secretlab.ca: squashed 2 patches together]
Signed-off-by: Grant Likely
07 Jun, 2011
1 commit
-
Sort the gpio makefile and enforce the naming convention gpio-*.c for
gpio drivers.v2: cleaned up filenames in Kconfig and comment blocks
v3: fixup use of BASIC_MMIO to GENERIC_GPIO for mxcSigned-off-by: Grant Likely