aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-lynxpoint.c
AgeCommit message (Collapse)AuthorFilesLines
2016-06-23gpio: lynxpoint: avoid potential warning on error pathAndy Shevchenko1-1/+0
When devres API is in use we are not supposed to call plain gpiochip_remove(). Remove redundant call to gpiochip_remove(). Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2016-02-23gpio: lynxpoint: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan1-3/+1
Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <[email protected]>
2016-01-05gpio: lynxpoint: use gpiochip data pointerLinus Walleij1-11/+11
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: Mathias Nyman <[email protected]> Acked-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2015-11-19gpio: change member .dev to .parentLinus Walleij1-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 <[email protected]> Cc: Rafał Miłecki <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Alek Du <[email protected]> Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Lee Jones <[email protected]> Acked-by: Jiri Kosina <[email protected]> Acked-by: Hans-Christian Egtvedt <[email protected]> Acked-by: Jacek Anaszewski <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2015-09-16genirq: Remove irq argument from irq flow handlersThomas Gleixner1-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 <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Jiang Liu <[email protected]>
2015-05-19Drivers: gpio: Fix spelling errorsColin Cronin1-1/+1
Fixed several spelling errors in gpio-lynxpoint, gpio-pca953x, gpio-tegra, gpio-zynq, gpiolib-of, gpiolib. Signed-off-by: Colin Cronin <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-10-20gpio: drop owner assignment from platform_driversWolfram Sang1-1/+0
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <[email protected]>
2014-08-21gpio-lynxpoint: enable input sensing in resumeMathias Nyman1-0/+18
It appears that input sensing bit might be reset during suspend/resume. Set input sensing again for all requested gpios in resume Tested-by: Jerome Blin <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Acked-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-07-28gpio: lynxpoint: Convert to use gpiolib irqchipMika Westerberg1-68/+25
Instead of open-coding irqchip handling in the driver we can take advantage of the new irqchip helpers provided by the gpiolib core. While doing this we also make sure that we call gpiochip_irqchip_add() after the gpiochip itself is registered as required. Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-07-22gpio: remove all usage of gpio_remove retval in driver/gpioabdoulaye berthe1-4/+1
Signed-off-by: abdoulaye berthe <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-05-09gpio: lynxpoint: remove unnecessary OOM messagesJingoo Han1-3/+1
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: Jingoo Han <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-28gpio-lynxpoint: force gpio_get() to return "1" and "0" onlyMathias Nyman1-1/+1
Don't return the IN_LVL_BIT directly, a high gpio line returned value "1073741824" intestead of "1" because IN_LVL_BIT is BIT(30) Tested-by: Jerome Blin <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-18gpio: switch drivers to use new callbackLinus Walleij1-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 <[email protected]> Cc: Jean-Jacques Hiblot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-12-04Merge branch 'mark-irqs' into develLinus Walleij1-0/+22
Conflicts: drivers/gpio/gpio-em.c
2013-12-04gpio: lynxpoint: lock IRQs when starting themLinus Walleij1-0/+22
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. Cc: Mathias Nyman <[email protected]> Tested-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-12-04gpio/pinctrl: make gpio_chip members typed booleanLinus Walleij1-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 <[email protected]>
2013-12-03gpio-lynxpoint: Allow building as a moduleJean Delvare1-0/+11
Change CONFIG_GPIO_LYNXPOINT from bool to tristate so that the gpio-lynxpoint driver can be built as a module. Add the required glue: an exit function to unregister the driver, and module information. Signed-off-by: Jean Delvare <[email protected]> Cc: Mathias Nyman <[email protected]> Cc: Linus Walleij <[email protected]> Acked-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-12-03gpio: drop users of irq_set_chip_and_handler_name()Linus Walleij1-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 <[email protected]> Cc: Dan Carpenter <[email protected]> Acked-by: David Cohen <[email protected]> Acked-by: Mika Westerberg <[email protected]> Tested-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-11-25gpio/lynxpoint: add new ACPI IDMika Westerberg1-0/+1
Newer Intel PCHs have the same GPIO controller than Haswell but the ACPI ID is different. Add this ID to the driver supported IDs list. Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-10-19Merge tag 'v3.12-rc6' into develLinus Walleij1-2/+3
Linux 3.12-rc6 Conflicts: drivers/gpio/gpio-lynxpoint.c
2013-10-16gpio: lynxpoint: drop references to "virtual" IRQLinus Walleij1-9/+10
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. Take this opportunity to sink a variable into a loop. Acked-by: Mathias Nyman <[email protected]> Acked-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-10-11gpio/lynxpoint: check if the interrupt is enabled in IRQ handlerMika Westerberg1-2/+3
Checking LP_INT_STAT is not enough in the interrupt handler because its contents get updated regardless of whether the pin has interrupt enabled or not. This causes the driver to loop forever for GPIOs that are pulled up. Fix this by checking the interrupt enable bit for the pin as well. Cc: [email protected] Signed-off-by: Mika Westerberg <[email protected]> Acked-by: Mathias Nyman <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-16gpio-lynxpoint: Fix warning about unbalanced pm_runtime_enableMathias Nyman1-0/+1
Missing pm_runtime_disable call in driver remove path caused an unbalanaced pm_runtime_enable warning when driver was reloaded Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-05-30gpio: lynxpoint: remove unnecessary platform_set_drvdata()Jingoo Han1-1/+0
The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <[email protected]> Acked-by: Mathias Nyman <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-03-27gpio-lynxpoint: Add X86 dependency and io-port handling header.Mathias Nyman1-0/+1
Lynxpoint gpio driver uses X86 specific io-ports to control gpios Signed-off-by: Mathias Nyman <[email protected]> Reviewed-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-02-05gpio/lynxpoint: add chipset gpio driver.Mathias Nyman1-0/+469
Add gpio support for Intel Lynxpoint chipset. Lynxpoint supports 94 gpio pins which can generate interrupts. Driver will fail requests for pins that are marked as owned by ACPI, or set in an alternate mode (non-gpio). Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Grant Likely <[email protected]>