- 18 2月, 2021 1 次提交
-
-
由 Maxim Kiselev 提交于
If no n_latch value will be provided at driver probe then all pins will be used as an input: gpio->out = ~n_latch; In that case initial state for all pins is "one": gpio->status = gpio->out; So if pcf857x IRQ happens with change pin value from "zero" to "one" then we miss it, because of "one" from IRQ and "one" from initial state leaves corresponding pin unchanged: change = (gpio->status ^ status) & gpio->irq_enabled; The right solution will be to read actual state at driver probe. Cc: stable@vger.kernel.org Fixes: 6e20a0a4 ("gpio: pcf857x: enable gpio_to_irq() support") Signed-off-by: NMaxim Kiselev <bigunclemax@gmail.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 15 2月, 2021 39 次提交
-
-
由 Nikita Shubin 提交于
- use predefined constants instead of plain numbers - use provided bank IRQ number instead of defined constant for port F Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NAlexander Sverdlin <alexander.sverdlin@gmail.com> Signed-off-by: NNikita Shubin <nikita.shubin@maquefel.me> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Nikita Shubin 提交于
- replace plain numbers with girq->num_parents in devm_kcalloc - replace plain numbers with girq->num_parents for port F - refactor i - 1 to i + 1 to make loop more readable - combine getting IRQ's loop and setting handler's into single loop Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NAlexander Sverdlin <alexander.sverdlin@gmail.com> Signed-off-by: NNikita Shubin <nikita.shubin@maquefel.me> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Nikita Shubin 提交于
Fix typo in comment. Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NAlexander Sverdlin <alexander.sverdlin@gmail.com> Signed-off-by: NNikita Shubin <nikita.shubin@maquefel.me> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Nikita Shubin 提交于
As ->to_irq is redefined in gpiochip_add_irqchip, having it defined in driver is useless, so let's drop it. Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NAlexander Sverdlin <alexander.sverdlin@gmail.com> Signed-off-by: NNikita Shubin <nikita.shubin@maquefel.me> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Nikita Shubin 提交于
Port F IRQ's should be statically mapped to EP93XX_GPIO_F_IRQ_BASE. So we need to specify girq->first otherwise: "If device tree is used, then first_irq will be 0 and IRQ's get mapped dynamically on the fly" And that's not the thing we want. Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NAlexander Sverdlin <alexander.sverdlin@gmail.com> Signed-off-by: NNikita Shubin <nikita.shubin@maquefel.me> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Srinivas Neeli 提交于
Add check to see if gpio-width property does not exceed 32. If it exceeds then return -EINVAL. Signed-off-by: NSrinivas Neeli <srinivas.neeli@xilinx.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NWilliam Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Srinivas Neeli 提交于
Add support for suspend and resume, pm runtime suspend and resume. Added free and request calls. Signed-off-by: NSrinivas Neeli <srinivas.neeli@xilinx.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Srinivas Neeli 提交于
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: NRobert Hancock <hancock@sedsystems.ca> Signed-off-by: NShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Signed-off-by: NSrinivas Neeli <srinivas.neeli@xilinx.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Srinivas Neeli 提交于
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: NSrinivas Neeli <srinivas.neeli@xilinx.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Srinivas Neeli 提交于
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: NSrinivas Neeli <srinivas.neeli@xilinx.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Andy Shevchenko 提交于
Driver is gone, no need to keep a Makefile entry for it. Remove. Reported-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
There are a few places in the code where IRQ status and mask register values are being updated. Use a new exctracted helper to deduplicate the code. While at it, get rid of unnecessary divisions. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
the regmap_set_bits(), regmap_clear_bits() API makes code better to understand. Switch the driver to use them, Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
The casting from int to long on 64-bit platform is error prone. Replace it with proper type of the variable on stack. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
Intel Moorestown and Medfield are quite old Intel Atom based 32-bit platforms, which were in limited use in some Android phones, tablets and consumer electronics more than eight years ago. There are no bugs or problems ever reported outside from Intel for breaking any of that platforms for years. It seems no real users exists who run more or less fresh kernel on it. The commit 05f4434b ("ASoC: Intel: remove mfld_machine") also in align with this theory. Due to above and to reduce a burden of supporting outdated drivers we remove the support of outdated platforms completely. Moreover this code duplicates gpio-pxa since the IP has been derived from XScale implementation. If anybody wants to resurrect this it has to be part of gpio-pxa.c. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Andy Shevchenko 提交于
Intel Moorestown and Medfield are quite old Intel Atom based 32-bit platforms, which were in limited use in some Android phones, tablets and consumer electronics more than eight years ago. There are no bugs or problems ever reported outside from Intel for breaking any of that platforms for years. It seems no real users exists who run more or less fresh kernel on it. The commit 05f4434b ("ASoC: Intel: remove mfld_machine") also in align with this theory. Due to above and to reduce a burden of supporting outdated drivers we remove the support of outdated platforms completely. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Andy Shevchenko 提交于
Remove trailing comma in terminator entries to avoid potential expanding an array behind it. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be>
-
由 Andy Shevchenko 提交于
Instead of doing it in place, convert GPIO_LOOKUP_IDX() and GPIO_HOG() to be compund literals that's allow to use them as rvalue in assignments. Due to above conversion, use compound literal from the header in the gpio-aggregator.c. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be>
-
由 Andy Shevchenko 提交于
We already have a nice helper called get_options() which can be used to validate the input format. Replace isrange() by using it. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be>
-
由 Andy Shevchenko 提交于
If we get bias set request, for example, from GpioIo() resource, we silently ignore it. Make bias configuration available for GPIOs. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Baruch Siach 提交于
Use the marvell,pwm-offset DT property to store the location of PWM signal duration registers. Since we have more than two GPIO chips per system, we can't use the alias id to differentiate between them. Use the offset value for that. Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Dmitry Osipenko 提交于
The irq_set_affinity callback should not be set if parent IRQ domain doesn't present because gpio-tegra driver callback fails in this case, causing a noisy error messages on system suspend: Disabling non-boot CPUs ... IRQ 26: no longer affine to CPU1 IRQ128: set affinity failed(-22). IRQ130: set affinity failed(-22). IRQ131: set affinity failed(-22). IRQ 27: no longer affine to CPU2 IRQ128: set affinity failed(-22). IRQ130: set affinity failed(-22). IRQ131: set affinity failed(-22). IRQ 28: no longer affine to CPU3 IRQ128: set affinity failed(-22). IRQ130: set affinity failed(-22). IRQ131: set affinity failed(-22). Entering suspend state LP1 Hence just don't specify the irq_set_affinity callback if parent PMC IRQ domain is missing. Tegra isn't capable of setting affinity per GPIO, affinity could be set only per GPIO bank, thus there is nothing to do for gpio-tegra in regards to CPU affinity without the parent IRQ domain. Tested-by: Peter Geis <pgwipeout@gmail.com> # Ouya T30 Tested-by: Matt Merhar <mattmerhar@protonmail.com> # Ouya T30 Tested-by: Dmitry Osipenko <digetx@gmail.com> # A500 T20 and Nexus7 T30 Fixes: efcdca286eef ("gpio: tegra: Convert to gpio_irq_chip") Reported-by: NMatt Merhar <mattmerhar@protonmail.com> Signed-off-by: NDmitry Osipenko <digetx@gmail.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Dmitry Osipenko 提交于
Support building driver as a loadable kernel module. This allows to reduce size of a kernel zImage, which is important for some devices since size of kernel partition may be limited and since some bootloader variants have known problems in regards to the initrd placement if kernel image is too big. $ lsmod Module Size Used by gpio_tegra 16384 27 Signed-off-by: NDmitry Osipenko <digetx@gmail.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Dmitry Osipenko 提交于
Clean up inconsistent whitespaces and tabs in the definition of tegra_gpio_driver to make code look better a tad. Signed-off-by: NDmitry Osipenko <digetx@gmail.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Dmitry Osipenko 提交于
Use resource-managed variant of debugfs_create_file(0444) to prepare code for the modularization of the driver. Signed-off-by: NDmitry Osipenko <digetx@gmail.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Dmitry Osipenko 提交于
Don't cross 80 chars of line length in order to keep formatting of the code consistent. Signed-off-by: NDmitry Osipenko <digetx@gmail.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Baruch Siach 提交于
Hardware appears to treat zero value as 2^32. Take advantage of this fact to support on/off values of up to UINT_MAX+1 == 2^32. Adjust both .apply and .get_state to handle zero as a special case. Rounded up division result in .get_state can't be zero, since the dividend is now larger than 0. Remove check for this case. Reported-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Analyzed-by: NRussell King <linux@armlinux.org.uk> Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Reviewed-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Baruch Siach 提交于
PWM on/off registers are limited to UINT_MAX. However the state period and duty_cycle fields are ns values of type u64. There is no reason to limit them to UINT_MAX. Reported-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Baruch Siach 提交于
Round up the divisions in .get_state() to make applying the read out configuration idempotent in most cases as .apply rounds down. Reported-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Baruch Siach 提交于
Change 'off' register value calculation from $off = (period - duty_cycle) * clkrate / NSEC_PER_SEC to $off = (period * clkrate / NSEC_PER_SEC) - $on That is, divide the full period value to reduce rounding error. Reported-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Bartosz Golaszewski 提交于
gpio-mockup doesn't require SYSFS to be selected so drop that bit from the Kconfig text. Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Zheng Yongjun 提交于
Replace a comma between expression statements by a semicolon. Signed-off-by: NZheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Zheng Yongjun 提交于
Replace a comma between expression statements by a semicolon. Signed-off-by: NZheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Zheng Yongjun 提交于
Replace a comma between expression statements by a semicolon. Signed-off-by: NZheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Zheng Yongjun 提交于
Replace a comma between expression statements by a semicolon. Signed-off-by: NZheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Arnd Bergmann 提交于
The zte zx platform is getting removed, so this driver is no longer needed. Cc: Jun Nie <jun.nie@linaro.org> Cc: Shawn Guo <shawnguo@kernel.org> Signed-off-by: NArnd Bergmann <arnd@arndb.de> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Dmitry Osipenko 提交于
The GPIO bank wake interrupt setting was erroneously removed after conversion to gpio_irq_chip, thus the wake interrupt programming is broken now. Secondly, the wake_enb of the GPIO driver should be changed only after the successful toggling of the IRQ wake-state. Restore the wake interrupt setting and the programming order. Fixes: efcdca286eef ("gpio: tegra: Convert to gpio_irq_chip") Signed-off-by: NDmitry Osipenko <digetx@gmail.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Uwe Kleine-König 提交于
According to the reference manual "The PCA9505 is identical to the PCA9506 except that it includes 100 kΩ internal pull-up resistors on all the I/Os." So the pca9506 device can be considered identical to the pca9505 for the gpio driver. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Geert Uytterhoeven 提交于
Add support for the GPIO controller block in the R-Car V3U (R8A779A0) SoC, which is very similar to the block found on other R-Car Gen3 SoCs. However, this block has a new General Input Enable Register (INEN), whose reset state is to have all inputs disabled. Enable input for all available pins in probe and resume, to support the use of the General Input Register (INDT) for reading pin state at all times. This preserves backwards compatibility with other R-Car Gen3 SoCs, as recommended by the Hardware Manual. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Tested-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-