summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-mm-lantiq.c
AgeCommit message (Collapse)AuthorFilesLines
2023-10-02gpio: mm-lantiq: Convert to platform remove callback returning voidUwe Kleine-König1-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 <u.kleine-koenig@pengutronix.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-03-23gpio: mm-lantiq: Fix typo in the newly added header filenameAndy Shevchenko1-1/+1
The header with legacy struct of_mmio_gpio_chip and accompanying APIs is called legacy-of-mm-gpiochip.h. Remove repetitive '.h' at the end. Fixes: a99cc66807d6 ("gpiolib: split of_mm_gpio_chip out of linux/of_gpio.h") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2023-03-06gpiolib: split of_mm_gpio_chip out of linux/of_gpio.hArnd Bergmann1-1/+1
This is a rarely used feature that has nothing to do with the client-side of_gpio.h. Split it out with a separate header file and Kconfig option so it can be removed on its own timeline aside from removing the of_gpio consumer interfaces. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2020-04-28gpio: mm-lantiq: Fix small typoDejin Zheng1-1/+1
Fix a spelling typo in gpio-mm-lantiq.c by codespell s/dont/don't/ Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com> Link: https://lore.kernel.org/r/20200424154103.10311-3-zhengdejin5@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-3/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-16gpio: mm-lantiq: Include the right headerLinus Walleij1-1/+1
This is a driver so include only <linux/gpio/driver.h>. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-12-30gpio: update my email addressJohn Crispin1-1/+1
This patch updates my email address as I no longer have access to the old one. Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-01-13gpio: mm-lantiq: Do not use gpiochip_get_data() in ltq_mm_save_regs()Guenter Roeck1-1/+2
Commit 6aa7dbfa2877 ("gpio: mm-lantiq: use gpiochip data pointer") replaces the use of container_of() with gpiochip_get_data(). However, the data pointer is not yet set by the time the save_regs function is called. Fixes: 6aa7dbfa2877 ("gpio: mm-lantiq: use gpiochip data pointer") Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Cc: John Crispin <blogic@openwrt.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-01-05gpio: mm-lantiq: use gpiochip data pointerLinus Walleij1-6/+3
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: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Cc: John Crispin <blogic@openwrt.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-01-20gpio: gpio-mm-lantiq: Use of_mm_gpiochip_removeRicardo Ribalda Delgado1-0/+18
Since d621e8bae5ac9c67 (Create of_mm_gpiochip_remove), there is a counterpart for of_mm_gpiochip_add. This patch implements the remove function of the driver making use of it. Cc: Alexandre Courbot <gnurou@gmail.com> Cc: John Crispin <blogic@openwrt.org> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-01-20gpio: gpio-mm-lantiq: Use of_property_read_u32Ricardo Ribalda Delgado1-4/+3
Instead of parsing manually the shadow content, use the much simpler helper of_property_read_u32. Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <robh+dt@kernel.org> Cc: John Crispin <blogic@openwrt.org> Cc: devicetree@vger.kernel.org Cc: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-01-20gpio: gpio-mm-lantiq: Do not replicate codeRicardo Ribalda Delgado1-7/+0
Do not replicate code from of_mm_gpiochip_add. Cc: Alexandre Courbot <gnurou@gmail.com> Cc: John Crispin <blogic@openwrt.org> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-01-20gpio :gpio-mm-lantiq: Use devm_kzallocRicardo Ribalda Delgado1-6/+2
Replace kzalloc with the device managed devm_kzalloc Cc: Alexandre Courbot <gnurou@gmail.com> Cc: John Crispin <blogic@openwrt.org> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.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>
2012-05-21GPIO: MIPS: lantiq: convert gpio-mm-lantiq to OF and of_mm_gpioJohn Crispin1-57/+89
Implements OF support and convert to of_mm_gpio. By attaching hardware latches to the External Bus Unit (EBU) on Lantiq SoC, it is possible to create output only gpios. This driver configures a special memory address, which when written to, outputs 16 bit to the latches. Signed-off-by: John Crispin <blogic@openwrt.org> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Acked-by: Grant Likely <grant.likely@secretlab.ca> Patchwork: https://patchwork.linux-mips.org/patch/3840/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-05-21GPIO: MIPS: lantiq: move gpio-stp and gpio-ebu to the subsystem folderJohn Crispin1-0/+126
Move the 2 drivers from arch/mips/lantiq/xway/ to the subsystem and make them buildable. The following 2 patches will convert the drivers to OF. Signed-off-by: John Crispin <blogic@openwrt.org> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Acked-by: Grant Likely <grant.likely@secretlab.ca> Patchwork: https://patchwork.linux-mips.org/patch/3838/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>