summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-intel-mid.c
Commit message (Collapse)AuthorAgeFilesLines
* gpio: intel-mid: use gpiochip data pointerLinus Walleij2016-01-051-12/+7
| | | | | | | | | 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: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* gpio: intel-mid: Be sure to clamp return valueLinus Walleij2015-12-261-1/+1
| | | | | | | | | | As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Acked-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* gpio: change member .dev to .parentLinus Walleij2015-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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->parent and: @@ struct gpio_chip var; @@ -var.dev +var.parent and: @@ struct bgpio_chip *var; @@ -var->gc.dev +var->gc.parent Plus 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 <hskinnemoen@gmail.com> Cc: Rafał Miłecki <zajec5@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: Alek Du <alek.du@intel.com> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Jiri Kosina <jkosina@suse.cz> Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* genirq: Remove irq argument from irq flow handlersThomas Gleixner2015-09-161-1/+1
| | | | | | | | | | | | | | Most interrupt flow handlers do not use the irq argument. Those few which use it can retrieve the irq number from the irq descriptor. Remove the argument. Search and replace was done with coccinelle and some extra helper scripts around it. Thanks to Julia for her help! Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Julia Lawall <Julia.Lawall@lip6.fr> Cc: Jiang Liu <jiang.liu@linux.intel.com>
* gpio: intel-mid: switch to using gpiolib irqchip helpersLinus Walleij2014-06-191-61/+25
| | | | | | | | | This switches the Intel MID GPIO driver over to using the gpiolib irqchip helpers in the gpiolib core. Cc: xinhui.pan <xinhuiX.pan@intel.com> Acked-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* gpio: switch drivers to use new callbackLinus Walleij2014-03-181-7/+7
| | | | | | | | | | | | 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 <tglx@linutronix.de> Cc: Jean-Jacques Hiblot <jjhiblot@traphandler.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* Merge tag 'v3.14-rc6' into develLinus Walleij2014-03-141-2/+2
|\ | | | | | | Linux 3.14-rc6
| * gpio: intel-mid: fix the incorrect return of idle callbackxinhui.pan2014-02-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | intel_gpio_runtime_idle should return correct error code if it do fail. make it more correct even though -EBUSY is the most possible return value. Signed-off-by: bo.he <bo.he@intel.com> Signed-off-by: xinhui.pan <xinhuiX.pan@intel.com> Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* | gpio: intel-mid: comments cleanupDavid Cohen2014-02-031-6/+2
|/ | | | | | | This is a simple cleanup on gpio-intel-mid.c's header comments. Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* Merge branch 'mark-irqs' into develLinus Walleij2013-12-041-0/+23
|\ | | | | | | | | Conflicts: drivers/gpio/gpio-em.c
| * gpio: intel-mid: lock IRQs when starting themLinus Walleij2013-12-041-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ChangeLog v1->v2: - Explicitly call the - empty - mask/unmask functions from the startup/shutdown hooks. These are currently empty, but maybe they will not be that forever, so better be safe than sorry. Acked-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* | gpio/pinctrl: make gpio_chip members typed booleanLinus Walleij2013-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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 <linus.walleij@linaro.org>
* | gpio: remove DEFINE_PCI_DEVICE_TABLE macroJingoo Han2013-12-031-1/+1
| | | | | | | | | | | | | | | | Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* | gpio: drop users of irq_set_chip_and_handler_name()Linus Walleij2013-12-031-2/+1
|/ | | | | | | | | | | | | | | Switch all users of irq_set_chip_and_handler_name() to simply use irq_set_chip_and_handler(), all just provide a boilerplate name like "demux" or "mux" - a fact which is anyway obvious from the hwirq number from the irqdomain now present in e.g. /proc/interrupts. Cc: Mathias Nyman <mathias.nyman@linux.intel.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: David Cohen <david.a.cohen@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* gpio: intel-mid: drop references to "virtual" IRQLinus Walleij2013-10-161-5/+5
| | | | | | | | | Rename the argument "virq" to just "irq", this IRQ isn't any more "virtual" than any other Linux IRQ number, we use "hwirq" for the actual hw-numbers, "virq" is just bogus. Acked-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* gpio-intel-mid: update prefixes and names from langwell to intel-midDavid Cohen2013-10-111-120/+123
| | | | | | | | | | | After file was renamed from gpio-langwell to gpio-intel-mid, this patch updates the variables, functions and structs to be based on intel-mid instead of langwell. There is no function change. Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* gpio: rename gpio-langwell to gpio-intel-midDavid Cohen2013-10-111-0/+468
gpio-langwell is a deprecated name. Despite the driver was made initially for Langwell, it supports now other Intel Mid SoC's. This patch does no change beside the file renaming with Kconfig/Makefile update. Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
OpenPOWER on IntegriCloud