aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-ge.c
Commit message (Collapse)AuthorAgeFilesLines
* gpio: ge: Replace GPLv2 boilerplate with SPDXAndy Shevchenko2023-07-271-4/+1
| | | | | | | | | | Replace the GPLv2 boilerplate text with a nice and short SPDX header. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> # build-tested Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: ge: Utilise temporary variable for struct deviceAndy Shevchenko2023-07-271-5/+5
| | | | | | | | | | We have a temporary variable to keep pointer to struct device. Utilise it inside the ->probe() implementation. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> # build-tested Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: ge: Make driver OF-independentAndy Shevchenko2023-07-271-20/+13
| | | | | | | | | | There is nothing in the driver that requires OF APIs, make the driver OF independent. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> # build-tested Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: ge: Fix English spelling and grammarAndy Shevchenko2023-07-271-5/+6
| | | | | | | | | | | | Fix English spelling and grammar in the comments. While at it, fix the MODULE_AUTHOR() email address format. Reported-by: Randy Dunlap <[email protected]> Closes: https://lore.kernel.org/r/[email protected] Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> # build-tested Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: ge: Add missing headerAndy Shevchenko2023-07-271-5/+6
| | | | | | | | | | | | | | | Add missing platform_device.h that used to be implied by of_device.h. While at it, sort headers alphabetically for better maintenance. Reported-by: Randy Dunlap <[email protected]> Fixes: e91d0f05e66a ("gpio: Explicitly include correct DT includes") Closes: https://lore.kernel.org/r/[email protected] Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Rob Herring <[email protected]> Acked-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> # build-tested Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: Explicitly include correct DT includesRob Herring2023-07-191-1/+1
| | | | | | | | | | | | | | | | The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Romain Perier <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: ge: Remove duplicate assignment of of_gpio_n_cellsAndy Shevchenko2023-01-301-1/+0
| | | | | | | | The of_gpio_n_cells default is 2 when ->of_xlate() callback is not defined. No need to assign it explicitly in the driver. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: Get rid of duplicate of_node assignment in the driversAndy Shevchenko2021-12-171-1/+0
| | | | | | | | | | | | | | GPIO library does copy the of_node from the parent device of the GPIO chip, there is no need to repeat this in the individual drivers. Remove these assignment all at once. For the details one may look into the of_gpio_dev_init() implementation. While at it, remove duplicate parent device assignment where it is the case. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-By: Matti Vaittinen <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
* gpio: ge: Fix build warningThierry Reding2018-05-161-1/+1
| | | | | | | | | | | | | | | Casting a pointer to u16 can produce a compiler warning such as this: drivers/gpio/gpio-ge.c: In function 'gef_gpio_probe': drivers/gpio/gpio-ge.c:83:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] gc->ngpio = (u16)of_device_get_match_data(&pdev->dev); ^ Cast the pointer through a uintptr_t to avoid the warning. Reported-by: kbuild test robot <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
* gpio: ge: Use of_device_get_match_data()Thierry Reding2018-05-161-3/+1
| | | | | | | Use of_device_get_match_data() instead of open-coding it. Signed-off-by: Thierry Reding <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
* gpio: ge: Drop of_gpio.h includeLinus Walleij2018-03-191-1/+0
| | | | | | | This driver does not make use of the functions in <linux/of_gpio.h> so drop this include. Signed-off-by: Linus Walleij <[email protected]>
* gpio: Convert to using %pOF instead of full_nameRob Herring2017-08-141-4/+2
| | | | | | | | | | | | | | | | | | | | Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring <[email protected]> Cc: Tien Hock Loh <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Alexandre Courbot <[email protected]> Cc: Brian Norris <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: [email protected] Cc: Michal Simek <[email protected]> Cc: "Sören Brinkmann" <[email protected]> Cc: [email protected] Cc: [email protected] Acked-by: Gregory Fong <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
* gpio: ge: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-1/+1
| | | | | | Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <[email protected]>
* gpio: generic: factor into gpio_chip structLinus Walleij2016-01-051-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The separate struct bgpio_chip has been a pain to handle, both by being confusingly similar in name to struct gpio_chip and for being contained inside a struct so that struct gpio_chip is contained in a struct contained in a struct, making several steps of dereferencing necessary. Make things simpler: include the fields directly into <linux/gpio/driver.h>, #ifdef:ed for CONFIG_GENERIC_GPIO, and get rid of the <linux/basic_mmio_gpio.h> altogether. Prefix some of the member variables with bgpio_* and add proper kerneldoc while we're at it. Modify all users to handle the change and use a struct gpio_chip directly. And while we're at it: replace all container_of() dereferencing by gpiochip_get_data() and registering the gpio_chip with gpiochip_add_data(). Cc: [email protected] Cc: Alexander Shiyan <[email protected]> Cc: Shawn Guo <[email protected]> Cc: Sascha Hauer <[email protected]> Cc: Kukjin Kim <[email protected]> Cc: Alexandre Courbot <[email protected]> Cc: Brian Norris <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Sudeep Holla <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Nicolas Pitre <[email protected]> Cc: Olof Johansson <[email protected]> Cc: Vladimir Zapolskiy <[email protected]> Cc: Rabin Vincent <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Acked-by: Gregory Fong <[email protected]> Acked-by: Liviu Dudau <[email protected]> Acked-by: H Hartley Sweeten <[email protected]> Acked-by: Tony Lindgren <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
* gpio: ge: Convert to use devm_kstrdupAxel Lin2015-01-291-5/+6
| | | | | | | | Use devm_kstrdup to simplify the error handling path. Also return -ENOMEM instead of 0 if devm_kstrdup fails. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
* gpio: ge: fix compilation errorKamlakant Patel2015-01-191-0/+1
| | | | | | | | | | | Include linux/slab.h to fix following compilation error. drivers/gpio/gpio-ge.c: In function ‘gef_gpio_probe’: drivers/gpio/gpio-ge.c:95:2: error: implicit declaration of function ‘kfree’ [-Werror=implicit-function-declaration] kfree(bgc->gc.label); Signed-off-by: Kamlakant Patel <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
* gpio: ge: convert to use basic mmio gpio libraryKamlakant Patel2015-01-161-57/+39
| | | | | | | | | This patch converts GE GPIO driver to use basic_mmio_gpio generic library. Signed-off-by: Kamlakant Patel <[email protected]> Acked-by: Martyn Welch <[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: ge: Convert to platform driverAlexander Shiyan2014-04-281-118/+50
| | | | | | | This patch converts GE I/O FPGA GPIO driver to platform driver. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
* powerpc/85xx: Board support for GE IMP3AMartyn Welch2012-03-161-0/+28
| | | | | | | | Initial board support for the GE IMP3A, a 3U compactPCI card with a p2020 processor. Signed-off-by: Martyn Welch <[email protected]> Signed-off-by: Kumar Gala <[email protected]>
* gpio: Move GE GPIO driver to reside within GPIO subsystemMartyn Welch2012-03-161-0/+171
The GE GPIO driver provides basic support (set direction, read/write state) for the GPIO provided on some GE single board computers. This patch moves the driver from the 86xx specific platform directrory to the GPIO subsystem so that it can be used on non-86xx boards. Signed-off-by: Martyn Welch <[email protected]> Signed-off-by: Kumar Gala <[email protected]>