aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-ts5500.c
Commit message (Collapse)AuthorAgeFilesLines
* treewide: rename GPIO set callbacks back to their original namesBartosz Golaszewski2025-08-071-1/+1
| | | | | | | | | | | The conversion of all GPIO drivers to using the .set_rv() and .set_multiple_rv() callbacks from struct gpio_chip (which - unlike their predecessors - return an integer and allow the controller drivers to indicate failures to users) is now complete and the legacy ones have been removed. Rename the new callbacks back to their original names in one sweeping change. Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: ts5500: use new GPIO line value setter callbacksDaniel Sullivan2025-06-231-2/+4
| | | | | | | | | | struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Daniel Sullivan <[email protected]> Link: https://lore.kernel.org/r/aFdKce3Go9iF4A6m@danv-Standard-PC-Q35-ICH9-2009 Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: Switch back to struct platform_driver::remove()Uwe Kleine-König2024-10-171-1/+1
| | | | | | | | | | | | | | | After commit 0edb555a65d1 ("platform: Make platform_driver::remove() return void") .remove() is (again) the right callback to implement for platform drivers. Convert all platform drivers below drivers/gpio/ to use .remove(), with the eventual goal to drop struct platform_driver::remove_new(). As .remove() and .remove_new() have the same prototypes, conversion is done by just changing the structure member name in the driver initializer. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: ts5500: Convert to platform remove callback returning voidUwe Kleine-König2023-10-021-4/+2
| | | | | | | | | | | | | | | | | | | The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: ts5500: Fix Links to Technologic Systems web resourcesKris Bahnsen2022-03-311-2/+2
| | | | | | | | | Technologic Systems has rebranded as embeddedTS with the current domain eventually going offline. Update web/doc URLs to correct resource locations. Signed-off-by: Kris Bahnsen <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: ts5500: Use platform_get_irq() to get the interruptLad Prabhakar2022-01-051-7/+4
| | | | | | | | | | | | | | platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static allocation of IRQ resources in DT core code, this causes an issue when using hierarchical interrupt domains using "interrupts" property in the node as this bypassed the hierarchical setup and messed up the irq chaining. In preparation for removal of static setup of IRQ resource from DT core code use platform_get_irq(). Signed-off-by: Lad Prabhakar <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: ts5500: Delete platform data handlingLinus Walleij2018-09-041-6/+0
| | | | | | | | | | | The TS5500 GPIO driver apparently supports platform data without making any use of it whatsoever. Delete this code, last chance to speak up if you think it is needed. Cc: [email protected] Cc: Vivien Didelot <[email protected]> Cc: Jerome Oufella <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
* gpio: ts5500: Use SPDX headerLinus Walleij2018-09-041-4/+1
| | | | | | | | | Cut some boilerplate, use the SPDX license identifier. Cc: [email protected] Cc: Vivien Didelot <[email protected]> Cc: Jerome Oufella <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
* gpio: ts5500: Include the right headerLinus Walleij2018-09-041-1/+1
| | | | | | | | | This is a GPIO driver so include only <linux/gpio/driver.h>. Cc: [email protected] Cc: Vivien Didelot <[email protected]> Cc: Jerome Oufella <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
* gpio: ts5500: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-6/+3
| | | | | | | Use devm_gpiochip_add_data() for GPIO registration and clean the error path. Signed-off-by: Laxman Dewangan <[email protected]>
* gpio: ts5500: use gpiochip data pointerLinus Walleij2016-01-051-11/+6
| | | | | | | | | 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: Vivien Didelot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
* gpio: change member .dev to .parentLinus Walleij2015-11-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]>
* gpio: Constify platform_device_idKrzysztof Kozlowski2015-05-121-1/+1
| | | | | | | | The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
* gpio: drop owner assignment from platform_driversWolfram Sang2014-10-201-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]>
* gpio: remove all usage of gpio_remove retval in driver/gpioabdoulaye berthe2014-07-221-3/+3
| | | | | Signed-off-by: abdoulaye berthe <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
* gpio: use dev_get_platdata()Jingoo Han2013-08-161-1/+1
| | | | | | | | Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
* Drivers: misc: remove __dev* attributes.Greg Kroah-Hartman2013-01-031-3/+3
| | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
* gpio: add TS-5500 DIO blocks supportVivien Didelot2012-12-101-0/+466
Technologic Systems TS-5500 provides digital I/O lines exposed through pin blocks. On this platform, there are three of them, named DIO1, DIO2 and LCD port, that may be used as a DIO block. The TS-5500 pin blocks are described in the product's wiki: http://wiki.embeddedarm.com/wiki/TS-5500#Digital_I.2FO This driver is not limited to the TS-5500 blocks. It can be extended to support similar boards pin blocks, such as on the TS-5600. This patch is the V2 of the previous https://lkml.org/lkml/2012/9/25/671 with corrections suggested by Linus Walleij. Signed-off-by: Vivien Didelot <[email protected]> Signed-off-by: Jerome Oufella <[email protected]> Signed-off-by: Linus Walleij <[email protected]>