aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 01:50:46 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 01:50:46 -0500
commitc2d33069915d1f9b3b1dcc2199af11d4e072b037 (patch)
tree2664fd3c41c2f3223cfbb64793c2ddb8e9087ded /drivers/pinctrl
parent8a5dc585d50015af9c079ae2d182dc4c1cd22914 (diff)
parent993571273275bfecb5161806796eb368db234106 (diff)
Merge tag 'gpio-v3.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO changes from Linus Walleij: "Here is the bulk of GPIO changes for the v3.13 development cycle. I've got ACKs for the things that affect other subsystems (or it's my own subsystem, like pinctrl). Most of that pertain to an attempt from my side to consolidate and get rid of custom GPIO implementations in the ARM tree. I will continue doing this. The main change this time is the new GPIO descriptor API, background for this can be found in Corbet's summary from this january in LWN: http://lwn.net/Articles/533632/ Summary: - Merged the GPIO descriptor API from Alexandre Courbot. This is a first step toward trying to get rid of the global GPIO numberspace for the future. - Add an API so that driver can flag that a certain GPIO line is being used by a irqchip backend for generating IRQs, so that we can enforce checks, like not allowing users to switch that line to an output at runtime, since this makes no sense. Implemented corresponding calls in a few select drivers. - ACPI GPIO cleanups, refactorings and switch to using the descriptor-based interface. - Support for the TPS80036 Palmas GPIO variant. - A new driver for the Broadcom Kona GPIO SoC IP block. - Device tree support for the PCF857x driver. - A set of ARM GPIO refactorings with the goal of getting rid of a bunch of custom GPIO implementations from the arch/arm/* tree: * Move the IOP GPIO driver to the GPIO subsystem and fix all users to use the gpiolib API for accessing GPIOs. Delete the old custom GPIO implementation. * Delete the unused custom PXA GPIO implemention. * Convert all users of the IXP4 custom GPIO implementation to use gpiolib and delete the custom implementation. * Delete the custom Gemini GPIO implementation, also completely unused. - Various cleanups and renamings" * tag 'gpio-v3.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (85 commits) gpio: gpio-mxs: Remove unneeded dt checks gpio: pl061: don't depend on CONFIG_ARM gpio: bcm-kona: add missing .owner to struct gpio_chip gpiolib: provide a declaration of seq_file in gpio/driver.h gpiolib: include gpio/consumer.h in of_gpio.h for desc_to_gpio() gpio: provide stubs for devres gpio functions gpiolib: devres: add missing headers gpiolib: make GPIO_DEVRES depend on GPIOLIB gpiolib: devres: fix devm_gpiod_get_index() gpiolib / ACPI: document the GPIO descriptor based interface gpiolib / ACPI: allow passing GPIOF_ACTIVE_LOW for GpioInt resources gpiolib / ACPI: add ACPI support for gpiod_get_index() gpiolib / ACPI: convert to gpiod interfaces gpiolib: add gpiod_get() and gpiod_put() functions gpiolib: port of_ functions to use gpiod gpiolib: export descriptor-based GPIO interface Fixup "MAINTAINERS: GPIO-INTEL-MID: add maintainer" gpio: bcm281xx: Don't print addresses of GPIO area in probe() gpio: tegra: use new gpio_lock_as_irq() API gpio: rcar: Include linux/of.h header ...
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-coh901.c5
-rw-r--r--drivers/pinctrl/pinctrl-nomadik.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c
index f22a2193d949..162ac0d73739 100644
--- a/drivers/pinctrl/pinctrl-coh901.c
+++ b/drivers/pinctrl/pinctrl-coh901.c
@@ -529,6 +529,10 @@ static void u300_gpio_irq_enable(struct irq_data *d)
529 529
530 dev_dbg(gpio->dev, "enable IRQ for hwirq %lu on port %s, offset %d\n", 530 dev_dbg(gpio->dev, "enable IRQ for hwirq %lu on port %s, offset %d\n",
531 d->hwirq, port->name, offset); 531 d->hwirq, port->name, offset);
532 if (gpio_lock_as_irq(&gpio->chip, d->hwirq))
533 dev_err(gpio->dev,
534 "unable to lock HW IRQ %lu for IRQ\n",
535 d->hwirq);
532 local_irq_save(flags); 536 local_irq_save(flags);
533 val = readl(U300_PIN_REG(offset, ien)); 537 val = readl(U300_PIN_REG(offset, ien));
534 writel(val | U300_PIN_BIT(offset), U300_PIN_REG(offset, ien)); 538 writel(val | U300_PIN_BIT(offset), U300_PIN_REG(offset, ien));
@@ -547,6 +551,7 @@ static void u300_gpio_irq_disable(struct irq_data *d)
547 val = readl(U300_PIN_REG(offset, ien)); 551 val = readl(U300_PIN_REG(offset, ien));
548 writel(val & ~U300_PIN_BIT(offset), U300_PIN_REG(offset, ien)); 552 writel(val & ~U300_PIN_BIT(offset), U300_PIN_REG(offset, ien));
549 local_irq_restore(flags); 553 local_irq_restore(flags);
554 gpio_unlock_as_irq(&gpio->chip, d->hwirq);
550} 555}
551 556
552static struct irq_chip u300_gpio_irqchip = { 557static struct irq_chip u300_gpio_irqchip = {
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
index d7c3ae300fa7..7111c3b59130 100644
--- a/drivers/pinctrl/pinctrl-nomadik.c
+++ b/drivers/pinctrl/pinctrl-nomadik.c
@@ -634,6 +634,10 @@ static unsigned int nmk_gpio_irq_startup(struct irq_data *d)
634{ 634{
635 struct nmk_gpio_chip *nmk_chip = irq_data_get_irq_chip_data(d); 635 struct nmk_gpio_chip *nmk_chip = irq_data_get_irq_chip_data(d);
636 636
637 if (gpio_lock_as_irq(&nmk_chip->chip, d->hwirq))
638 dev_err(nmk_chip->chip.dev,
639 "unable to lock HW IRQ %lu for IRQ\n",
640 d->hwirq);
637 clk_enable(nmk_chip->clk); 641 clk_enable(nmk_chip->clk);
638 nmk_gpio_irq_unmask(d); 642 nmk_gpio_irq_unmask(d);
639 return 0; 643 return 0;
@@ -645,6 +649,7 @@ static void nmk_gpio_irq_shutdown(struct irq_data *d)
645 649
646 nmk_gpio_irq_mask(d); 650 nmk_gpio_irq_mask(d);
647 clk_disable(nmk_chip->clk); 651 clk_disable(nmk_chip->clk);
652 gpio_unlock_as_irq(&nmk_chip->chip, d->hwirq);
648} 653}
649 654
650static struct irq_chip nmk_gpio_irq_chip = { 655static struct irq_chip nmk_gpio_irq_chip = {