10 Jul, 2019
1 commit
-
Pull GPIO updates from Linus Walleij:
"This is the big slew of GPIO changes for the v5.3 kernel cycle. This
is mostly incremental work this time.Three important things:
- The FMC subsystem is deleted through my tree. This happens through
GPIO as its demise was discussed in relation to a patch decoupling
its GPIO implementation from the standard way of handling GPIO. As
it turns out, that is not the only subsystem it reimplements and
the authors think it is better do scratch it and start over using
the proper kernel subsystems than try to polish the rust shiny. See
the commit (ACKed by the maintainers) for details.- Arnd made a small devres patch that was ACKed by Greg and goes into
the device core.- SPDX header change colissions may happen, because at times I've
seen that quite a lot changed during the -rc:s in regards to SPDX.
(It is good stuff, tglx has me convinced, and it is worth the
occasional pain.)Apart from this is is nothing controversial or problematic.
Summary:
Core:
- When a gpio_chip request GPIOs from itself, it can now fully
control the line characteristics, both machine and consumer flags.
This makes a lot of sense, but took some time before I figured out
that this is how it has to work.- Several smallish documentation fixes.
New drivers:
- The PCA953x driver now supports the TI TCA9539.
- The DaVinci driver now supports the K3 AM654 SoCs.
Driver improvements:
- Major overhaul and hardening of the OMAP driver by Russell King.
- Starting to move some drivers to the new API passing irq_chip along
with the gpio_chip when adding the gpio_chip instead of adding it
separately.Unrelated:
- Delete the FMC subsystem"
* tag 'gpio-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (87 commits)
Revert "gpio: tegra: Clean-up debugfs initialisation"
gpiolib: Use spinlock_t instead of struct spinlock
gpio: stp-xway: allow compile-testing
gpio: stp-xway: get rid of the #include dependency
gpio: stp-xway: improve module clock error handling
gpio: stp-xway: simplify error handling in xway_stp_probe()
gpiolib: Clarify use of non-sleeping functions
gpiolib: Fix references to gpiod_[gs]et_*value_cansleep() variants
gpiolib: Document new gpio_chip.init_valid_mask field
Documentation: gpio: Fix reference to gpiod_get_array()
gpio: pl061: drop duplicate printing of device name
gpio: altera: Pass irqchip when adding gpiochip
gpio: siox: Use devm_ managed gpiochip
gpio: siox: Add struct device *dev helper variable
gpio: siox: Pass irqchip when adding gpiochip
drivers: gpio: amd-fch: make resource struct const
devres: allow const resource arguments
gpio: ath79: Pass irqchip when adding gpiochip
gpio: tegra: Clean-up debugfs initialisation
gpio: siox: Switch to IRQ_TYPE_NONE
...
28 Jun, 2019
1 commit
-
We need to convert all old gpio irqchips to pass the irqchip
setup along when adding the gpio_chip.For chained irqchips this is a pretty straight-forward
conversion.Take this opportunity to add a local dev pointer and
use devm_gpiochip_add() so we can get rid of the remove()
callback altogether.Cc: linux-mips@linux-mips.org
Acked-by: Alban Bedel
Signed-off-by: Linus Walleij
19 Jun, 2019
1 commit
-
Based on 2 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundationthis program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation #extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 4122 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Enrico Weigelt
Reviewed-by: Kate Stewart
Reviewed-by: Allison Randal
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman
30 Jul, 2018
1 commit
-
Fix the following sparse error:
drivers/gpio/gpio-ath79.c:54:16: error: return expression in void function
Signed-off-by: zhong jiang
Acked-by: Alban Bedel
Signed-off-by: Linus Walleij
27 Mar, 2018
1 commit
-
platform_get_resource() may return NULL, add proper
check to avoid potential NULL dereferencing.This is detected by Coccinelle semantic patch.
@@
expression pdev, res, n, t, e, e1, e2;
@@res = platform_get_resource(pdev, t, n);
+ if (!res)
+ return -EINVAL;
... when != res == NULL
e = devm_ioremap(e1, res->start, e2);Signed-off-by: Wei Yongjun
[albeu@free.fr: Fixed patch to apply on current tree]
Signed-off-by: Alban Bedel
Signed-off-by: Linus Walleij
03 Dec, 2017
1 commit
-
This change resolves a new compile-time warning
when built as a loadable module:WARNING: modpost: missing MODULE_LICENSE() in drivers/gpio/gpio-ath79.o
see include/linux/module.h for more informationThis adds the license as "GPL v2", which matches the header of the file.
MODULE_DESCRIPTION is also added.
Signed-off-by: Jesse Chan
Acked-by: Alban Bedel
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
20 Oct, 2017
1 commit
-
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.Signed-off-by: Gustavo A. R. Silva
Signed-off-by: Linus Walleij
17 Mar, 2017
1 commit
-
The ath79 gpio driver currently implements an irq_chip for handling
interrupts; due to how irq_chip handling is done, it's necessary for the
irq_chip methods to be invoked from hardirq context, even on a a
real-time kernel. Because the spinlock_t type becomes a "sleeping"
spinlock w/ RT kernels, it is not suitable to be used with irq_chips.A quick audit of the operations under the lock reveal that they do only
minimal, bounded work, and are therefore safe to do under a raw spinlock.Signed-off-by: Julia Cartwright
Acked-by: Aban Bedel
Signed-off-by: Linus Walleij
24 Oct, 2016
1 commit
-
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/gpio/gpio-ath79.ko | grep alias
$After this patch:
$ modinfo drivers/gpio/gpio-ath79.ko | grep alias
alias: of:N*T*Cqca,ar9340-gpioC*
alias: of:N*T*Cqca,ar9340-gpio
alias: of:N*T*Cqca,ar7100-gpioC*
alias: of:N*T*Cqca,ar7100-gpioSigned-off-by: Javier Martinez Canillas
Acked-by: Aban Bedel
Signed-off-by: Linus Walleij
15 Sep, 2016
1 commit
-
The Kconfig for this file is:
drivers/gpio/Kconfig:config GPIO_ATH79
drivers/gpio/Kconfig: tristate "Atheros AR71XX/AR724X/AR913X GPIO support"...but however it does not include module.h -- it in turn gets it from
another header (gpio/driver.h) and we'd like to replace that with a
forward delcaration of "struct module;" but if we do, this file will
fail to compile.So we fix this first to avoid putting build failures into the bisect
commit history.Cc: Linus Walleij
Cc: Alexandre Courbot
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker
Signed-off-by: Linus Walleij
25 Feb, 2016
1 commit
-
Move the code checking valid gpio count to cover both DT and non-DT cases.
Signed-off-by: Axel Lin
Acked-by: Alban Bedel
Signed-off-by: Linus Walleij
10 Feb, 2016
5 commits
-
Add myself to the copyright list and remove the reference to Atheros'
BSP as nothing is left of this code.Signed-off-by: Alban Bedel
Signed-off-by: Linus Walleij -
Add support for the interrupt controller using GPIOLIB_IRQCHIP.
Both edges isn't supported by the chip and has to be emulated
by switching the polarity on each interrupt.Signed-off-by: Alban Bedel
Signed-off-by: Linus Walleij -
As we now allow the driver to be built as a module it should be
removable.Signed-off-by: Alban Bedel
Signed-off-by: Linus Walleij -
To allow building the driver in compile tests we must drop the
dependency on asm/mach-ath79/ar71xx_regs.h. For this we replace the
include with local definition of the registers needed for this driver.Signed-off-by: Alban Bedel
Signed-off-by: Linus Walleij -
Drop most of the code in favor of the generic MMIO GPIO driver.
As the driver now depend on CONFIG_GPIO_GENERIC also add a Kconfig
entry to make the driver optional.We leave the base pointer and lock in the data struct because they are
needed for the IRQ support.Signed-off-by: Alban Bedel
Acked-by: Alexandre Courbot
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().Acked-by: Alban Bedel
Signed-off-by: Linus Walleij
21 Dec, 2015
1 commit
-
Linux 4.4-rc6
12 Dec, 2015
1 commit
-
Signed-off-by: Axel Lin
Acked-by: Alban Bedel
Signed-off-by: Linus Walleij
30 Nov, 2015
1 commit
-
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.Signed-off-by: Nizam Haider
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 Oct, 2015
1 commit
-
Turn the ath79 driver into a true driver supporting multiple
instances. While at it also removed unneed includes and make use of
the BIT() macro.Signed-off-by: Alban Bedel
Signed-off-by: Linus Walleij
03 Sep, 2015
2 commits
-
Currently CONFIG_ARCH_HAVE_CUSTOM_GPIO_H is defined for all MIPS
machines, and each machine type provides its own gpio.h. However
only a handful really implement the GPIO API, most just forward
everythings to gpiolib.The Alchemy machine is notable as it provides a system to allow
implementing the GPIO API at the board level. But it is not used by
any board currently supported, so it can also be removed.For most machine types we can just remove the custom gpio.h, as well
as the custom wrappers if some exists. Some of the code found in
the wrappers must be moved to the respective GPIO driver.A few more fixes are need in some drivers as they rely on linux/gpio.h
to provides some machine specific definitions, or used asm/gpio.h
instead of linux/gpio.h for the gpio API.Signed-off-by: Alban Bedel
Reviewed-by: Linus Walleij
Cc: linux-mips@linux-mips.org
Cc: Hauke Mehrtens
Cc: Rafał Miłecki
Cc: Bartlomiej Zolnierkiewicz
Cc: Tejun Heo
Cc: Alexandre Courbot
Cc: Dmitry Torokhov
Cc: Florian Fainelli
Cc: Manuel Lauss
Cc: Joe Perches
Cc: Daniel Walter
Cc: Sergey Ryazanov
Cc: Huacai Chen
Cc: James Hartley
Cc: Andrew Bresticker
Cc: Paul Burton
Cc: Jiri Kosina
Cc: Bjorn Helgaas
Cc: Wolfram Sang
Cc: Randy Dunlap
Cc: Varka Bhadram
Cc: Masanari Iida
Cc: Tomi Valkeinen
Cc: Michael Buesch
Cc: abdoulaye berthe
Cc: linux-kernel@vger.kernel.org
Cc: linux-ide@vger.kernel.org
Cc: linux-gpio@vger.kernel.org
Cc: linux-input@vger.kernel.org
Cc: netdev@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/10828/
Signed-off-by: Ralf Baechle -
GPIO drivers should be in drivers/gpio
Signed-off-by: Alban Bedel
Acked-by: Linus Walleij
Cc: linux-gpio@vger.kernel.org
Cc: Alexandre Courbot
Cc: Gabor Juhos
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/10597/
Signed-off-by: Ralf Baechle