11 May, 2016
6 commits
-
The Kconfig currently controlling compilation of this code is:
drivers/gpio/Kconfig:config GPIO_ZEVIO
drivers/gpio/Kconfig: bool "LSI ZEVIO SoC memory mapped GPIOs"...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.Since module_platform_driver() uses the same init level priority as
builtin_platform_driver() the init ordering remains unchanged with
this commit.Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.Cc: Linus Walleij
Cc: Alexandre Courbot
Cc: Fabian Vogt
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker
Signed-off-by: Linus Walleij -
The Kconfig currently controlling compilation of this code is:
drivers/gpio/Kconfig:config GPIO_TIMBERDALE
drivers/gpio/Kconfig: bool "Support for timberdale GPIO IP"...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.Since module_platform_driver() uses the same init level priority as
builtin_platform_driver() the init ordering remains unchanged with
this commit.We also delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.Cc: Linus Walleij
Cc: Alexandre Courbot
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker
Signed-off-by: Linus Walleij -
The Kconfig currently controlling compilation of this code is:
drivers/gpio/Kconfig:config GPIO_STMPE
drivers/gpio/Kconfig: bool "STMPE GPIOs"...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.Curiously, this driver was using subsys_initcall since day one, so
we don't have the "normal" module_init replacement in this change
like we've done in other similar driver updates.We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.Cc: Linus Walleij
Cc: Alexandre Courbot
Cc: Rabin Vincent
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker
Signed-off-by: Linus Walleij -
The Kconfig currently controlling compilation of this code is:
drivers/gpio/Kconfig:config GPIO_SODAVILLE
drivers/gpio/Kconfig: bool "Intel Sodaville GPIO support"...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.Since module_pci_driver() uses the same init level as the
builtin_pci_driver() does, there is no init ordering change
caused by this commit.We don't replace module.h with init.h since the file already has that.
We also delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.Cc: Hans J. Koch
Cc: Linus Walleij
Cc: Alexandre Courbot
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker
Signed-off-by: Linus Walleij -
Currrently the gpio_chip.to_irq() callback returns -ENOSYS on error,
which causes bad interactions with the serial_mctrl_gpio helpers.mctrl_gpio_init() returns -ENOSYS if GPIOLIB is not enabled, which is
intended to be ignored by its callers. However, ignoring -ENOSYS when it
was caused by a gpiod_to_irq() failure will lead to a crash later:Unable to handle kernel paging request at virtual address ffffffde
...
PC is at mctrl_gpio_set+0x14/0x78Fix this by returning zero instead, like gpiochip_to_irq() does.
Signed-off-by: Geert Uytterhoeven
Signed-off-by: Linus Walleij -
This patch enables DWAPB GPIO controller support on X-Gene
platforms in ACPI boot mode.Signed-off-by: Duc Dang
Signed-off-by: Linus Walleij
10 May, 2016
2 commits
-
This patch adds the device tree bindings for the Western Digital's
MyBook Live memory-mapped GPIO controllers.The gpios will be supported by gpio-mmio code of the
GPIO generic library.Signed-off-by: Christian Lamparter
Acked-by: Rob Herring
Reviewed-by: Andy Shevchenko
Signed-off-by: Linus Walleij -
Make it possible to name the producer side of a GPIO line using
a "gpio-line-names" property array, modeled on the
"clock-output-names" property from the clock bindings.This naming is especially useful for:
- Debugging: lines are named after function, not just opaque
offset numbers.- Exploration: systems where some or all GPIO lines are available
to end users, such as prototyping, one-off's "makerspace usecases"
users are helped by the names of the GPIO lines when tinkering.
This usecase has been surfacing recently.The gpio-line-names attribute is completely optional.
Example output from lsgpio on a patched Snowball tree:
GPIO chip: gpiochip6, "8000e180.gpio", 32 GPIO lines
line 0: unnamed unused
line 1: "AP_GPIO161" "extkb3" [kernel]
line 2: "AP_GPIO162" "extkb4" [kernel]
line 3: "ACCELEROMETER_INT1_RDY" unused [kernel]
line 4: "ACCELEROMETER_INT2" unused
line 5: "MAG_DRDY" unused [kernel]
line 6: "GYRO_DRDY" unused [kernel]
line 7: "RSTn_MLC" unused
line 8: "RSTn_SLC" unused
line 9: "GYRO_INT" unused
line 10: "UART_WAKE" unused
line 11: "GBF_RESET" unused
line 12: unnamed unusedCc: Grant Likely
Cc: Amit Kucheria
Cc: David Mandala
Cc: Lee Campbell
Cc: devicetree@vger.kernel.org
Acked-by: Rob Herring
Reviewed-by: Michael Welling
Signed-off-by: Linus Walleij
02 May, 2016
1 commit
-
If a translation returns zero, that means NO_IRQ, so we
should return an error since the function is documented to
return a negative code on error.Reported-by: Geert Uytterhoeven
Acked-by: Geert Uytterhoeven
Signed-off-by: Linus Walleij
01 May, 2016
2 commits
-
This implements the .get_direction() callback for the xgene GPIO
controller.Cc: Duc Dang
Cc: Feng Kan
Signed-off-by: Linus Walleij -
This patch enables ACPI support for X-Gene GFC GPIO driver.
Signed-off-by: Duc Dang
Signed-off-by: Linus Walleij
30 Apr, 2016
2 commits
-
Implement gpio_get_direction() callback for Tegra GPIO.
The direction is only valid if the pin is configured as
GPIO. If pin is not configured in GPIO mode then this
function return error.Signed-off-by: Laxman Dewangan
Reviewed-by: Stephen Warren
Acked-by: Jon Hunter
Signed-off-by: Linus Walleij -
If the gpiochip supports the .get_direction() callback, then
the initial state of the descriptor flags should be set up
as output accordingly. Also put in comments explaining what is
going on.Signed-off-by: Linus Walleij
29 Apr, 2016
10 commits
-
This patch renames the gpio-generic.c into gpio-mmio.c.
This is because currently the file only contains code
for a memory-mapped GPIO driver. There isn't any support
for ioports or other resource type.Signed-off-by: Christian Lamparter
Signed-off-by: Linus Walleij -
GPIO_GENERIC_PLATFORM is a tristate. If the module option is
selected the resulting gpio-generic.ko will lack most of the
module initialzation and probe code.Signed-off-by: Christian Lamparter
Signed-off-by: Linus Walleij -
This patch adds gpio-signaled acpi event support. It is used for
power button on hisilicon D02 board, an arm64 platform.The corresponding DSDT file is defined as follows:
Device(GPI0) {
Name(_HID, "HISI0181")
Name(_ADR, 0)
Name(_UID, 0)Name (_CRS, ResourceTemplate () {
Memory32Fixed (ReadWrite, 0x802e0000, 0x10000)
Interrupt (ResourceConsumer, Level, ActiveHigh,
Exclusive,,,) {344}
})Device(PRTa) {
Name (_DSD, Package () {
Package () {
Package () {"reg",0},
Package () {"snps,nr-gpios",32},
}
})
}Name (_AEI, ResourceTemplate () {
GpioInt(Edge, ActiveLow, ExclusiveAndWake,
PullUp, , " \\_SB.GPI0") {8}
})Method (_E08, 0x0, NotSerialized) {
Notify (\_SB.PWRB, 0x80)
}
}Acked-by: Mika Westerberg
Reviewed-by: Andy Shevchenko
Signed-off-by: Jiang Qiu
Signed-off-by: Linus Walleij -
This patch converts device node to fwnode for dwapb driver, so
as to provide a unified fwnode for DT and ACPI bindings.Tested-by: Alan Tull
Acked-by: Andy Shevchenko
Signed-off-by: Jiang Qiu
Signed-off-by: Linus Walleij -
This patch removed the name property from dwapb_port_property.
The name property is redundant, since we can get this info
from dwapb_gpio dev node.Reviewed-by: Andy Shevchenko
Signed-off-by: Jiang Qiu
Signed-off-by: Linus Walleij -
The gpio-mpc8xxx driver requires IRQ domains but can be built
without them, resulting on a failure to build certain randconfigs
on ARM:drivers/gpio/gpio-mpc8xxx.c: In function 'mpc8xxx_gpio_to_irq':
drivers/gpio/gpio-mpc8xxx.c:92:10: error: implicit declaration of function 'irq_create_mapping' [-Werror=implicit-function-declaration]
return irq_create_mapping(mpc8xxx_gc->irq, offset);This selects IRQ_DOMAIN from the driver to ensure we can build it.
Signed-off-by: Arnd Bergmann
Fixes: 5df7fd46b70b ("gpio/qoriq: Add qoriq platforms support")
Signed-off-by: Linus Walleij -
NVIDIA's Tegra210 support the HW debounce in the GPIO controller
for all its GPIO pins.Add support for setting debounce timing by implementing the
set_debounce callback of gpiochip.Signed-off-by: Laxman Dewangan
Reviewed-by: Stephen Warren
Reviewed-by: Alexandre Courbot
Signed-off-by: Linus Walleij -
Move the file scoped multiple global variable from Tegra GPIO
driver to the structure and make this as gpiochip data which
can be referred from GPIO chip callbacks.Signed-off-by: Laxman Dewangan
Reviewed-by: Stephen Warren
Reviewed-by: Alexandre Courbot
Signed-off-by: Linus Walleij -
The data member of the of_device_id is the constant type
and hence all static structure which is used for this
initialisation as static.Signed-off-by: Laxman Dewangan
Suggested-by: Thierry Reding
Reviewed-by: Stephen Warren
Signed-off-by: Linus Walleij -
Use of_device_get_match_data() for getting matched data
instead of implementing this locally.Signed-off-by: Laxman Dewangan
Reviewed-by: Stephen Warren
Reviewed-by: Alexandre Courbot
Acked-by: Thierry Reding
Signed-off-by: Linus Walleij
28 Apr, 2016
2 commits
-
Implement this callback so that the driver reports correctly
the direction setting of each line.Signed-off-by: Linus Walleij
-
The gpiochip calls are already checking that the GPIO line
offsets are in range.Signed-off-by: Linus Walleij
27 Apr, 2016
1 commit
-
Make the text clearer, remove reference to confusing "positive"
and "negative" and elaborate a bit.Signed-off-by: Linus Walleij
26 Apr, 2016
14 commits
-
Now GPIO IRQ loss is observed on dra7-evm after suspend/resume cycle
in the following case:
extcon_usb1(id_irq) -> pcf8575.gpio1 -> omapgpio6.gpio11 -> gicthe extcon_usb1 is wake up source and it enables IRQ wake up for
id_irq by calling enable/disable_irq_wake() during suspend/resume
which, in turn, causes execution of omap_gpio_wake_enable(). And
omap_gpio_wake_enable() will set/clear corresponding bit in
GPIO_IRQWAKEN_x register.omapgpio6 configuration after boot - wakeup is enabled for GPIO IRQs
by default from omap_gpio_irq_type:
GPIO_IRQSTATUS_SET_0 | 0x00000400
GPIO_IRQSTATUS_CLR_0 | 0x00000400
GPIO_IRQWAKEN_0 | 0x00000400
GPIO_RISINGDETECT | 0x00000000
GPIO_FALLINGDETECT | 0x00000400omapgpio6 configuration after after suspend/resume cycle:
GPIO_IRQSTATUS_SET_0 | 0x00000400
GPIO_IRQSTATUS_CLR_0 | 0x00000400
GPIO_IRQWAKEN_0 | 0x00000000
Signed-off-by: Grygorii Strashko
Acked-by: Tony Lindgren
Acked-by: Santosh Shilimkar
Signed-off-by: Linus Walleij -
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: Liam Girdwood
Cc: alsa-devel@alsa-project.org
Acked-by: Mark Brown
Signed-off-by: Linus Walleij -
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: Liam Girdwood
Cc: alsa-devel@alsa-project.org
Acked-by: Charles Keepax
Acked-by: Mark Brown
Signed-off-by: Linus Walleij -
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: Liam Girdwood
Cc: alsa-devel@alsa-project.org
Acked-by: Charles Keepax
Acked-by: Mark Brown
Signed-off-by: Linus Walleij -
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: Liam Girdwood
Cc: alsa-devel@alsa-project.org
Acked-by: Charles Keepax
Acked-by: Mark Brown
Signed-off-by: Linus Walleij -
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: Liam Girdwood
Cc: alsa-devel@alsa-project.org
Acked-by: Charles Keepax
Acked-by: Mark Brown
Signed-off-by: Linus Walleij -
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: Bard Liao
Cc: Oder Chiou
Cc: Liam Girdwood
Cc: alsa-devel@alsa-project.org
Acked-by: Mark Brown
Signed-off-by: Linus Walleij -
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: Jiri Slaby
Acked-by: Greg Kroah-Hartman
Signed-off-by: Linus Walleij -
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: Jiri Slaby
Acked-by: Greg Kroah-Hartman
Signed-off-by: Linus Walleij -
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: Manohar Vanga
Cc: devel@driverdev.osuosl.org
Acked-by: Martyn Welch
Acked-by: Greg Kroah-Hartman
Signed-off-by: Linus Walleij -
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: Hauke Mehrtens
Cc: Michael Buesch
Signed-off-by: Linus Walleij -
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: Feng Tang
Signed-off-by: Linus Walleij -
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: Michael Hennerich
Acked-by: Michael Hennerich
Acked-by: Dmitry Torokhov
Signed-off-by: Linus Walleij -
Instead of indirectly selecting GPIOLIB via the
ARCH_REQUIRE_GPIOLIB symbol, just select GPIOLIB.Cc: Michael Büsch
Cc: linux-snps-arc@lists.infradead.org
Acked-by: Vineet Gupta
Signed-off-by: Linus Walleij