- 03 Aug, 2020 1 commit
-
-
Linus Walleij authored
Make sure to register the GPIO chip after requesting the interrupt and setting up the IRQ members of the irqchip. Fixes: 97450796 ("gpio: stmpe: Use irqchip template") Reported-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Cc: Patrice Chotard <patrice.chotard@st.com> Link: https://lore.kernel.org/r/20200728072706.348725-1-linus.walleij@linaro.org
-
- 29 Jul, 2020 1 commit
-
-
Linus Walleij authored
This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit call to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Cc: Biju Das <biju.das@bp.renesas.com> Cc: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20200722113141.243163-1-linus.walleij@linaro.org
-
- 26 Jul, 2020 1 commit
-
-
Michael Walle authored
GPIO_REGMAP_ADDR_ZERO() cast to unsigned long but the actual config parameters are unsigned int. We use unsigned int here because that is the type which is used by the underlying regmap. Fixes: ebe36319 ("gpio: add a reusable generic gpio_chip using regmap") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Michael Walle <michael@walle.cc> Link: https://lore.kernel.org/r/20200725232337.27581-1-michael@walle.ccSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
- 23 Jul, 2020 9 commits
-
-
Colton Lewis authored
Fix kernel-doc comment to match parameter name change "chip" to "gc" in gpiochip_add_data function. Signed-off-by: Colton Lewis <colton.w.lewis@protonmail.com> Link: https://lore.kernel.org/r/20200723095658.234668-1-colton.w.lewis@protonmail.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit call to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Also move the IRQ initialization to the special .init_hw() callback. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> Cc: William Breathitt Gray <vilhelm.gray@gmail.com> Link: https://lore.kernel.org/r/20200722110649.202223-1-linus.walleij@linaro.org
-
Linus Walleij authored
This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit call to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> Cc: William Breathitt Gray <vilhelm.gray@gmail.com> Link: https://lore.kernel.org/r/20200722110027.192782-1-linus.walleij@linaro.org
-
Linus Walleij authored
This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit call to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Also move the IRQ initialization to the special .init_hw() callback. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> Cc: William Breathitt Gray <vilhelm.gray@gmail.com> Link: https://lore.kernel.org/r/20200722105517.186137-1-linus.walleij@linaro.org
-
Linus Walleij authored
This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit call to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Also move the IRQ initialization to the special .init_hw() callback. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> Cc: William Breathitt Gray <vilhelm.gray@gmail.com> Link: https://lore.kernel.org/r/20200722104820.174654-1-linus.walleij@linaro.org
-
Linus Walleij authored
This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit call to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Also move the IRQ initialization to the special .init_hw() callback. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> Cc: William Breathitt Gray <vilhelm.gray@gmail.com> Link: https://lore.kernel.org/r/20200722103915.162156-1-linus.walleij@linaro.org
-
Linus Walleij authored
This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit call to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Also move the IRQ initialization to the special .init_hw() callback. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> Cc: William Breathitt Gray <vilhelm.gray@gmail.com> Link: https://lore.kernel.org/r/20200722101938.151265-1-linus.walleij@linaro.org
-
Drew Fustini authored
Change the handling of pin config flags from if/else to switch statement to make the code more readable and cleaner. Suggested-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Drew Fustini <drew@beagleboard.org> Acked-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20200722120755.230741-1-drew@beagleboard.orgSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Cc: Daniel Baluta <daniel.baluta@gmail.com> Cc: Octavian Purdila <octavian.purdila@nxp.com> Link: https://lore.kernel.org/r/20200722073426.38890-1-linus.walleij@linaro.org
-
- 22 Jul, 2020 6 commits
-
-
Linus Walleij authored
Merge tag 'intel-gpio-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into devel intel-gpio for v5.9-1 * Move GPIO PMIC drivers to use IRQ chip template * Introduce for_each_requested_gpio() and convert existing users * Replace unsigned by unsigned int in few drivers * Fix an issue in kernel doc that validator complains about * Move to verbose debug level the IRQ status message in gpio-pch The following is an automated git shortlog grouped by driver: ARM/orion/gpio: - Make use of for_each_requested_gpio() crystalcove: - Use irqchip template - changed every 'unsigned' to 'unsigned int' gpiolib: - Introduce for_each_requested_gpio_in_range() macro gpio-ml-ioh: - Fix missing ':' in 'struct ioh_gpio_reg_data ich: - changed every 'unsigned' to 'unsigned int' mvebu: - Make use of for_each_requested_gpio() pch: - Add a blank line between declaration and code - changed every 'unsigned' to 'unsigned int' - Move IRQ status message to verbose debug level pinctrl: - at91: Make use of for_each_requested_gpio() sch: - Add a blank line between declaration and code - changed every 'unsigned' to 'unsigned int' wcove: - Use irqchip template xra1403: - Make use of for_each_requested_gpio()
-
Abanoub Sameh authored
Added a lined between a declaration and other statements according to the kernel coding style. Signed-off-by: Abanoub Sameh <abanoubsameh@protonmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-
Abanoub Sameh authored
Changed 'unsigned' to 'unsigned int'. This makes the code more uniform, and compliant with the kernel coding style. Signed-off-by: Abanoub Sameh <abanoubsameh@protonmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-
Abanoub Sameh authored
Changed 'unsigned' to 'unsigned int'. This makes the code more uniform, and compliant with the kernel coding style. Signed-off-by: Abanoub Sameh <abanoubsameh@protonmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-
Linus Walleij authored
This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Cc: Bin Gao <bin.gao@linux.intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-
Linus Walleij authored
This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-
- 21 Jul, 2020 3 commits
-
-
Abanoub Sameh authored
Changed 'unsigned' to 'unsigned int'. This makes the code more uniform, and compliant with the kernel coding style. Signed-off-by: Abanoub Sameh <abanoubsameh@protonmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-
Abanoub Sameh authored
Added a lined between a declaration and other statements according to the kernel coding style. Signed-off-by: Abanoub Sameh <abanoubsameh@protonmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-
Abanoub Sameh authored
Changed 'unsigned' to 'unsigned int'. This makes the code more uniform, and compliant with the kernel coding style. Signed-off-by: Abanoub Sameh <abanoubsameh@protonmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-
- 20 Jul, 2020 7 commits
-
-
Linus Walleij authored
This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Adam Ford <aford173@gmail.com> Cc: Vignesh Raghavendra <vigneshr@ti.com> Link: https://lore.kernel.org/r/20200717144040.63253-1-linus.walleij@linaro.org
-
Drew Fustini authored
Modify omap_gpio_set_config() to handle pin config bias flags by calling gpiochip_generic_config(). The pin group for the gpio line must have the corresponding pinconf properties: PIN_CONFIG_BIAS_PULL_UP requires "pinctrl-single,bias-pullup" PIN_CONFIG_BIAS_PULL_DOWN requires "pinctrl-single,bias-pulldown" This is necessary for pcs_pinconf_set() to find the requested bias parameter in the PIN_MAP_TYPE_CONFIGS_GROUP pinctrl map. Signed-off-by: Drew Fustini <drew@beagleboard.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20200715213738.1640030-1-drew@beagleboard.org Link: https://lore.kernel.org/r/20200717194043.1774643-1-drew@beagleboard.org
-
Linus Walleij authored
This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Cc: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Anders Darander <anders@chargestorm.se> Cc: Roger Quadros <rogerq@ti.com> Link: https://lore.kernel.org/r/20200717144835.68150-1-linus.walleij@linaro.org
-
Linus Walleij authored
This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Cc: Nikolaus Voss <nv@vosn.de> Cc: Michael Hennerich <michael.hennerich@analog.com> Link: https://lore.kernel.org/r/20200716150502.195821-1-linus.walleij@linaro.org
-
Linus Walleij authored
This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Cc: Roland Stigge <stigge@antcom.de> Cc: Lars Poeschel <poeschel@lemonage.de> Link: https://lore.kernel.org/r/20200716120318.127176-1-linus.walleij@linaro.org
-
Linus Walleij authored
This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Cc: Patrice Chotard <patrice.chotard@st.com> Cc: Alexandre TORGUE <alexandre.torgue@st.com> Link: https://lore.kernel.org/r/20200716100638.112451-1-linus.walleij@linaro.org
-
Linus Walleij authored
This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20200716093459.76378-1-linus.walleij@linaro.org
-
- 17 Jul, 2020 1 commit
-
-
Linus Walleij authored
Most other drivers fill out the gpio_irq_chip using a struct gpio_irq_chip *girq helper variable for ease of reading. We also make a habit of explicitly assigning NULL and zero to the parent IRQs when using ordinary IRQ handlers in the driver, mostly for code readability and maintenance. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Cc: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20200716092835.69176-1-linus.walleij@linaro.org
-
- 16 Jul, 2020 9 commits
-
-
Andy Shevchenko authored
Use for_each_set_bit() instead of open-coding it to simplify the code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200713154429.23662-1-andriy.shevchenko@linux.intel.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Sungbo Eo authored
This patch adds device tree bindings for the NXP PCA9570, a 4-bit I2C GPO expander. Signed-off-by: Sungbo Eo <mans0n@gorani.run> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20200630160934.1197066-1-mans0n@gorani.runSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Sungbo Eo authored
NXP PCA9570 is a 4-bit I2C GPO expander without interrupt functionality. Its ports are controlled only by a data byte without register address. Signed-off-by: Sungbo Eo <mans0n@gorani.run> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Datasheet: https://www.nxp.com/docs/en/data-sheet/PCA9570.pdf Link: https://lore.kernel.org/r/20200709134829.216393-1-mans0n@gorani.runSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Dmitry Osipenko authored
I noticed on Nexus 7 that after rebooting from downstream kernel to upstream, the GPIO interrupt is triggering non-stop despite interrupts being disabled for all of GPIOs. This happens because Nexus 7 uses a soft-reboot, meaning that bootloader should take care of resetting hardware, but the bootloader doesn't do it well. As a result, GPIO interrupt may be left ON at a boot time. Let's mask all GPIO interrupts at the driver's initialization time in order to resolve the issue. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Link: https://lore.kernel.org/r/20200709171203.12950-7-digetx@gmail.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Dmitry Osipenko authored
This change addresses one of the GPIO-core TODOs for the MAX77620 driver which requires modern drivers to use the irqchip template. Instead of using the GPIO's irqchip-helpers for creating the IRQ domain, the gpio_irq_chip structure is now filled by the driver itself and then gpiochip_add_data() takes care of instantiating the IRQ domain for us. Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Link: https://lore.kernel.org/r/20200709171203.12950-6-digetx@gmail.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Dmitry Osipenko authored
The platform_get_irq() returns a positive interrupt number on success and negative error code on failure (zero shouldn't ever happen in practice, it would produce a noisy warning). Hence let's return the error code directly instead of overriding it with -ENODEV. Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Link: https://lore.kernel.org/r/20200709171203.12950-5-digetx@gmail.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Dmitry Osipenko authored
The gpiochip_add_data() takes care of setting the of_node to the parent's device of_node, hence there is no need to do it manually in the driver's code. This patch corrects the parent's device pointer and removes the unnecessary setting of the of_node. Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Link: https://lore.kernel.org/r/20200709171203.12950-4-digetx@gmail.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Dmitry Osipenko authored
The requested interrupt is never released by the driver. Fix this by using the resource-managed variant of request_threaded_irq(). Fixes: ab3dd9cc ("gpio: max77620: Fix interrupt handling") Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Cc: <stable@vger.kernel.org> # 5.5+ Link: https://lore.kernel.org/r/20200709171203.12950-3-digetx@gmail.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
Dmitry Osipenko authored
The MAX77620_GPIO_NR enum value represents the total number of GPIOs, let's use it instead of a raw value in order to improve the code's readability a tad. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Link: https://lore.kernel.org/r/20200709171203.12950-2-digetx@gmail.comSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
-
- 13 Jul, 2020 1 commit
-
-
Linus Walleij authored
Merge tag 'gpio-updates-for-v5.9-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel gpio updates for v5.9 - part 2 - several improvements and minor tweaks to the GPIO character device code
-
- 12 Jul, 2020 1 commit
-
-
Kent Gibson authored
Fix bogus close warning that occurs when opening the character device fails. Signed-off-by: Kent Gibson <warthog618@gmail.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
-