History log of /linux-master/drivers/gpio/gpio-mm-lantiq.c
Revision Date Author Comments
# 4f5c7bc1 28-Sep-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

gpio: mm-lantiq: Convert to platform remove callback returning void

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>


# 2ffd04ca 13-Mar-2023 Andy Shevchenko <andriy.shevchenko@linux.intel.com>

gpio: mm-lantiq: Fix typo in the newly added header filename

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>


# a99cc668 07-Feb-2023 Arnd Bergmann <arnd@arndb.de>

gpiolib: split of_mm_gpio_chip out of linux/of_gpio.h

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>


# dc5c1439 24-Apr-2020 Dejin Zheng <zhengdejin5@gmail.com>

gpio: mm-lantiq: Fix small typo

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>


# d2912cb1 04-Jun-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500

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>


# 0cbbdcf9 13-Apr-2018 Linus Walleij <linus.walleij@linaro.org>

gpio: mm-lantiq: Include the right header

This is a driver so include only <linux/gpio/driver.h>.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>


# baddc7ca 20-Dec-2016 John Crispin <john@phrozen.org>

gpio: update my email address

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>


# 95c76170 07-Jan-2016 Guenter Roeck <linux@roeck-us.net>

gpio: mm-lantiq: Do not use gpiochip_get_data() in ltq_mm_save_regs()

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>


# 6aa7dbfa 07-Dec-2015 Linus Walleij <linus.walleij@linaro.org>

gpio: mm-lantiq: use gpiochip data pointer

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>


# da238221 17-Jan-2015 Ricardo Ribalda <ribalda@kernel.org>

gpio: gpio-mm-lantiq: Use of_mm_gpiochip_remove

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>


# 68a99b18 18-Jan-2015 Ricardo Ribalda <ribalda@kernel.org>

gpio: gpio-mm-lantiq: Use of_property_read_u32

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>


# f3f26c2f 17-Jan-2015 Ricardo Ribalda <ribalda@kernel.org>

gpio: gpio-mm-lantiq: Do not replicate code

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>


# 080440a2 17-Jan-2015 Ricardo Ribalda <ribalda@kernel.org>

gpio :gpio-mm-lantiq: Use devm_kzalloc

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>


# 4a3a950e 20-Oct-2014 Wolfram Sang <wsa@kernel.org>

gpio: drop owner assignment from platform_drivers

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>


# a36e9a1c 16-May-2012 John Crispin <blogic@openwrt.org>

GPIO: MIPS: lantiq: convert gpio-mm-lantiq to OF and of_mm_gpio

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>


# 5238f7bc 11-May-2012 John Crispin <blogic@openwrt.org>

GPIO: MIPS: lantiq: move gpio-stp and gpio-ebu to the subsystem folder

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>