summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-ge.c
AgeCommit message (Collapse)AuthorFilesLines
2023-07-27gpio: ge: Replace GPLv2 boilerplate with SPDXAndy Shevchenko1-4/+1
Replace the GPLv2 boilerplate text with a nice and short SPDX header. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-07-27gpio: ge: Utilise temporary variable for struct deviceAndy Shevchenko1-5/+5
We have a temporary variable to keep pointer to struct device. Utilise it inside the ->probe() implementation. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-07-27gpio: ge: Make driver OF-independentAndy Shevchenko1-20/+13
There is nothing in the driver that requires OF APIs, make the driver OF independent. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-07-27gpio: ge: Fix English spelling and grammarAndy Shevchenko1-5/+6
Fix English spelling and grammar in the comments. While at it, fix the MODULE_AUTHOR() email address format. Reported-by: Randy Dunlap <rdunlap@infradead.org> Closes: https://lore.kernel.org/r/65b4ac1a-1128-6e2a-92c0-9bbcca4b760a@infradead.org Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-07-27gpio: ge: Add missing headerAndy Shevchenko1-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 <rdunlap@infradead.org> Fixes: e91d0f05e66a ("gpio: Explicitly include correct DT includes") Closes: https://lore.kernel.org/r/65b4ac1a-1128-6e2a-92c0-9bbcca4b760a@infradead.org Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-07-19gpio: Explicitly include correct DT includesRob Herring1-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 <robh@kernel.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Romain Perier <romain.perier@gmail.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-01-30gpio: ge: Remove duplicate assignment of of_gpio_n_cellsAndy Shevchenko1-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 <andriy.shevchenko@linux.intel.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2021-12-17gpio: Get rid of duplicate of_node assignment in the driversAndy Shevchenko1-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 <andriy.shevchenko@linux.intel.com> Reviewed-By: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2018-05-16gpio: ge: Fix build warningThierry Reding1-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 <lkp@intel.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-05-16gpio: ge: Use of_device_get_match_data()Thierry Reding1-3/+1
Use of_device_get_match_data() instead of open-coding it. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-03-19gpio: ge: Drop of_gpio.h includeLinus Walleij1-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 <linus.walleij@linaro.org>
2017-08-14gpio: Convert to using %pOF instead of full_nameRob Herring1-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 <robh@kernel.org> Cc: Tien Hock Loh <thloh@altera.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Brian Norris <computersforpeace@gmail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: bcm-kernel-feedback-list@broadcom.com Cc: Michal Simek <michal.simek@xilinx.com> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com> Cc: linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Acked-by: Gregory Fong <gregory.0xf0@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-02-23gpio: ge: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan1-1/+1
Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
2016-01-05gpio: generic: factor into gpio_chip structLinus Walleij1-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: arm@kernel.org Cc: Alexander Shiyan <shc_work@mail.ru> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Sascha Hauer <kernel@pengutronix.de> Cc: Kukjin Kim <kgene@kernel.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Brian Norris <computersforpeace@gmail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Sudeep Holla <sudeep.holla@arm.com> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Nicolas Pitre <nicolas.pitre@linaro.org> Cc: Olof Johansson <olof@lixom.net> Cc: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Cc: Rabin Vincent <rabin@rab.in> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-omap@vger.kernel.org Cc: linux-samsung-soc@vger.kernel.org Cc: bcm-kernel-feedback-list@broadcom.com Acked-by: Gregory Fong <gregory.0xf0@gmail.com> Acked-by: Liviu Dudau <Liviu.Dudau@arm.com> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-01-29gpio: ge: Convert to use devm_kstrdupAxel Lin1-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 <axel.lin@ingics.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-01-19gpio: ge: fix compilation errorKamlakant Patel1-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 <kamlakant.patel@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-01-16gpio: ge: convert to use basic mmio gpio libraryKamlakant Patel1-57/+39
This patch converts GE GPIO driver to use basic_mmio_gpio generic library. Signed-off-by: Kamlakant Patel <kamlakant.patel@linaro.org> Acked-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
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 <wsa@the-dreams.de>
2014-04-28gpio: ge: Convert to platform driverAlexander Shiyan1-121/+53
This patch converts GE I/O FPGA GPIO driver to platform driver. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-03-16powerpc/85xx: Board support for GE IMP3AMartyn Welch1-0/+28
Initial board support for the GE IMP3A, a 3U compactPCI card with a p2020 processor. Signed-off-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2012-03-16gpio: Move GE GPIO driver to reside within GPIO subsystemMartyn Welch1-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 <martyn.welch@ge.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>