- 31 8月, 2021 5 次提交
-
-
由 Christophe JAILLET 提交于
If an error occurs after a 'gpiochip_add_data()' call it must be undone by a corresponding 'gpiochip_remove()' as already done in the remove function. To simplify the code a fix a leak in the error handling path of the probe, use the managed version instead (i.e. 'devm_gpiochip_add_data()') Fixes: 698b8eea ("gpio/mpc8xxx: change irq handler from chained to normal") Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Christophe JAILLET 提交于
Commit 76c47d14 ("gpio: mpc8xxx: Add ACPI support") has switched to a managed version when dealing with 'mpc8xxx_gc->regs'. So the corresponding 'iounmap()' call in the error handling path and in the remove should be removed to avoid a double unmap. This also allows some simplification in the probe. All the error handling paths related to managed resources can be direct returns and a NULL check in what remains in the error handling path can be removed. Fixes: 76c47d14 ("gpio: mpc8xxx: Add ACPI support") Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Christophe JAILLET 提交于
Commit 698b8eea ("gpio/mpc8xxx: change irq handler from chained to normal") has introduced a new 'goto err;' at the very end of the function, but has not updated the error handling path accordingly. Add the now missing 'irq_domain_remove()' call which balances a previous 'irq_domain_create_linear() call. Fixes: 698b8eea ("gpio/mpc8xxx: change irq handler from chained to normal") Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Alexandru Ardelean 提交于
The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. This change removes it. Also removing with this change is some logging about the failure to init the gpio chip data. There are other logging methods to view that this failed. Signed-off-by: NAlexandru Ardelean <aardelean@deviqon.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Viresh Kumar 提交于
Fix warnings reported by sparse, related to type mismatch between u16 and __le16. Reported-by: Nkernel test robot <lkp@intel.com> Fixes: 3a29355a ("gpio: Add virtio-gpio driver") Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 23 8月, 2021 2 次提交
-
-
由 Lukas Bulwahn 提交于
Commit e1324ece ("ARM: imx: Remove i.MX35 board files") removes the config MACH_MX35_3DS in arch/arm/mach-imx/Kconfig. Hence, since then, the MX35 3DS BOARD MC9S08DZ60 GPIO functions are dead code as its config GPIO_MC9S08DZ60 depends on the config MACH_MX35_3DS. Luckily, ./scripts/checkkconfigsymbols.py warns on non-existing configs: MACH_MX35_3DS Referencing files: drivers/gpio/Kconfig Remove the obsolete MX35 3DS BOARD MC9S08DZ60 GPIO functions. Signed-off-by: NLukas Bulwahn <lukas.bulwahn@gmail.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NFabio Estevam <festevam@gmail.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Viresh Kumar 提交于
This patch adds a new driver for Virtio based GPIO devices. This allows a guest VM running Linux to access GPIO lines provided by the host. It supports all basic operations, except interrupts for the GPIO lines. Based on the initial work posted by: "Enrico Weigelt, metux IT consult" <lkml@metux.net>. Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 17 8月, 2021 8 次提交
-
-
由 Jianqun Xu 提交于
There has spin lock for irq set type already, so drop irq_gc_lock and irq_gc_unlock. Reviewed-by: NHeiko Stuebner <heiko@sntech.de> Signed-off-by: NJianqun Xu <jay.xu@rock-chips.com> Link: https://lore.kernel.org/r/20210816012135.1119234-1-jay.xu@rock-chips.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Jianqun Xu 提交于
The next version gpio controller on SoCs like rk3568 have more write mask bits for registers. Signed-off-by: NJianqun Xu <jay.xu@rock-chips.com> Link: https://lore.kernel.org/r/20210816012123.1119179-1-jay.xu@rock-chips.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Jianqun Xu 提交于
Store register offsets in the struct rockchip_gpio_regs, this patch prepare for the driver update for new gpio controller. Reviewed-by: NHeiko Stuebner <heiko@sntech.de> Signed-off-by: NJianqun Xu <jay.xu@rock-chips.com> Link: https://lore.kernel.org/r/20210816012111.1119125-1-jay.xu@rock-chips.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Jianqun Xu 提交于
This patch add support for rockchip gpio controller, which is supported in pinctrl driver in the past. With this patch, the pinctrl-rockchip driver will drop gpio related codes and populate platform driver to gpio-rockchip. Signed-off-by: NJianqun Xu <jay.xu@rock-chips.com> Link: https://lore.kernel.org/r/20210816012053.1119069-1-jay.xu@rock-chips.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Andy Shevchenko 提交于
Use DEFINE_RES_MEM_NAMED() to save a couple of lines of code, which makes the code a bit shorter and easier to read. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NAsmaa Mnebhi <asmaa@nvidia.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Andy Shevchenko 提交于
Simplify the platform_get_resource() and devm_ioremap_resource() calls with devm_platform_ioremap_resource(). Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NAsmaa Mnebhi <asmaa@nvidia.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Andy Shevchenko 提交于
ACPI_PTR() is more harmful than helpful. For example, in this case if CONFIG_ACPI=n, the ID table left unused which is not what we want. Instead of adding ifdeffery here and there, drop ACPI_PTR() and replace acpi.h with mod_devicetable.h. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NAsmaa Mnehi <asmaa@nvidia.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Andy Shevchenko 提交于
Convert driver to use modern device PM ops interface. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NAsmaa Mnebhi <asmaa@nvidia.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 12 8月, 2021 1 次提交
-
-
由 Marc Zyngier 提交于
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: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMarc Zyngier <maz@kernel.org>
-
- 11 8月, 2021 3 次提交
-
-
由 Andy Shevchenko 提交于
Platform data is a legacy interface to supply device properties to the driver. In this case we don't have anymore in-kernel users for it. Just remove it for good. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NSerge Semin <fancer.lancer@gmail.com> Tested-by: NSerge Semin <fancer.lancer@gmail.com>
-
由 Andy Shevchenko 提交于
For backward compatibility with some legacy devices introduce a new (*) property gpio-base to read GPIO base. This will allow further cleaning up of the driver. *) Note, it's not new for the GPIO library since the mockup driver is using it already. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: NSerge Semin <fancer.lancer@gmail.com> Acked-by: NSerge Semin <fancer.lancer@gmail.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Andy Shevchenko 提交于
Shared IRQ is only enabled for ACPI enumeration, there is no need to have a special flag for that, since we simple can test if device has been enumerated by ACPI. This unifies the checks in dwapb_get_irq() and dwapb_configure_irqs(). Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLee Jones <lee.jones@linaro.org> Acked-by: NSerge Semin <fancer.lancer@gmail.com> Tested-by: NSerge Semin <fancer.lancer@gmail.com>
-
- 06 8月, 2021 8 次提交
-
-
由 Akhil R 提交于
Add ACPI module ID to probe the driver from the ACPI based bootloader firmware. Signed-off-by: NAkhil R <akhilrajeev@nvidia.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: NJon Hunter <jonathanh@nvidia.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Krzysztof Kozlowski 提交于
gpiolib does not modify struct device_node, so few local pointers can point to a const data. Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Krzysztof Kozlowski 提交于
Several gpiolib functions receive pointer to struct device_node which is later passed to OF functions. These OF functions accept already pointer to const, so gpiolib can follow similar approach to indicate they are not modifying the struct device_node. Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Steven Lee 提交于
Add an else-if condition in the probe function to check whether ngpios is multiple of 8. Per AST datasheet, numbers of available serial GPIO pins in Serial GPIO Configuration Register must be n bytes. For instance, if n = 1, it means AST SoC supports 8 GPIO pins. Signed-off-by: NSteven Lee <steven_lee@aspeedtech.com> Reviewed-by: NAndrew Jeffery <andrew@aj.id.au> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Steven Lee 提交于
Replace all of_property_read_u32() with device_property_read_u32(). Signed-off-by: NSteven Lee <steven_lee@aspeedtech.com> Acked-by: NAndrew Jeffery <andrew@aj.id.au> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Steven Lee 提交于
The current design initializes irq->chip from a global irqchip struct, which causes multiple sgpio devices use the same irq_chip. The patch moves irq_chip to aspeed_sgpio struct for initializing irq_chip from their private gpio struct. Signed-off-by: NSteven Lee <steven_lee@aspeedtech.com> Reviewed-by: NAndrew Jeffery <andrew@aj.id.au> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Steven Lee 提交于
AST SoC supports *retain pin state* function when wdt reset. The patch adds set_config function for handling sgpio reset tolerance register. Signed-off-by: NSteven Lee <steven_lee@aspeedtech.com> Reviewed-by: NAndrew Jeffery <andrew@aj.id.au> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Steven Lee 提交于
The maximum number of gpio pins of SoC is hardcoded as 80 and the gpio pin count mask for GPIO Configuration register is hardcode as GENMASK(9,6). However, AST2600 has 2 sgpio master interfaces, one of them supports up to 128 gpio pins and pin count mask of GPIO Configuration Register is 5 bits. The patch adds ast2600 compatibles, removes MAX_NR_HW_SGPIO and corresponding design to make the gpio input/output pin base are determined by ngpios. The patch also removed hardcoded pin mask and adds ast2400, ast2500, ast2600 platform data that include gpio pin count mask for GPIO Configuration Register. The original pin order is as follows: (suppose MAX_NR_HW_SGPIO is 80 and ngpios is 10 as well) Input: 0 1 2 3 ... 9 Output: 80 81 82 ... 89 The new pin order is as follows: Input: 0 2 4 6 ... 18 Output: 1 3 5 7 ... 19 SGPIO pin id and input/output pin mapping is as follows: SGPIO0(0,1), SGPIO1(2,3), ..., SGPIO79(158,159) For example: Access SGPIO5(10,11) Get SGPIO pin 5 (suppose sgpio chip id is 2) gpioget 2 10 Set SGPIO pin 5 (suppose sgpio chip id is 2) gpioset 2 11=1 gpioset 2 11=0 Signed-off-by: NSteven Lee <steven_lee@aspeedtech.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 02 8月, 2021 1 次提交
-
-
由 Matthias Schiffer 提交于
The tqmx86 MFD driver was passing IRQ 0 for "no IRQ" in the past. This causes warnings with newer kernels. Prepare the gpio-tqmx86 driver for the fixed MFD driver by handling a missing IRQ properly. Fixes: b868db94 ("gpio: tqmx86: Add GPIO from for this IO controller") Signed-off-by: NMatthias Schiffer <matthias.schiffer@ew.tq-group.com> Reviewed-by: NAndrew Lunn <andrew@lunn.ch> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 30 7月, 2021 3 次提交
-
-
由 Sergio Paracuellos 提交于
Gpiolib core code has been updated to support setting friendly names through properly 'gpio-line-names'. Instead of redefine behaviour here to skip the core to be executed, just properly assign the desired offset per bank to get in the core the expected behaviour. Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Acked-by: NGregory Fong <gregory.0xf0@gmail.com> Signed-off-by: NSergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Sergio Paracuellos 提交于
This driver uses multiple gpiochip banks per device. To support 'gpio-line-names' along the banks 'offset' for each bank must be set explicitly. Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NSergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Sergio Paracuellos 提交于
The default gpiolib-of implementation does not work with the multiple gpiochip banks per device structure used for example by the gpio-mt7621 and gpio-brcmstb drivers. To fix these kind of situations driver code is forced to fill the names to avoid the gpiolib code to set names repeated along the banks. Instead of continue with that antipattern fix the gpiolib core function to get expected behaviour for every single situation adding a field 'offset' in the gpiochip structure. Doing in this way, we can assume this offset will be zero for normal driver code where only one gpiochip bank per device is used but can be set explicitly in those drivers that really need more than one gpiochip. Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: NGregory Fong <gregory.0xf0@gmail.com> Signed-off-by: NSergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 18 7月, 2021 1 次提交
-
-
由 Rasmus Villemoes 提交于
This reverts commit 3d5bfbd9. When booting with threadirqs, it causes a splat WARNING: CPU: 0 PID: 29 at kernel/irq/handle.c:159 __handle_irq_event_percpu+0x1ec/0x27c irq 66 handler irq_default_primary_handler+0x0/0x1c enabled interrupts That splat later went away with commit 81e2073c ("genirq: Disable interrupts for force threaded handlers"), which got backported to -stable. However, when running an -rt kernel, the splat still exists. Moreover, quoting Thomas Gleixner [1] But 3d5bfbd9 ("gpio: mpc8xxx: change the gpio interrupt flags.") has nothing to do with that: "Delete the interrupt IRQF_NO_THREAD flags in order to gpio interrupts can be threaded to allow high-priority processes to preempt." This changelog is blatantly wrong. In mainline forced irq threads have always been invoked with softirqs disabled, which obviously makes them non-preemptible. So the patch didn't even do what its commit log said. [1] https://lore.kernel.org/lkml/871r8zey88.ffs@nanos.tec.linutronix.de/ Cc: stable@vger.kernel.org # v5.9+ Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 16 7月, 2021 1 次提交
-
-
由 Geert Uytterhoeven 提交于
As we have already have a pointer to the device structure in a local variable in gpio_rcar_probe(), we can just use "dev" instead of "p->dev". Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 13 7月, 2021 1 次提交
-
-
由 Vaibhav Gupta 提交于
Convert the legacy callback .suspend() and .resume() to the generic ones. While at it, replace ifdeffery by __maybe_unused attribute. Signed-off-by: NVaibhav Gupta <vaibhavgupta40@gmail.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
- 25 6月, 2021 2 次提交
-
-
由 Jinchao Wang 提交于
Fix checkpatch warnings: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: NJinchao Wang <wjc@cdjrlc.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Johannes Berg 提交于
Both of these drivers use ioport_map(), so they need to depend on HAS_IOPORT_MAP. Otherwise, they cannot be built even with COMPILE_TEST on architectures without an ioport implementation, such as ARCH=um. Reported-by: Nkernel test robot <lkp@intel.com> Signed-off-by: NJohannes Berg <johannes.berg@intel.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 22 6月, 2021 2 次提交
-
-
由 Gabriel Knezek 提交于
When userspace requests a GPIO v1 line info changed event, lineinfo_watch_read() populates and returns the gpioline_info_changed structure. It contains 5 words of padding at the end which are not initialized before being returned to userspace. Zero the structure in gpio_v2_line_info_change_to_v1() before populating its contents. Fixes: aad95584 ("gpiolib: cdev: support GPIO_V2_GET_LINEINFO_IOCTL and GPIO_V2_GET_LINEINFO_WATCH_IOCTL") Signed-off-by: NGabriel Knezek <gabeknez@linux.microsoft.com> Reviewed-by: NKent Gibson <warthog618@gmail.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Loic Poulain 提交于
A disabled/masked interrupt marked as wakeup source must be re-enable and unmasked in order to be able to wake-up the host. That can be done by flaging the irqchip with IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND. Note: It 'sometimes' works without that change, but only thanks to the lazy generic interrupt disabling (keeping interrupt unmasked). Reported-by: NMichal Koziel <michal.koziel@emlogic.no> Signed-off-by: NLoic Poulain <loic.poulain@linaro.org> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 17 6月, 2021 2 次提交
-
-
由 Daniel Scally 提交于
This driver only covered one scenario in which ACPI devices with _HID INT3472 are found, and its functionality has been taken over by the intel-skl-int3472 module, so remove it. Acked-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Acked-by: NLee Jones <lee.jones@linaro.org> Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NDaniel Scally <djrscally@gmail.com> Link: https://lore.kernel.org/r/20210603224007.120560-7-djrscally@gmail.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
-
由 Peter Robinson 提交于
The On Semi pca9655 is a 16 bit variant of the On Semi pca9654 GPIO expander, with 16 GPIOs and interrupt functionality. Signed-off-by: NPeter Robinson <pbrobinson@gmail.com> [Bartosz: fixed indentation as noted by Andy] Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-