- 13 Jun, 2023 2 commits
-
-
Manikanta Guntupalli authored
Make the struct irq_chip const and flag it as IRQCHIP_IMMUTABLE, call gpiochip_disable_irq() in the .irq_mask() callback and gpiochip_enable_irq() in the .irq_unmask() callback to fix "gpio gpiochip1: (zynqmp_gpio): not an immutable chip" warning. Signed-off-by:
Manikanta Guntupalli <manikanta.guntupalli@amd.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Min-Hua Chen authored
This patch fixes the following sprse warnings: drivers/gpio/gpio-davinci.c:695:1: sparse: warning: symbol 'davinci_gpio_dev_pm_ops' was not declared. Should it be static? No functional change intended. Signed-off-by:
Min-Hua Chen <minhuadotchen@gmail.com> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- 09 Jun, 2023 1 commit
-
-
Andy Shevchenko authored
Since the legacy exporting is gone with 2f804aca ("gpiolib: Kill unused GPIOF_EXPORT and Co") there is no need to unexport GPIO on freeing. Remove that call. Note, the other users of this functionality do that explicitly, except one SH and one OMAP boardfile which don't free GPIO anyways, so it is safe to drop the call. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- 07 Jun, 2023 1 commit
-
-
Bartosz Golaszewski authored
Drivers should be silent when they work correctly. There's no reason to emit info messages when GPIO lines are hogged. Demote the message to debug. Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Suggested-by:
Kent Gibson <warthog618@gmail.com> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-
- 06 Jun, 2023 1 commit
-
-
Geert Uytterhoeven authored
Fix misspellings of "circuit". Fixes: c7239a3d ("dt-bindings: gpio: Add gpio-delay binding document") Signed-off-by:
Geert Uytterhoeven <geert+renesas@glider.be> Acked-by:
Alexander Stein <alexander.stein@ew.tq-group.com> Acked-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- 05 Jun, 2023 1 commit
-
-
Alexander Stein authored
This driver relies on OF_GPIO features, add a dependency to Kconfig. Fixes: cf5dec80 ("gpio: Add gpio delay driver") Signed-off-by:
Alexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- 02 Jun, 2023 2 commits
-
-
Alexander Stein authored
This driver implements a GPIO enable/disable delay. It supports a list of GPIO outputs, which ramp-up/ramp-down delay can be specified at consumer location. The main purpose is to address external, passive delays upon line voltage changes. Signed-off-by:
Alexander Stein <alexander.stein@ew.tq-group.com> Acked-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Alexander Stein authored
This adds bindings for a GPIO enable/disable delay driver. Signed-off-by:
Alexander Stein <alexander.stein@ew.tq-group.com> Acked-by:
Linus Walleij <linus.walleij@linaro.org> Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- 01 Jun, 2023 4 commits
-
-
Andy Shevchenko authored
Now that the of_gpiochip_add() doesn't use valid mask, we may unify GPIO valid mask allocation and initialization. With this it makes a symmetry to the similar which we done for IRQ chip. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
There is a common API to allocate a mask, but more than one duplicative counterparts. Consolidate the latter into a single common API beneath. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
There is no use of the GPIOF_OPEN_* in the kernel. Kill it for good. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andy Shevchenko authored
There is no use of the GPIOF_EXPORT in the kernel. Kill it for good. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- 31 May, 2023 1 commit
-
-
Bartosz Golaszewski authored
Merge tag 'gpio-omap-descriptors-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio into gpio/for-next This removes all usage of global GPIO numbers from arch/arm/mach-omap[12]. The patches have been reviewed and tested by everyone who showed interest which was one person that tested on OSK1 and Nokia 770, and we smoked out the bugs and also addressed all review comments. Any remaining problems can certainly be fixed in-tree.
-
- 26 May, 2023 2 commits
-
-
Prathamesh Shete authored
This change checks if we have the necessary permission to access the GPIO. For devices that have support for virtualisation we need to check both the TEGRA186_GPIO_VM_REG and the TEGRA186_GPIO_SCR_REG registers. For device that do not have virtualisation support for GPIOs we only need to check the TEGRA186_GPIO_SCR_REG register. Signed-off-by:
Manish Bhardwaj <mbhardwaj@nvidia.com> Signed-off-by:
Prathamesh Shete <pshete@nvidia.com> Acked-by:
Thierry Reding <treding@nvidia.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Acked-by:
Jon Hunter <jonathanh@nvidia.com> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Jonathan McDowell authored
The AXP209 has a 4th GPIO, so add it in preparation for support in the driver. Signed-off-by:
Jonathan McDowell <noodles@earth.li> Acked-by:
Jernej Skrabec <jernej.skrabec@gmail.com> Acked-by:
Conor Dooley <conor.dooley@microchip.com> Acked-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- 24 May, 2023 13 commits
-
-
Linus Walleij authored
The TUSB6010 (MUSB) device is picking up some GPIO lines hardcoded by number and passing on to the TUSB6010 device when registering it. Instead of nasty workarounds, provide a GPIO descriptor table and then make the TUSB6010 MUSB glue driver pick up the GPIO lines directly, convert it to an IRQ and pass down to the MUSB driver. OMAP2 is the only system using the TUSB6010. Stash the GPIO descriptors in the glue layer and use then to power up and down the TUSB6010 on-demand, instead of using boardfile callbacks. Since the OMAP2 boards are the only boards using the .set_power() and .board_set_power() callbacks, we can just delete them as the power is now handled directly in the TUSB6010 glue code. Cc: Bin Liu <b-liu@ti.com> Cc: linux-usb@vger.kernel.org Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base") Acked-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
The OMAP2 platform data quirk is using the global GPIO numberspace to obtain two WLAN GPIOs to drive power and xcvr reset GPIO lines during start-up. Rewrite the quirk to use a GPIO descriptor table so we avoid using global GPIO numbers. This gets rid of the final dependency on the legacy <linux/gpio.h> header from the OMAP2/3 platforms. Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base") Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
This switches the USB hub GPIO reset line handling in the OMAP2 pdata quirks over to using GPIO descriptors to avoid using the global GPIO numberspace. Since the GPIOs are exported and assumedly used by some kind of userspace we cannot simply use hogs in the device tree. Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base") Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
The TWL4030 GPIO driver has a custom platform data .set_up() callback to call back into the platform and do misc stuff such as hog and export a GPIO for WLAN PWR on a specific OMAP3 board. Avoid all the kludgery in the platform data and the boardfile and just put the quirks right into the driver. Make it conditional on OMAP3. I think the exported GPIO is used by some kind of userspace so ordinary DTS hogs will probably not work. Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base") Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
After fixing all the offending users referencing the global GPIO numberspace in OMAP1, a few sites still remain including the legacy <linus/gpio.h> header for no reason. Delete the last remaining users, and OMAP1 is free from legacy GPIO dependencies. Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base") Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
The code in serial.c looks up GPIOs corresponding to a line on the UART when muxed in as GPIO to use this as a wakeup on serial activity for OMAP1. Utilize the NULL device to define some board-specific GPIO lookups and use these to immediately look up the same GPIOs, set as input and convert to IRQ numbers, then set these to wakeup IRQs. This is ugly but should work. This is only needed on the OSK1 and Nokia 770 devices that use the OMAP16xx. Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base") Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
The platform devices on the Nokia 770 is using some board-specific IRQs that get statically assigned to platform devices in the boardfile. This does not work with dynamic IRQ chip bases. Utilize the NULL device to define some board-specific GPIO lookups and use these to immediately look up the same GPIOs, convert to IRQ numbers and pass as resources to the devices. This is ugly but should work. Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base") Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
A recent change to the OMAP driver making it use a dynamic GPIO base created problems with some old OMAP1 board files, among them Nokia 770, SX1 and also the OMAP2 Nokia n8x0. Fix up all instances of GPIOs being used for the MMC driver by pushing the handling of power, slot selection and MMC "cover" into the driver as optional GPIOs. This is maybe not the most perfect solution as the MMC framework have some central handlers for some of the stuff, but it at least makes the situtation better and solves the immediate issue. Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base") Acked-by:
Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
The Nokia 770 is using GPIOs from the global numberspace on the CBUS node to pass down to the LCD controller. This regresses when we let the OMAP GPIO driver use dynamic GPIO base. The Nokia 770 now has dynamic allocation of IRQ numbers, so this needs to be fixed for it to work. As this is the only user of LCD MIPID we can easily augment the driver to use a GPIO descriptor instead and resolve the issue. The platform data .shutdown() callback wasn't even used in the code, but we encode a shutdown asserting RESET in the remove() callback for completeness sake. The CBUS also has the ADS7846 touchscreen attached. Populate the devices on the Nokia 770 CBUS I2C using software nodes instead of platform data quirks. This includes the LCD and the ADS7846 touchscreen so the conversion just brings the LCD along with it as software nodes is an all-or-nothing design pattern. The ADS7846 has some limited support for using GPIO descriptors, let's convert it over completely to using device properties and then fix all remaining boardfile users to provide all platform data using software nodes. Dump the of includes and of_match_ptr() in the ADS7846 driver as part of the job. Since we have to move ADS7846 over to obtaining the GPIOs it is using exclusively from descriptors, we provide descriptor tables for the two remaining in-kernel boardfiles using ADS7846: - PXA Spitz - MIPS Alchemy DB1000 development board It was too hard for me to include software node conversion of these two remaining users at this time: the spitz is using a hscync callback in the platform data that would require further GPIO descriptor conversion of the Spitz, and moving the hsync callback down into the driver: it will just become too big of a job, but it can be done separately. The MIPS Alchemy DB1000 is simply something I cannot test, so take the easier approach of just providing some GPIO descriptors in this case as I don't want the patch to grow too intrusive. As we see that several device trees have incorrect polarity flags and just expect to bypass the gpiolib polarity handling, fix up all device trees too, in a separate patch. Suggested-by:
Dmitry Torokhov <dmitry.torokhov@gmail.com> Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base") Acked-by:
Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by:
Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
It appears this happens because the OMAP driver now allocates GPIO numbers dynamically, so all that is references by number is a bit up in the air. Utilize the NULL device to define some board-specific GPIO lookups and use these to immediately look up the same GPIOs, convert to IRQ numbers and pass as resources to the devices. This is ugly but should work. Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base") Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
It appears this happens because the OMAP driver now allocates GPIO numbers dynamically, so all that is references by number is a bit up in the air. Utilize the NULL device to define some board-specific GPIO lookups and use these to immediately look up the same GPIOs, convert to IRQ numbers and pass as resources to the devices. This is ugly but should work. Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base") Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
The AMS Delta board uses GPIO descriptors exclusively and does not have any dependencies on the legacy <linux/gpio.h> header, so just drop it. Acked-by:
Janusz Krzysztofik <jmkrzyszt@gmail.com> Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base") Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
Aaro reports problems on the OSK1 board after we altered the dynamic base for GPIO allocations. It appears this happens because the OMAP driver now allocates GPIO numbers dynamically, so all that is references by number is a bit up in the air. Let's bite the bullet and try to just move the gpio_chip in the tps65010 MFD driver over to using dynamic allocations. Alter everything in the OSK1 board file to use a GPIO descriptor table and lookups. Utilize the NULL device to define some board-specific GPIO lookups and use these to immediately look up the same GPIOs, convert to IRQ numbers and pass as resources to the devices. This is ugly but should work. The .setup() callback for tps65010 was used for some GPIO hogging, but since the OSK1 is the only user in the entire kernel we can alter the signatures to something that is helpful and make a clean transition. Fixes: 92bf78b3 ("gpio: omap: use dynamic allocation of base") Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: andy.shevchenko@gmail.com Cc: Andreas Kemnade <andreas@kemnade.info> Acked-by:
Lee Jones <lee@kernel.org> Reviewed-by:
Lee Jones <lee@kernel.org> Reported-by:
Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 23 May, 2023 3 commits
-
-
Yang Li authored
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by:
Yang Li <yang.lee@linux.alibaba.com> Acked-by:
Florian Fainelli <f.fainelli@gmail.com> Acked-by:
Doug Berger <opendmb@gmail.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Raag Jadav authored
Utilize a temporary variable to calculate number of ctx from ngpio inside ->probe() implementation. While at it, include math.h for using DIV_ROUND_UP(). Signed-off-by:
Raag Jadav <raag.jadav@intel.com> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Uwe Kleine-König authored
After commit b8a1a4cd ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f4 ("i2c: Switch .probe() to not take an id parameter") convert back to (the new) .probe() to be able to eventually drop .probe_new() from struct i2c_driver. 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>
-
- 17 May, 2023 6 commits
-
-
Niklas Schnelle authored
In a future patch HAS_IOPORT=n will result in inb()/outb() and friends not being declared. We thus need to add HAS_IOPORT as dependency for those drivers using them. Co-developed-by:
Arnd Bergmann <arnd@kernel.org> Signed-off-by:
Arnd Bergmann <arnd@kernel.org> Signed-off-by:
Niklas Schnelle <schnelle@linux.ibm.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Arnd Bergmann authored
sa1100_init_gpio() is declared in a machine specific header so it can be called from platform code, but the definition is in the device driver, which causes a warning: drivers/gpio/gpio-sa1100.c:310:13: error: no previous prototype for 'sa1100_init_gpio' [-Werror=missing-prototypes] It's already possible to include mach/generic.h from drivers, so add this one here as well. Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andrew Davis authored
Use devm version of gpiochip_add() function to handle removal for us. Signed-off-by:
Andrew Davis <afd@ti.com> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andrew Davis authored
Use devm version of gpiochip add function to handle removal for us. While here update copyright and module author. Signed-off-by:
Andrew Davis <afd@ti.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andrew Davis authored
Use devm version of gpiochip add function to handle removal for us. Signed-off-by:
Andrew Davis <afd@ti.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Andrew Davis authored
Use devm version of gpiochip add function to handle removal for us. While here update copyright and module author. Signed-off-by:
Andrew Davis <afd@ti.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- 11 May, 2023 3 commits
-
-
Linus Walleij authored
This rewrites the STMPE GPIO bindings to a YAML schema. We add the properties that are used in the widely used STMPE GPIO device nodes found in the wild, most notably interrupt support, so interrupt-cells and interrupt-controller is now part of the bindings. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org> Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Sean Anderson authored
This is a generic binding for simple MMIO GPIO controllers. Although we have a single driver for these controllers, they were previously spread over several files. Consolidate them. The register descriptions are adapted from the comments in the source. There is no set order for the registers, and some registers may be omitted. Because of this, reg-names is mandatory, and no order is specified. Rename brcm,bcm6345-gpio to brcm,bcm63xx-gpio to reflect that bcm6345 has moved. Signed-off-by:
Sean Anderson <sean.anderson@seco.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Reviewed-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
Yang Li authored
Convert platform_get_resource(),devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by:
Yang Li <yang.lee@linux.alibaba.com> Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-