#
4e26ddab |
| 04-Sep-2024 |
Zhang Zekun <zhangzekun11@huawei.com> |
gpio: xilinx: Use helper function devm_clk_get_optional_enabled()
devm_clk_get_optional() and clk_prepare_enable() can be replaced by helper function devm_clk_get_optional_enabled(). Let's simplify
gpio: xilinx: Use helper function devm_clk_get_optional_enabled()
devm_clk_get_optional() and clk_prepare_enable() can be replaced by helper function devm_clk_get_optional_enabled(). Let's simplify code with use of devm_clk_get_optional_enabled() and avoid calling clk_disable_unprepare().
Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com> Link: https://lore.kernel.org/r/20240904092311.9544-5-zhangzekun11@huawei.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
show more ...
|
#
4c7fcbf5 |
| 15-Dec-2023 |
Bartosz Golaszewski <bartosz.golaszewski@linaro.org> |
gpio: xilinx: remove excess kernel doc
The irqchip field has been removed from struct xgpio_instance so remove the doc as well.
Fixes: b4510f8fd5d0 ("gpio: xilinx: Convert to immutable irq_chip") R
gpio: xilinx: remove excess kernel doc
The irqchip field has been removed from struct xgpio_instance so remove the doc as well.
Fixes: b4510f8fd5d0 ("gpio: xilinx: Convert to immutable irq_chip") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202312150239.IyuTVvrL-lkp@intel.com/ Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Michal Simek <michal.simek@amd.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
show more ...
|
#
4f7b5eed |
| 28-Sep-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
gpio: xilinx: 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
gpio: xilinx: 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: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
show more ...
|
#
e91d0f05 |
| 14-Jul-2023 |
Rob Herring <robh@kernel.org> |
gpio: Explicitly include correct DT includes
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 me
gpio: Explicitly include correct DT includes
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>
show more ...
|
#
b4510f8f |
| 20-Mar-2023 |
Linus Walleij <linus.walleij@linaro.org> |
gpio: xilinx: Convert to immutable irq_chip
Convert the driver to immutable irq-chip with a bit of intuition.
Cc: Marc Zyngier <maz@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.or
gpio: xilinx: Convert to immutable irq_chip
Convert the driver to immutable irq-chip with a bit of intuition.
Cc: Marc Zyngier <maz@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
show more ...
|
#
13e856b8 |
| 12-Jan-2023 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
gpio: xilinx: Remove duplicate assignment of of_gpio_n_cells
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
gpio: xilinx: Remove duplicate assignment of of_gpio_n_cells
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>
show more ...
|
#
f2a2f2c9 |
| 21-Jul-2022 |
Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> |
gpio: xilinx: add missing blank line after declarations
Add a missing blank line. No functional changes.
WARNING: Missing a blank line after declarations 128: FILE: drivers/gpio/gpio-xilinx.c:120:
gpio: xilinx: add missing blank line after declarations
Add a missing blank line. No functional changes.
WARNING: Missing a blank line after declarations 128: FILE: drivers/gpio/gpio-xilinx.c:120: + void __iomem *addr = chip->regs + reg + xgpio_regoffset(chip, bit / 32); + xgpio_set_value32(a, bit, xgpio_readreg(addr));
WARNING: Missing a blank line after declarations 136: FILE: drivers/gpio/gpio-xilinx.c:126: + void __iomem *addr = chip->regs + reg + xgpio_regoffset(chip, bit / 32); + xgpio_writereg(addr, xgpio_get_value32(a, bit));
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Reviewed-by: Michal Simek <michal.simek@amd.com> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
show more ...
|
#
32c094a0 |
| 21-Jul-2022 |
Srinivas Neeli <srinivas.neeli@xilinx.com> |
gpio: gpio-xilinx: Fix integer overflow
Current implementation is not able to configure more than 32 pins due to incorrect data type. So type casting with unsigned long to avoid it.
Fixes: 02b3f84d
gpio: gpio-xilinx: Fix integer overflow
Current implementation is not able to configure more than 32 pins due to incorrect data type. So type casting with unsigned long to avoid it.
Fixes: 02b3f84d9080 ("xilinx: Switch to use bitmap APIs") Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
show more ...
|
#
e24b9fc1 |
| 20-Sep-2021 |
Wolfram Sang <wsa+renesas@sang-engineering.com> |
gpio: xilinx: simplify getting .driver_data
We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth.
Signed-off-by: Wolfram Sang <wsa
gpio: xilinx: simplify getting .driver_data
We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
show more ...
|
#
dbd1c54f |
| 04-May-2021 |
Marc Zyngier <maz@kernel.org> |
gpio: Bulk conversion to generic_handle_domain_irq()
Wherever possible, replace constructs that match either generic_handle_irq(irq_find_mapping()) or generic_handle_irq(irq_linear_revmap()) to a si
gpio: Bulk conversion to generic_handle_domain_irq()
Wherever possible, replace constructs that match either generic_handle_irq(irq_find_mapping()) or generic_handle_irq(irq_linear_revmap()) to a single call to generic_handle_domain_irq().
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Marc Zyngier <maz@kernel.org>
show more ...
|
#
be4dc321 |
| 03-Jun-2021 |
Srinivas Neeli <srinivas.neeli@xilinx.com> |
gpio: gpio-xilinx: update on suspend and resume calls
Current AXI GPIO driver checking for interrupt data in suspend and resume path and reporting as error in case of no interrupt connection. As per
gpio: gpio-xilinx: update on suspend and resume calls
Current AXI GPIO driver checking for interrupt data in suspend and resume path and reporting as error in case of no interrupt connection. As per AXI GPIO IP specification interrupt connection is optional, driver logic is updated in suspend and resume calls by reporting debug message and enable/disable clock in case of no connection.
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
show more ...
|
#
a0579474 |
| 10-May-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
gpio: xilinx: Correct kernel doc for xgpio_probe()
Kernel doc validator complains:
.../gpio-xilinx.c:556: warning: expecting prototype for xgpio_of_probe(). Prototype was for xgpio_probe() instead
gpio: xilinx: Correct kernel doc for xgpio_probe()
Kernel doc validator complains:
.../gpio-xilinx.c:556: warning: expecting prototype for xgpio_of_probe(). Prototype was for xgpio_probe() instead
Correct as suggested by changing the name of the function in the doc..
Fixes: 749564ffd52d ("gpio/xilinx: Convert the driver to platform device interface") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Neeli Srinivas <sneeli@xilinx.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
show more ...
|
#
6453b953 |
| 10-May-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
gpio: xilinx: No need to disable IRQs in the handler
In IRQ handler interrupts are already disabled, hence no need to repeat it. Even in the threaded case, it is not a problem because IRQ framework
gpio: xilinx: No need to disable IRQs in the handler
In IRQ handler interrupts are already disabled, hence no need to repeat it. Even in the threaded case, it is not a problem because IRQ framework keeps interrupt disabled there as well. Remove disabling IRQ part in the handler.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Neeli Srinivas <sneeli@xilinx.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
show more ...
|
#
02b3f84d |
| 10-May-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
gpio: xilinx: Switch to use bitmap APIs
It seems that Xilinx GPIO driver operates with bit arrays longer than 32 and thus can leverage bitmap APIs for that. It makes code better to understand.
The
gpio: xilinx: Switch to use bitmap APIs
It seems that Xilinx GPIO driver operates with bit arrays longer than 32 and thus can leverage bitmap APIs for that. It makes code better to understand.
The ->probe() function is modified to try read properties for both channels since is_dual check makes only sense for the amount of pins used for the second channel. On top of that kzalloc() guarantees zero initial values for the fields in the private data structure, hence drop unneeded conditionals and assignments.
The change is inspired by Syed Nayyar Waris' ideas about bitmap API extension.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Neeli Srinivas <sneeli@xilinx.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
show more ...
|
#
043aa3db |
| 10-May-2021 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
gpio: xilinx: Introduce xgpio_read_chan() / xgpio_write_chan()
With the new helpers, i.e. xgpio_read_chan() / xgpio_write_chan(), the code is easier to read and maintain. No functional changes inten
gpio: xilinx: Introduce xgpio_read_chan() / xgpio_write_chan()
With the new helpers, i.e. xgpio_read_chan() / xgpio_write_chan(), the code is easier to read and maintain. No functional changes intended.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Neeli Srinivas <sneeli@xilinx.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
show more ...
|
#
6e551bfa |
| 29-Jan-2021 |
Srinivas Neeli <srinivas.neeli@xilinx.com> |
gpio: gpio-xilinx: Add check if width exceeds 32
Add check to see if gpio-width property does not exceed 32. If it exceeds then return -EINVAL.
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.
gpio: gpio-xilinx: Add check if width exceeds 32
Add check to see if gpio-width property does not exceed 32. If it exceeds then return -EINVAL.
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
show more ...
|
#
26b04774 |
| 29-Jan-2021 |
Srinivas Neeli <srinivas.neeli@xilinx.com> |
gpio: gpio-xilinx: Add support for suspend and resume
Add support for suspend and resume, pm runtime suspend and resume. Added free and request calls.
Signed-off-by: Srinivas Neeli <srinivas.neeli@
gpio: gpio-xilinx: Add support for suspend and resume
Add support for suspend and resume, pm runtime suspend and resume. Added free and request calls.
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
show more ...
|
#
a32c7cae |
| 29-Jan-2021 |
Srinivas Neeli <srinivas.neeli@xilinx.com> |
gpio: gpio-xilinx: Add interrupt support
Adds interrupt support to the Xilinx GPIO driver so that rising and falling edge line events can be supported. Since interrupt support is an optional feature
gpio: gpio-xilinx: Add interrupt support
Adds interrupt support to the Xilinx GPIO driver so that rising and falling edge line events can be supported. Since interrupt support is an optional feature in the Xilinx IP, the driver continues to support devices which have no interrupt provided. Depends on OF_GPIO framework for of_xlate function to translate gpiospec to the GPIO number and flags.
Signed-off-by: Robert Hancock <hancock@sedsystems.ca> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
show more ...
|
#
37ef3346 |
| 29-Jan-2021 |
Srinivas Neeli <srinivas.neeli@xilinx.com> |
gpio: gpio-xilinx: Reduce spinlock array to array
Changed spinlock array to single. It is preparation for irq support which is shared between two channels that's why spinlock should be only one.
Si
gpio: gpio-xilinx: Reduce spinlock array to array
Changed spinlock array to single. It is preparation for irq support which is shared between two channels that's why spinlock should be only one.
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
show more ...
|
#
45c5277f |
| 29-Jan-2021 |
Srinivas Neeli <srinivas.neeli@xilinx.com> |
gpio: gpio-xilinx: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value.
Signed-off-by: Srini
gpio: gpio-xilinx: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value.
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
show more ...
|
#
bea67aea |
| 12-Nov-2020 |
Srinivas Neeli <srinivas.neeli@xilinx.com> |
gpio: gpio-xilinx: Check return value of of_property_read_u32
In two different instances the return value of "of_property_read_u32" API was neither captured nor checked. Fixed it by capturing the re
gpio: gpio-xilinx: Check return value of of_property_read_u32
In two different instances the return value of "of_property_read_u32" API was neither captured nor checked. Fixed it by capturing the return value and then checking for any error.
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Addresses-Coverity: "check_return" Link: https://lore.kernel.org/r/1605201148-4508-9-git-send-email-srinivas.neeli@xilinx.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
show more ...
|
#
0230a41e |
| 12-Nov-2020 |
Srinivas Neeli <srinivas.neeli@xilinx.com> |
gpio: gpio-xilinx: Add remove function
Added remove function support.
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.k
gpio: gpio-xilinx: Add remove function
Added remove function support.
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/1605201148-4508-7-git-send-email-srinivas.neeli@xilinx.com [dropped pm disable call] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
show more ...
|
#
65bbe531 |
| 12-Nov-2020 |
Srinivas Neeli <srinivas.neeli@xilinx.com> |
gpio: gpio-xilinx: Add clock support
Adds clock support to the Xilinx GPIO driver.
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Link: h
gpio: gpio-xilinx: Add clock support
Adds clock support to the Xilinx GPIO driver.
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/1605201148-4508-4-git-send-email-srinivas.neeli@xilinx.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
show more ...
|
#
8c669fe6 |
| 12-Nov-2020 |
Srinivas Neeli <srinivas.neeli@xilinx.com> |
gpio: gpio-xilinx: Arrange headers in sorting order
Arrange header files in sorted order.
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com>
gpio: gpio-xilinx: Arrange headers in sorting order
Arrange header files in sorted order.
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/1605201148-4508-2-git-send-email-srinivas.neeli@xilinx.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
show more ...
|
#
c3afa804 |
| 25-Jan-2020 |
Paul Thomas <pthomas8589@gmail.com> |
gpio: xilinx: Fix bug where the wrong GPIO register is written to
Care is taken with "index", however with the current version the actual xgpio_writereg is using index for data but xgpio_regoffset(c
gpio: xilinx: Fix bug where the wrong GPIO register is written to
Care is taken with "index", however with the current version the actual xgpio_writereg is using index for data but xgpio_regoffset(chip, i) for the offset. And since i is already incremented it is incorrect. This patch fixes it so that index is used for the offset too.
Cc: stable@vger.kernel.org Signed-off-by: Paul Thomas <pthomas8589@gmail.com> Link: https://lore.kernel.org/r/20200125221410.8022-1-pthomas8589@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
show more ...
|