- 20 2月, 2019 8 次提交
-
-
由 Geert Uytterhoeven 提交于
Implement the irq_set_wake() method in the (optional) irq_chip of the GPIO expander, and propagate wake-up settings to the upstream interrupt controller. This allows GPIOs connected to a PCA953X GPIO expander to serve as wake-up sources. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Linus Walleij 提交于
This patch hunk is a lightly modified version of a diff found in a Tegra code dump from a product tree. It makes a lot of sense because this is what most drivers do. Cc: Thierry Reding <treding@nvidia.com> Cc: Stefan Agner <stefan@agner.ch> Cc: Dmitry Osipenko <digetx@gmail.com> Cc: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bartosz Golaszewski 提交于
Modify the way the debugfs interface works in gpio-mockup. Introduce the concept of dummy pull config which will keep the mockup lines in known state. The pull values can be modified by writing to the debugfs files corresponding to lines. Lines in input mode always report the current pull value, lines in output mode change the line value but it will revert back to the one specified by current pull when released. Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Bartosz Golaszewski 提交于
The unlocked variants only get called from places where we already have the pointer to the underlying gpio_mockup_chip structure, so take it as parameter instead of struct gpio_chip. Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Bartosz Golaszewski 提交于
This field can never be negative. Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Bartosz Golaszewski 提交于
User-space tests no longer use it and we're breaking the interface anyway. Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Bartosz Golaszewski 提交于
We already support set_multiple(). Implement get_multiple() as well. Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Bartosz Golaszewski 提交于
While no user reported any race condition problems with gpio-mockup, let's be on the safe side and use a mutex when performing any changes on the dummy chip structures. Suggested-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 18 2月, 2019 1 次提交
-
-
由 Marek Vasut 提交于
Since commit d6cd33ad ("regulator: gpio: Convert to use descriptors") the GPIO regulator had inverted the polarity of the control GPIO. This problem manifested itself on systems with DT containing the following description (snippet from salvator-common.dtsi): gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>; gpios-states = <1>; states = <3300000 1 1800000 0>; Prior to the aforementioned commit, the gpio-regulator code used gpio_request_array() to claim the GPIO(s) specified in the "gpios" DT node, while the commit changed that to devm_gpiod_get_index(). The legacy gpio_request_array() calls gpio_request_one() and then gpiod_request(), which parses the DT flags of the "gpios" node and populates the GPIO descriptor flags field accordingly. The new devm_gpiod_get_index() calls gpiod_get_index(), then of_find_gpio(), of_get_named_gpiod_flags() with flags != NULL, and then of_gpio_flags_quirks(). Since commit a603a2b8 ("gpio: of: Add special quirk to parse regulator flags"), of_gpio_flags_quirks() contains a quirk for regulator-gpio which was never triggered by the legacy gpio_request_array() code path, but is triggered by devm_gpiod_get_index() code path. This quirk checks whether a GPIO is associated with a fixed or gpio-regulator and if so, checks two additional conditions. First, whether such GPIO is active-low, and if so, ignores the active-low flag. Second, whether the regulator DT node does have an "enable-active-high" property and if the property is NOT present, sets the GPIO flags as active-low. The second check triggers a problem, since it is applied to all GPIOs associated with a gpio-regulator, rather than only on the "enable" GPIOs, as the old code did. This changes the way the gpio-regulator interprets the DT description of the control GPIOs. The old code using gpio_request_array() explicitly parsed the "enable-active-high" DT property and only applied it to the GPIOs described in the "enable-gpios" DT node, and only if those were present. This patch fixes the quirk code by only applying the quirk to "enable-gpios", thus restoring the old behavior. Signed-off-by: NMarek Vasut <marek.vasut+renesas@gmail.com> Cc: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Jan Kotas <jank@cadence.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Mark Brown <broonie@kernel.org> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com> Cc: linux-renesas-soc@vger.kernel.org To: linux-gpio@vger.kernel.org Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 14 2月, 2019 6 次提交
-
-
由 Axel Lin 提交于
Change the coding style to make it does error checking first. This also fixes checkpatch warning about line over 80 characters. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Tested by: Thor Thayer <thor.thayer@linux.intel.com> Reviewed by: Thor Thayer <thor.thayer@linux.intel.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Thierry Reding 提交于
The new prefix allows the GPIOs to be uniquely identified on a per-chip basis, which makes it easier to distinguish Tegra186 specific GPIOs from those of later chips such as Tegra194 which supports a very different set of GPIOs. Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Charles Keepax 提交于
madera_gpio_chip is only used as a template so it can be marked as const. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Thomas Petazzoni 提交于
The NXP PCAL6416, documented at [1], is a variant of the PCA GPIO expander with 16 GPIOs, and supporting an interrupt and the "extended" features for interrupt, pull-up/pull-down configuration, etc. [1] https://www.nxp.com/docs/en/data-sheet/PCAL6416A.pdfSigned-off-by: NThomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Brian Masney 提交于
Select IRQ_DOMAIN_HIERARCHY for pmic-arb in Kconfig since this driver uses the version 2 IRQ interfaces. IRQ_DOMAIN_HIERARCHY selects IRQ_DOMAIN, so it can be removed from here. Signed-off-by: NBrian Masney <masneyb@onstation.org> Reported-by: NRandy Dunlap <rdunlap@infradead.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Geert Uytterhoeven 提交于
Unlike gpio_rcar_irq_set_wake(), which this solution was based on, pcf857x_irq_set_wake() does not need to do anything else than calling irq_set_irq_wake() for the upstream interrupt controller. Hence there is no reason for making this call conditional, and no longer a need for keeping a copy of the interrupt number that also serves as a flag. Just propagate irq_set_irq_wake() to the upstream interrupt controller, using the original interrupt number. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 13 2月, 2019 7 次提交
-
-
由 Gustavo A. R. Silva 提交于
Fix the following warning by adding a missing break: drivers/gpio/gpio-eic-sprd.c: In function ‘sprd_eic_irq_set_type’: drivers/gpio/gpio-eic-sprd.c:403:3: warning: this statement may fall through [-Wimplicit-fallthrough=] switch (flow_type) { ^~~~~~ drivers/gpio/gpio-eic-sprd.c:435:2: note: here default: ^~~~~~~ This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com> Reviewed-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thomas Petazzoni 提交于
The Zynq GPIO driver currently implements runtime PM by: - Enabling runtime PM support in ->probe() and letting the runtime PM reference counter drop to zero at the end of ->probe(). - Increasing the runtime PM reference counter in ->request() and decreasing it in ->free(). However, the latter is not sufficient: when a GPIO is used as an interrupt, ->request() and ->free() are not called. Due to this, the runtime PM counter remains to zero when the only GPIOs in use are used as interrupts, causing them to simply not work. To address this problem, this commit implement the ->irq_request_resources() and ->irq_release_resources() hooks, ensuring that the runtime PM counter is properly incremented/decremented. Since we override the default hooks, we keep the existing behavior by making sure they call gpiochip_reqres_irq() / gpiochip_relres_irq() respectively. Signed-off-by: NThomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: NShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bjorn Andersson 提交于
GPIOs on the SPMI PMIC are numbered 1..ngpio, so the boundary check in pmic_gpio_domain_translate() is off by one, correct this. Fixes: ca69e2d1 ("qcom: spmi-gpio: add support for hierarchical IRQ chip") Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thomas Petazzoni 提交于
This commit adds a minimal implementation of the ->set_config() hook, with support for the PIN_CONFIG_BIAS_PULL_UP and PIN_CONFIG_BIAS_PULL_DOWN configurations. Signed-off-by: NThomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thomas Petazzoni 提交于
This commit adds support for configuring the pull-up and pull-down resistors available in some GPIO controllers. While configuring pull-up/pull-down is already possible through the pinctrl subsystem, some GPIO controllers, especially simple ones such as GPIO expanders on I2C, don't have any pinmuxing capability and therefore do not use the pinctrl subsystem. This commit implements the GPIO_PULL_UP and GPIO_PULL_DOWN flags, which can be used from the Device Tree, to enable a pull-up or pull-down resistor on a given GPIO. The flag is simply propagated all the way to the core GPIO subsystem, where it is used to call the gpio_chip ->set_config callback with the appropriate existing PIN_CONFIG_BIAS_* values. Signed-off-by: NThomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thomas Petazzoni 提交于
As suggested by Linus Walleij, let's use the new gpio_set_config() helper in gpiod_set_debounce() and gpiod_set_transitory(). Signed-off-by: NThomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Thomas Petazzoni 提交于
This commit simply renames gpio_set_drive_single_ended() to gpio_set_config(), as the function is not specific to setting the GPIO drive type, and will be used for other purposes in followup commits. In addition, it moves the function above gpiod_direction_input(), as it will be used from gpiod_direction_input(). Signed-off-by: NThomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 09 2月, 2019 5 次提交
-
-
由 Brian Masney 提交于
Validation of the IRQ type was added to spmi pmic-arb, however spmi-mpp in device tree still uses IRQ_TYPE_NONE. This commit caused the spmi-mpp probe to fail since platform_irq_count() would return 0. Correct this by backing out the previous patch. Signed-off-by: NBrian Masney <masneyb@onstation.org> Fixes: 135ef21a ("spmi: pmic-arb: validate type when mapping IRQ") Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Nikolaus Voss 提交于
Interupts were generated using GPIN interrupts of ADP5588. These interrupts have two important limitations: 1. Interrupts can only be generated for either rising or falling edges but not both. 2. Interrupts are reasserted as long as the interrupt condition persists (i.e. high or low level on that GPIN). This generates lots of interrupts unless the event is very short. To overcome this, ADP5588 provides an event system which queues up to 10 events in a buffer. GPIN events are queued whenever the GPIN is asserted or deasserted. This makes it possible to support generating GPIN interrupts for both edges and to generate only one interrupt per state change. Thus it is possible to chain the gpio-keys driver for some GPIOs. Signed-off-by: NNikolaus Voss <nikolaus.voss@loewensteinmedical.de> Acked-by: NMichael Hennerich <michael.hennerich@analog.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Nikolaus Voss 提交于
Make platform data optional and add DT id table. Switch to dynamically mapped GPIOs and IRQs if not provided via platform data. Signed-off-by: NNikolaus Voss <nikolaus.voss@loewensteinmedical.de> Acked-by: NMichael Hennerich <michael.hennerich@analog.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Wei Yongjun 提交于
It's not necessary to remove gpio_chip which added with devm_gpiochip_add_data(). Fixes: b868db94 ("gpio: tqmx86: Add GPIO from for this IO controller") Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Reviewed-by: NAndrew Lunn <andrew@lunn.ch> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Linus Walleij 提交于
This adds a driver for Gateworks PLD GPIO, that exist in two instances on the Gateworks Cambria GW2358-4 router platform at least. Cc: Imre Kaloz <kaloz@openwrt.org> Cc: Tim Harvey <tharvey@gateworks.com> Reviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 08 2月, 2019 12 次提交
-
-
由 Andy Shevchenko 提交于
Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
-
由 Andy Shevchenko 提交于
In some cases the indentation is inconsistent. Fix it accordingly. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
Sort header block alphabetically for easy maintenance. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
Sort header block alphabetically for easy maintenance. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
Sort header block alphabetically for easy maintenance. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
-
由 Andy Shevchenko 提交于
There is no need to check for non-zero pending since for_each_set_bit() does it on the first iteration. While here, drop redundant assignment. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
The type of to_reg() is unsigned int while it might return a negative error code. Callers are also expecting a signed type. For sake of type consistency replace unsigned int with plain int. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
This simplifies and standardizes the AB IRQ handler by using the for_each_set_bit() library function. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
-
由 Arun Parameswaran 提交于
Fixes the issues with non BCM58XX chips in the b53 driver failing, when the irq is not specified in the device tree. Removed the check for BCM58XX in b53_srab_prepare_irq(), so the 'port->irq' will be set to '-EXIO' if the irq is not specified in the device tree. Fixes: 16994374 ("net: dsa: b53: Make SRAB driver manage port interrupts") Fixes: b2ddc48a ("net: dsa: b53: Do not fail when IRQ are not initialized") Signed-off-by: NArun Parameswaran <arun.parameswaran@broadcom.com> Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Hangbin Liu 提交于
When we add a new GENEVE device with IPv6 remote, checking only for IS_ENABLED(CONFIG_IPV6) is not enough as we may disable IPv6 in the kernel command line (ipv6.disable=1), and calling rt6_lookup() would cause a NULL pointer dereference. v2: - don't mix declarations and code (reported by Stefano Brivio, Eric Dumazet) - there's no need to use in6_dev_get() as we only need to check that idev exists (reported by David Ahern). This is under RTNL, so we can simply use __in6_dev_get() instead (Stefano, Eric). Reported-by: NJianlin Shi <jishi@redhat.com> Fixes: c40e89fd ("geneve: configure MTU based on a lower device") Cc: Alexey Kodanev <alexey.kodanev@oracle.com> Signed-off-by: NHangbin Liu <liuhangbin@gmail.com> Reviewed-by: NStefano Brivio <sbrivio@redhat.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 07 2月, 2019 1 次提交
-
-
由 Erik Schmauss 提交于
There was a divergence between Linux and ACPICA on the definition of ACPI_DEBUG_DEFAULT. This divergence was solved by taking ACPICA's definition in 4c1379d7. After resolving the divergence, it was clear that Linux users wanted to use their old set of debug flags. This change fixes the divergence by setting these debug flags during acpi_early_init() rather than during global variable initialization in acpixf.h (owned by ACPICA). Fixes: 4c1379d7 ("ACPICA: Debug output: Add option to display method/object evaluation") Reported-by: NMichael J Ruhl <michael.j.ruhl@intel.com> Reported-by: NAlex Gagniuc <Alex_Gagniuc@Dellteam.com> Signed-off-by: NErik Schmauss <erik.schmauss@intel.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-