- 28 Jul, 2022 1 commit
-
-
Andy Shevchenko authored
The initial code was misleading to use bitwise AND against plain number, and the commit d3054ba1 ("gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in()") missed that. Switch definitions to be defined bits for the correct comparison. Fixes: d3054ba1 ("gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in()") Reported-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
- 26 Jul, 2022 1 commit
-
-
Shubhrajyoti Datta authored
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>
-
- 22 Jul, 2022 1 commit
-
-
William Breathitt Gray authored
The drivers/gpio/gpio-i8255.h header file is also maintained. Signed-off-by:
William Breathitt Gray <william.gray@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
- 20 Jul, 2022 6 commits
-
-
William Breathitt Gray authored
Reduce magic numbers and improve code readability by implementing and utilizing named register data structures. The GPIO-MM device features an Intel 8255 compatible GPIO interface, so the i8255 GPIO module is selected and utilized as well. Tested-by:
Fred Eckert <Frede@cmslaser.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
William Breathitt Gray <william.gray@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
William Breathitt Gray authored
Reduce magic numbers and improve code readability by implementing and utilizing named register data structures. The 104-IDI-48 device features an Intel 8255 compatible GPIO interface, so the i8255 GPIO module is selected and utilized as well. Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Cc: John Hentges <jhentges@accesio.com> Cc: Jay Dolan <jay.dolan@accesio.com> Signed-off-by:
William Breathitt Gray <william.gray@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
William Breathitt Gray authored
Reduce magic numbers and improve code readability by implementing and utilizing named register data structures. The 104-DIO-48E device features an Intel 8255 compatible GPIO interface, so the i8255 GPIO module is selected and utilized as well. Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Cc: John Hentges <jhentges@accesio.com> Cc: Jay Dolan <jay.dolan@accesio.com> Signed-off-by:
William Breathitt Gray <william.gray@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
William Breathitt Gray authored
Exposes consumer library functions providing support for interfaces compatible with the venerable Intel 8255 Programmable Peripheral Interface (PPI). The Intel 8255 PPI first appeared in the early 1970s, initially for the Intel 8080 and later appearing in the original IBM-PC. The popularity of the original Intel 8255 chip led to many subsequent variants and clones of the interface in various chips and integrated circuits. Although still popular, interfaces compatible with the Intel 8255 PPI are nowdays typically found embedded in larger VLSI processing chips and FPGA components rather than as discrete ICs. A CONFIG_GPIO_I8255 Kconfig option is introduced by this patch. Modules wanting access to these i8255 library functions should select this Kconfig option, and import the I8255 symbol namespace. Tested-by:
Fred Eckert <Frede@cmslaser.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Cc: John Hentges <jhentges@accesio.com> Cc: Jay Dolan <jay.dolan@accesio.com> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by:
William Breathitt Gray <william.gray@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
William Breathitt Gray authored
Reduce magic numbers and improve code readability by implementing and utilizing named register data structures. Tested-by:
Fred Eckert <Frede@cmslaser.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Cc: John Hentges <jhentges@accesio.com> Cc: Jay Dolan <jay.dolan@accesio.com> Signed-off-by:
William Breathitt Gray <william.gray@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
William Breathitt Gray authored
Reduce magic numbers and improve code readability by implementing and utilizing named register data structures. Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Cc: Paul Demetrotion <pdemetrotion@winsystems.com> Signed-off-by:
William Breathitt Gray <william.gray@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
- 19 Jul, 2022 31 commits
-
-
Thomas Bogendoerfer authored
Commit d3164e2f ("MIPS: Remove VR41xx support") removed support for MIPS VR41xx platform, so remove exclusive drivers for this platform, too. Signed-off-by:
Thomas Bogendoerfer <tsbogend@alpha.franken.de> Acked-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Nuno Sá authored
This extends the flags that can be used in GPIO specifiers to indicate that no bias is intended in the pin. Signed-off-by:
Nuno Sá <nuno.sa@analog.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Acked-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Nuno Sá authored
On top of looking at PULL_UP and PULL_DOWN flags, also look at PULL_DISABLE and set the appropriate GPIO flag. The GPIO core will then pass down this to controllers that support it. Signed-off-by:
Nuno Sá <nuno.sa@analog.com> Acked-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Nuno Sá authored
On top of looking at PULL_UP and PULL_DOWN flags, also look at PULL_DISABLE and set the appropriate GPIO flag. The GPIO core will then pass down this to controllers that support it. Signed-off-by:
Nuno Sá <nuno.sa@analog.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Nuno Sá authored
This change prepares the gpio core to look at firmware flags and set 'FLAG_BIAS_DISABLE' if necessary. It works in similar way to 'GPIO_PULL_DOWN' and 'GPIO_PULL_UP'. Signed-off-by:
Nuno Sá <nuno.sa@analog.com> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Andy Shevchenko authored
Make use of the GENMASK() (far less error-prone, far more concise). Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Andy Shevchenko authored
It's logically better to check the IN in ->direction_input() and _OUT in ->direction_output(). While at it, replace ternary with plain if-conditional for the sake of consistency with mmio_74xx_dir_out(). Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Andy Shevchenko authored
Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Add mod_devicetable.h include. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Kent Gibson authored
The majority of builds do not include HTE, so compile out hte functionality unless CONFIG_HTE is selected. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Kent Gibson authored
Combine the polarity_change flag, struct line eflags, and hte enable flag into a single flag variable. The combination of these flags describes the configuration state of the edge detector, so formalize and clarify that by combining them into a single variable, edflags, in struct line. The edflags is a subset of the GPIO_V2_LINE_FLAGsb relevant to the edge detector, and is also a superset of the eflags it replaces. The eflags name is still used to describe the subset of edflags corresponding to the rising/falling edge flags where edflags is masked down to that subset. This consolidation reduces the number of variables being passed, simplifies state comparisons, and provides a more extensible foundation should additional edge sources be integrated in the future. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Kent Gibson authored
Reorganise line event identification code to reduce code duplication, and replace if-else initializers with a helper function to improve readability. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org>
-
Kent Gibson authored
Improve readability by replacing if-else chains with switch statements. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Kent Gibson authored
Improve readability by using the GPIO_V2_LINE_FLAG_EDGE_BOTH instead of combining the rising and falling edge flags. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by:
Dipen Patel <dipenp@nvidia.com> Tested-by:
Dipen Patel <dipenp@nvidia.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Kent Gibson authored
The edge detector is only ever started after the line desc has been determined, so move edge_detector_stop() inside the line desc check, and merge the two checked regions into one. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by:
Dipen Patel <dipenp@nvidia.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Aakash Sen Sharma authored
Remove checkpatch warnings. No functional changes. Signed-off-by:
Aakash Sen Sharma <aakashsensharma@gmail.com> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Geert Uytterhoeven authored
The SAMA5D2 PIOBU is only present on some AT91/Microchip SoCs. Hence add a dependency on ARCH_AT91, to prevent asking the user about this driver when configuring a kernel without AT91/Microchip SoC support. Signed-off-by:
Geert Uytterhoeven <geert+renesas@glider.be> Acked-by:
Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Liang He authored
We should use of_node_get() when a new reference of device_node is created. It is noted that the old reference stored in 'mm_gc->gc.of_node' should also be decreased. This patch is based on the fact that there is a call site in function 'qe_add_gpiochips()' of src file 'drivers\soc\fsl\qe\gpio.c'. In this function, of_mm_gpiochip_add_data() is contained in an iteration of for_each_compatible_node() which will automatically increase and decrease the refcount. So we need additional of_node_get() for the reference escape in of_mm_gpiochip_add_data(). Fixes: a19e3da5 ("of/gpio: Kill of_gpio_chip and add members directly to gpio_chip") Signed-off-by:
Liang He <windhl@126.com> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Aparna M authored
Convert gpio-tpic2810 bindings to yaml format and remove outdated bindings in .txt format. Signed-off-by:
Aparna M <a-m1@ti.com> Reviewed-by:
Rob Herring <robh@kernel.org> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Shinyzenith authored
Getting rid of checkpatch findings. No functional changes. Signed-off-by:
Shinyzenith <aakashsensharma@gmail.com> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Bartosz Golaszewski authored
Merge tag 'intel-gpio-v5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into TEST_MERGE intel-gpio for v5.20-1 * Clean up the GPIO driver of Intel EG20 PCH The following is an automated git shortlog grouped by driver: pch: - Change PCI device macros - Use dev_err_probe()
-
Andy Shevchenko authored
Instead of open coding, use device_match_of_node() helper. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Andy Shevchenko authored
Sort header inclusion alphabetically. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Andy Shevchenko authored
It's wrong to use defined string literal for three semantically different cases, i.e.: 1) compatible string, which is part of ABI and has to have specific format; 2) I2C ID, which is user space visible and also ABI; 3) driver name, that can be changed. Drop the define and use appropriate string literals in place. While at it, drop comma at terminator entry of OF ID table. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Andy Shevchenko authored
There is nothing directly using of specific interfaces in this driver, so lets not include the headers. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Jianqun Xu authored
Add V2.1 rockchip gpio controller type, which is part of the RK3588 SoC. Signed-off-by:
Jianqun Xu <jay.xu@rock-chips.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by:
Heiko Stuebner <heiko@sntech.de>
-
Sebastian Reichel authored
Allow usage of gpio-ranges with the rockchip gpio controller. The driver already had support for this since it has been added to the mainline kernel in the first place. Acked-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by:
Heiko Stuebner <heiko@sntech.de> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Andy Shevchenko authored
Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Andy Shevchenko authored
The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Lucas Stach authored
The PCA9571 very similar to the PCA9570, it only differs in the number of GPIOs. Signed-off-by:
Lucas Stach <l.stach@pengutronix.de> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Lucas Stach authored
This patch adds device tree bindings for the NXP PCA9571, a 8-bit I2C GPIO expander. Signed-off-by:
Lucas Stach <l.stach@pengutronix.de> Acked-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-
Uwe Kleine-König authored
The remove callback is only called after probe completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so chip is never NULL. Also note that returning an error code from a remove callback doesn't result in the device staying bound. It's still removed and devm callbacks are called. This is a preparation for making platform remove callbacks return void. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by:
Bartosz Golaszewski <brgl@bgdev.pl>
-