- 04 7月, 2019 8 次提交
-
-
由 Martin Blumenstingl 提交于
Enable compile-testing of the stp-xway GPIO driver now that it does not depend on any architecture specific includes anymore. Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/20190702223248.31934-5-martin.blumenstingl@googlemail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Martin Blumenstingl 提交于
Use the xway_stp_{r,w}32 helpers in xway_stp_w32_mask instead of relying on ltq_{r,w}32 from the architecture specific <lantiq_soc.h>. This will allow the driver to be compile-tested on all architectures that support MMIO. Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/20190702223248.31934-4-martin.blumenstingl@googlemail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Martin Blumenstingl 提交于
Three module clock error handling improvements: - use devm_clk_get() so the clock instance can be freed if devm_gpiochip_add_data() fails later on - switch to clk_prepare_enable() so the driver is ready whenever the lantiq target switches to the common clock framework - disable the clock again (using clk_disable_unprepare()) if devm_gpiochip_add_data() All of these are virtually no-ops with the current lantiq target. However, these will be relevant if we switch to the common clock framework. Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/20190702223248.31934-3-martin.blumenstingl@googlemail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Martin Blumenstingl 提交于
Return early if devm_gpiochip_add_data() returns an error instead of having two consecutive "if (!ret) ..." statements. Also make xway_stp_hw_init() return void because it unconditionally returns 0. While here also update the kerneldoc comment for xway_stp_hw_init(). These changes makes the error handling within the driver consistent. No functional changes intended. Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/20190702223248.31934-2-martin.blumenstingl@googlemail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Geert Uytterhoeven 提交于
Obviously functions that are safe to be called from atomic contexts, can be called from non-atomic contexts, too. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20190701142809.25308-1-geert+renesas@glider.beSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Geert Uytterhoeven 提交于
Commit 372e722e ("gpiolib: use descriptors internally") renamed the functions to use a "gpiod" prefix, and commit 79a9becd ("gpiolib: export descriptor-based GPIO interface") introduced the "raw" variants, but both changes forgot to update the comments. Readd a similar reference to gpiod_set_value(), which was accidentally removed by commit 1e77fc82 ("gpio: Add missing open drain/source handling to gpiod_set_value_cansleep()"). Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20190701142738.25219-1-geert+renesas@glider.beSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Geert Uytterhoeven 提交于
A new field init_valid_mask was added to struct gpio_chip, but it was not documented. Fixes: f8ec92a9 ("gpiolib: Add init_valid_mask exported function") Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20190701142650.25122-1-geert+renesas@glider.beSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Geert Uytterhoeven 提交于
The function is called gpiod_get_array(), not gpiod_array_get(). Fixes: 77588c14 ("gpiolib: Pass array info to get/set array functions") Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20190701141005.24631-1-geert+renesas@glider.beSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 03 7月, 2019 7 次提交
-
-
由 Enrico Weigelt 提交于
The dev_info() call already prints the device name, so there's no need to explicitly include it in the message for second time. Signed-off-by: NEnrico Weigelt <info@metux.net> Link: https://lore.kernel.org/r/1562146944-4162-1-git-send-email-info@metux.netSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Linus Walleij 提交于
We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For chained irqchips this is a pretty straight-forward conversion. Cc: Ley Foon Tan <lftan@altera.com> Cc: Tien Hock Loh <thloh@altera.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Linus Walleij 提交于
By using devm_gpiochip_add_data() we can get rid of the remove() callback. As this driver doesn't use the gpiochip data pointer we simply pass in NULL. Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Linus Walleij 提交于
This makes the code easier to read. Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Linus Walleij 提交于
We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For chained irqchips this is a pretty straight-forward conversion. Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Enrico Weigelt 提交于
The struct resource field is statically initialized and may never change. Therefore make it const. Signed-off-by: NEnrico Weigelt <info@metux.net> Link: https://lore.kernel.org/r/1560787211-15443-1-git-send-email-info@metux.netSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Arnd Bergmann 提交于
devm_ioremap_resource() does not currently take 'const' arguments, which results in a warning from the first driver trying to do it anyway: drivers/gpio/gpio-amd-fch.c: In function 'amd_fch_gpio_probe': drivers/gpio/gpio-amd-fch.c:171:49: error: passing argument 2 of 'devm_ioremap_resource' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] priv->base = devm_ioremap_resource(&pdev->dev, &amd_fch_gpio_iores); ^~~~~~~~~~~~~~~~~~~ Change the prototype to allow it, as there is no real reason not to. Fixes: 9bb2e0452508 ("gpio: amd: Make resource struct const") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20190628150049.1108048-1-arnd@arndb.deAcked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Reviwed-By: NEnrico Weigelt <info@metux.net> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 28 6月, 2019 2 次提交
-
-
由 Linus Walleij 提交于
We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For chained irqchips this is a pretty straight-forward conversion. Take this opportunity to add a local dev pointer and use devm_gpiochip_add() so we can get rid of the remove() callback altogether. Cc: linux-mips@linux-mips.org Acked-by: NAlban Bedel <albeu@free.fr> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Jon Hunter 提交于
The function tegra_gpio_debuginit() just calls debugfs_create_file() and given that there is already a stub function implemented for debugfs_create_file() when CONFIG_DEBUG_FS is not enabled, there is no need for the function tegra_gpio_debuginit() and so remove it. Finally, use a space and not a tab between the #ifdef and CONFIG_DEBUG_FS. Signed-off-by: NJon Hunter <jonathanh@nvidia.com> Reviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 27 6月, 2019 19 次提交
-
-
由 Linus Walleij 提交于
Merge tag 'gpio-v5.3-updates-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel gpio: updates for v5.3 - add include/linux/gpio.h to .gitignore in /tools - improve and simplify code in the em driver - simplify code in max732x by using devm helpers (including the new devm_i2c_new_dummy_device()) - fix SPDX header for madera - remove checking of return values of debugfs routines in gpio-mockup
-
由 Linus Walleij 提交于
The siox driver is hardcoding a default type of IRQ_TYPE_EDGE_RISING to the irq helper, but this should only be applicable to old boardfiles and odd device tree irqchips with just onecell irq (no flags). I doubt this is the case with the siox, I think all consumers specify the flags they use in the device tree. Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Linus Walleij 提交于
gpiochip_remove() was called on the errorpath if gpiochip_add() failed: this is wrong, if the chip failed to add it is not there so it should not be removed. Fixes: be8c8fac ("gpio: new driver to work with a 8x12 siox") Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Linus Walleij 提交于
We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For chained irqchips this is a pretty straight-forward conversion. Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: NSudeep Holla <sudeep.holla@arm.com> Tested-by: NSudeep Holla <sudeep.holla@arm.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Greg Kroah-Hartman 提交于
It is fine to ignore the return value (and encouraged), so no need to cast away the return value, you will not get a build warning at all. Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com> Cc: linux-gpio@vger.kernel.org Cc: linux-tegra@vger.kernel.org Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NJon Hunter <jonathanh@nvidia.com> Acked-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Greg Kroah-Hartman 提交于
It is fine to ignore the return value (and encouraged), so need to cast away the return value, you will not get a build warning at all. Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com> Cc: linux-gpio@vger.kernel.org Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Geert Uytterhoeven 提交于
Sort the definitions for the individual GPIO drivers in the Makefile by object file name. Align all entries while we're at it. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Enrico Weigelt 提交于
Reduce driver init boilerplate by using the new module_siox_driver() macro. Signed-off-by: NEnrico Weigelt <info@metux.net> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Enrico Weigelt 提交于
Add more helper macros for trivial driver init cases, similar to the already existing module_platform_driver() or module_i2c_driver(). This helps to reduce driver init boilerplate. Signed-off-by: NEnrico Weigelt <info@metux.net> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: NEnrico Weigelt, metux IT consult <info@metux.net> Reviewed-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. this driver deserves a bit more cleanup, to get rid of the global variable giu_base, which makes it single-instance-only. Signed-off-by: NEnrico Weigelt, metux IT consult <info@metux.net> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
don't need the temporary variable "dev", directly use &pdev->dev Signed-off-by: NEnrico Weigelt, metux IT consult <info@metux.net> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: NEnrico Weigelt, metux IT consult <info@metux.net> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: NEnrico Weigelt, metux IT consult <info@metux.net> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
We already have the struct device* pointer in a local variable, so we can write this a bit shorter. Signed-off-by: NEnrico Weigelt, metux IT consult <info@metux.net> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
A tab sneaked in, where it shouldn't be. Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NEnrico Weigelt, metux IT consult <info@metux.net> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Enrico Weigelt 提交于
Improve readability a bit by commenting #if/#else/#endif statements with the checked preprocessor symbols. Signed-off-by: NEnrico Weigelt <info@metux.net> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Enrico Weigelt 提交于
The pointer to the struct platform_device in the driver's private data struct is never used and therefore can be dropped. Signed-off-by: NEnrico Weigelt <info@metux.net> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Greg Kroah-Hartman 提交于
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Bamvor Jian Zhang <bamv2005@gmail.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com> Cc: linux-gpio@vger.kernel.org Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> [Bartosz: removed one more check for debugfs return value] Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 26 6月, 2019 1 次提交
-
-
由 Charles Keepax 提交于
GPL-2.0-only is the preferred way of expressing v2 of the GPL, so switch to that and remove some redundant copyright notices. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 14 6月, 2019 3 次提交
-
-
由 Linus Walleij 提交于
We already have an array named "parents" so instead of letting one point to the other, simply allocate a dynamic array to hold the parents, just one if desired and drop the number of members in gpio_irq_chip by 1. Rename gpiochip to gc in the process. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Linus Walleij 提交于
We now have two APIs for registering GPIOLIB_IRQCHIP, this is not working and creating confusion. Add a TODO item to fix it up. Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Linus Walleij 提交于
We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For chained irqchips this is a pretty straight-forward conversion. Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-