- 26 10月, 2020 1 次提交
-
-
由 Andy Shevchenko 提交于
Several places in the code are using same idiom, i.e. IS_ERR(desc) && PTR_ERR(desc) == -ENOENT which meaning is GPIO description is not found. For better readability extract gpiod_not_found() helper and use it. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 30 9月, 2020 2 次提交
-
-
由 Kent Gibson 提交于
Add support for setting debounce on a line via the GPIO uAPI. Where debounce is not supported by hardware, a software debounce is provided. The implementation of the software debouncer waits for the line to be stable for the debounce period before determining if a level change, and a corresponding edge event, has occurred. This provides maximum protection against glitches, but also introduces a debounce_period latency to edge events. The software debouncer is integrated with the edge detection as it utilises the line interrupt, and integration is simpler than getting the two to interwork. Where software debounce AND edge detection is required, the debouncer provides both. Signed-off-by: NKent Gibson <warthog618@gmail.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Kent Gibson 提交于
Add support for edge detection to lines requested using GPIO_V2_GET_LINE_IOCTL. The edge_detector implementation is based on the v1 lineevent implementation. Unlike the v1 implementation, an overflow of the event buffer results in discarding older events, rather than the most recent, so the final event in a burst will correspond to the current state of the line. Signed-off-by: NKent Gibson <warthog618@gmail.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 17 9月, 2020 1 次提交
-
-
由 Bartosz Golaszewski 提交于
It's possible for a GPIO chip to not have a parent device (whose properties we inspect for 'gpio-line-names'). In this case we should simply return from devprop_gpiochip_set_names(). Add an appropriate check for this use-case. Fixes: 7cba1a4d ("gpiolib: generalize devprop_gpiochip_set_names() for device properties") Reported-by: NAnders Roxell <anders.roxell@linaro.org> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: NAnders Roxell <anders.roxell@linaro.org> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
- 14 9月, 2020 3 次提交
-
-
由 Bartosz Golaszewski 提交于
Now that devprop_gpiochip_set_names() is only used in a single place inside drivers/gpio/gpiolib.c, there's no need anymore for it to be exported or to even live in its own source file. Pull this function into the core source file for gpiolib. Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Bartosz Golaszewski 提交于
devprop_gpiochip_set_names() is overly complicated with taking the fwnode argument (which requires using dev_fwnode() & of_fwnode_handle() in ACPI and OF GPIO code respectively). Let's just switch to using the generic device properties. This allows us to pull the code setting line names directly into gpiochip_add_data_with_key() instead of handling it separately for ACPI and OF. Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Bartosz Golaszewski 提交于
We don't need to specify any ranges when allocating IDs so we can switch to ida_alloc() and ida_free() instead of the ida_simple_ counterparts. ida_simple_get(ida, 0, 0, gfp) is equivalent to ida_alloc_range(ida, 0, UINT_MAX, gfp) which is equivalent to ida_alloc(ida, gfp). Note: IDR will never actually allocate an ID larger than INT_MAX. Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
- 11 9月, 2020 1 次提交
-
-
由 Andy Shevchenko 提交于
Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 12 7月, 2020 2 次提交
-
-
由 Kent Gibson 提交于
Replace usage of atomic_notifier_call_chain with blocking_notifier_call_chain as the notifier function, lineinfo_changed_notify, calls gpio_desc_to_lineinfo, which calls pinctrl_gpio_can_use_line, which can sleep. The chain isn't being called from an atomic context so the the blocking notifier is a suitable substitute. Signed-off-by: NKent Gibson <warthog618@gmail.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Kent Gibson 提交于
Move gpiolib-sysfs function declarations into their own header. These functions are in gpiolib-sysfs.c, and are only required by gpiolib.c, and so should be in a module header, not gpiolib.h. This brings gpiolib-sysfs into line with gpiolib-cdev, and is another step towards removing the sysfs inferface. Signed-off-by: NKent Gibson <warthog618@gmail.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 30 6月, 2020 1 次提交
-
-
由 Andy Shevchenko 提交于
bitmap_full() is a shortcut to find_first_zero_bit(). Thus, no need to call it twice. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 21 6月, 2020 1 次提交
-
-
由 Kent Gibson 提交于
Split the cdev specific functionality out of gpiolib.c and into gpiolib-cdev.c. This improves the readability and maintainability of both the cdev and core gpiolib code. Suggested-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: NKent Gibson <warthog618@gmail.com> Link: https://lore.kernel.org/r/20200616093615.5167-1-warthog618@gmail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 03 6月, 2020 1 次提交
-
-
由 Michael Walle 提交于
The function connects an IRQ domain to a gpiochip and reuses gpiochip_to_irq() which is provided by gpiolib. gpiochip_irqchip_* and regmap_irq partially provide the same functionality. This function will help to connect just the minimal functionality of the gpiochip_irqchip which is needed to work together with regmap-irq. Signed-off-by: NMichael Walle <michael@walle.cc> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20200528145845.31436-2-michael@walle.ccSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 29 5月, 2020 2 次提交
-
-
由 Linus Walleij 提交于
We provided the right semantics on open drain lines being by definition output but incidentally the irq set up function would only allow IRQs on lines that were "not output". Fix the semantics to allow output open drain lines to be used for IRQs. Reported-by: NHans Verkuil <hverkuil@xs4all.nl> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl> Tested-by: NHans Verkuil <hverkuil@xs4all.nl> Cc: Russell King <linux@armlinux.org.uk> Cc: stable@vger.kernel.org # v5.3+ Link: https://lore.kernel.org/r/20200527140758.162280-1-linus.walleij@linaro.orgSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Maulik Shah 提交于
With 'commit 461c1a7d ("gpiolib: override irq_enable/disable")' gpiolib overrides irqchip's irq_enable and irq_disable callbacks. If irq_disable callback is implemented then genirq takes unlazy path to disable irq. Underlying irqchip may not want to implement irq_disable callback to lazy disable irq when client drivers invokes disable_irq(). By overriding irq_disable callback, gpiolib ends up always unlazy disabling IRQ. Allow gpiolib to lazy disable IRQs by overriding irq_disable callback only if irqchip implemented irq_disable. In cases where irq_disable is not implemented irq_mask is overridden. Similarly override irq_enable callback only if irqchip implemented irq_enable otherwise irq_unmask is overridden. Fixes: 461c1a7d ("gpiolib: override irq_enable/disable") Signed-off-by: NMaulik Shah <mkshah@codeaurora.org> Tested-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Link: https://lore.kernel.org/r/1590253873-11556-2-git-send-email-mkshah@codeaurora.orgSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 27 5月, 2020 1 次提交
-
-
由 Andy Shevchenko 提交于
We already have two conditionals inside the outer one to check if the command is GPIO_GET_LINEINFO_WATCH_IOCTL. I think it's time to actually do what I have proposed in the first place, i.e. to separate GPIO_GET_LINEINFO_WATCH_IOCTL from GPIO_GET_LINEINFO_IOCTL. It's +13 LOCs, and surprisingly only +13 bytes of binary on x86_32, but for the price of much better readability. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Link: https://lore.kernel.org/r/20200525194028.74236-1-andriy.shevchenko@linux.intel.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 18 5月, 2020 1 次提交
-
-
由 Geert Uytterhoeven 提交于
Currently a GPIO lookup table can only refer to a specific GPIO by a tuple, consisting of a GPIO controller label and a GPIO offset inside the controller. However, a GPIO may also carry a line name, defined by DT or ACPI. If present, the line name is the most use-centric way to refer to a GPIO. Hence add support for looking up GPIOs by line name. Note that there is no guarantee that GPIO line names are globally unique, so this will use the first match found. Implement this by reusing the existing gpiod_lookup infrastructure. Rename gpiod_lookup.chip_label to gpiod_lookup.key, to make it clear that this field can have two meanings, and update the kerneldoc and GPIO_LOOKUP*() macros. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Tested-by: NEugeniu Rosca <erosca@de.adit-jv.com> Reviewed-by: NUlrich Hecht <uli+renesas@fpond.eu> Reviewed-by: NEugeniu Rosca <erosca@de.adit-jv.com> Link: https://lore.kernel.org/r/20200511145257.22970-4-geert+renesas@glider.beSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 16 5月, 2020 1 次提交
-
-
由 Geert Uytterhoeven 提交于
gpiochip_set_desc_names() no longer rejects GPIO line name collisions. Hence GPIO line names are not guaranteed to be globally unique. In case of multiple GPIO lines with the same name, gpio_name_to_desc() will return the first match found. Update the comments for gpio_name_to_desc() and gpiochip_set_desc_names() to match reality. Fixes: f881bab0 ("gpio: keep the GPIO line names internal") Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20200511101828.30046-1-geert+renesas@glider.beSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 13 5月, 2020 1 次提交
-
-
由 Bartosz Golaszewski 提交于
Currently we emit the REQUESTED line state event after the line is requested but before the flags are configured. This is obviously wrong as we want to pass the updated lineinfo to user-space together with the event. Since the flags can be configured in different ways depending on how the line is being requested - we need to call the notifier chain in different places separately. Fixes: 51c1064e ("gpiolib: add new ioctl() for monitoring changes in line info") Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 28 4月, 2020 2 次提交
-
-
由 David Gow 提交于
The symbol 'gpio_of_notifier' doesn't exist without both CONFIG_OF_GPIO and CONFIG_OF_DYNAMIC enabled, but is referenced when only CONFIG_OF_DYNAMIC is enabled. This broke building with 'make ARCH=um allyesconfig': --------------- /usr/bin/ld: drivers/gpio/gpiolib.o: in function `gpiolib_dev_init': ./drivers/gpio/gpiolib.c:5293: undefined reference to `gpio_of_notifier' collect2: error: ld returned 1 exit status --------------- Fixes: 63636d95 ("gpio: of: Add DT overlay support for GPIO hogs") Signed-off-by: NDavid Gow <davidgow@google.com> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20200425044655.166257-1-davidgow@google.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Geert Uytterhoeven 提交于
Simplify the printing of kernel messages and make the messages more accurate by using the most appropriate {dev,chip,gpiod}_*() helpers. Sample impact: -gpiochip_setup_dev: registered GPIOs 496 to 511 on device: gpiochip0 (e6050000.gpio) +gpio gpiochip0: registered GPIOs 496 to 511 on e6050000.gpio -no flags found for gpios +gpio-953 (?): no flags found for gpios -GPIO line 355 (PCIE/SATA switch) hogged as output/low +gpio-355 (PCIE/SATA switch): hogged as output/low Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20200424141432.11400-1-geert+renesas@glider.beSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 23 4月, 2020 2 次提交
-
-
由 Bartosz Golaszewski 提交于
We must not call pinctrl_gpio_can_use_line() with the gpio_lock taken as it takes a mutex internally. Let's move the call before taking the spinlock and store the return value. This isn't perfect - there's a moment between calling pinctrl_gpio_can_use_line() and taking the spinlock where the situation can change but it isn't a regression either: previously this part wasn't protected at all and it only affects the information user-space is seeing. Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org> Fixes: d2ac2579 ("gpiolib: provide a dedicated function for setting lineinfo") Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Bartosz Golaszewski 提交于
This makes the new ioctl() a bit more robust - we now check if a line is already being watched and return -EBUSY if the user-space tries to start watching it again. Same for unwatch - return -EBUSY if user-space tries to unwatch a line that's not being watched. Fixes: 51c1064e ("gpiolib: add new ioctl() for monitoring changes in line info") Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 01 4月, 2020 1 次提交
-
-
由 Linus Walleij 提交于
There is struct gpio *gc, *chip and *gpiochip, and yes I am responsible for some of the inconsistencies. I want this to be just gc everywhere for minimizing cognitive resistance when reading the code: more compact function signatures and less clutter. Purely syntactic changes intended. No semantic effects. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20200329140405.52276-1-linus.walleij@linaro.orgSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 31 3月, 2020 1 次提交
-
-
由 Thierry Reding 提交于
Do not use the struct gpio_device's .pin_ranges field if the PINCTRL Kconfig symbol is not selected to avoid build failures. Fixes: 2ab73c6d ("gpio: Support GPIO controllers without pin-ranges") Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Reported-by: Nkbuild test robot <lkp@intel.com> Signed-off-by: NThierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20200330090257.2332864-1-thierry.reding@gmail.comReviewed-by: NGeert Uytterhoeven <geert@linux-m68k.org> Tested-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 28 3月, 2020 4 次提交
-
-
由 Geert Uytterhoeven 提交于
gpio_set_bias() no longer uses the passed gpio_chip pointer parameter. Remove it. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20200325100439.14000-3-geert+renesas@glider.beSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Geert Uytterhoeven 提交于
All callers of gpio_set_config() have to convert a gpio_desc to a gpio_chip and offset. Avoid these duplicated conversion steps by letting gpio_set_config() take a gpio_desc pointer directly. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20200325100439.14000-2-geert+renesas@glider.beSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Geert Uytterhoeven 提交于
The GPIO Aggregator will need a method to forward a .set_config() call to its parent gpiochip. This requires obtaining the gpio_chip and offset for a given gpio_desc. While gpiod_to_chip() is public, gpio_chip_hwgpio() is not, so there is currently no method to obtain the needed GPIO offset parameter. Hence introduce a public gpiod_set_config() helper, which invokes the .set_config() callback through a gpio_desc pointer, like is done for most other gpio_chip callbacks. Rewrite the existing gpiod_set_debounce() helper as a wrapper around gpiod_set_config(), to avoid duplication. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20200324135653.6676-5-geert+renesas@glider.beSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Mauro Carvalho Chehab 提交于
Use a different markup for the ERR_PTR, as %FOO doesn't work if there are parenthesis. So, use, instead: ``ERR_PTR(-EINVAL)`` This fixes the following warning: ./drivers/gpio/gpiolib.c:139: WARNING: Inline literal start-string without end-string. Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/51197e3568f073e22c280f0584bfa20b44436708.1584456635.git.mchehab+huawei@kernel.orgReviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 27 3月, 2020 1 次提交
-
-
由 Thierry Reding 提交于
Wake gpiochip_generic_request() call into the pinctrl helpers only if a GPIO controller had any pin-ranges assigned to it. This allows a driver to unconditionally use this helper if it supports multiple devices of which only a subset have pin-ranges assigned to them. Signed-off-by: NThierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20200319122737.3063291-2-thierry.reding@gmail.comTested-by: NVidya Sagar <vidyas@nvidia.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 25 3月, 2020 1 次提交
-
-
由 Michał Mirosław 提交于
Since name == NULL can't ever match, move the check out of IRQ-disabled region. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 20 3月, 2020 1 次提交
-
-
由 Linus Walleij 提交于
These two devres functions devm_gpiochip_[add|remove]() were in the wrong file. They should be in gpiolib-devres.c not gpiolib.c. Link: https://lore.kernel.org/r/20200313081522.35143-1-linus.walleij@linaro.orgReviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 11 3月, 2020 1 次提交
-
-
由 Linus Walleij 提交于
The implementation if .irq_disable() which kicks in between the gpiolib and the driver is not properly mimicking the expected semantics of the irqchip core: the irqchip will call .irq_disable() if that exists, else it will call mask_irq() which first checks if .irq_mask() is defined before calling it. Since we are calling it unconditionally, we get this bug from drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c, as it only defines .irq_mask_ack and not .irq_mask: Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = (ptrval) (...) PC is at 0x0 LR is at gpiochip_irq_disable+0x20/0x30 Fix this by only calling .irq_mask() if it exists. Cc: Brian Masney <masneyb@onstation.org> Cc: Hans Verkuil <hans.verkuil@cisco.com> Cc: stable@vger.kernel.org Reviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Fixes: 461c1a7d ("gpiolib: override irq_enable/disable") Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20200306132326.1329640-1-linus.walleij@linaro.org
-
- 03 3月, 2020 1 次提交
-
-
由 Geert Uytterhoeven 提交于
The optimization to check for requested lines actually optimized for the uncomon error case, where one of the GPIO lines is still in use. Hence the error message must be printed when the loop is terminated early, not when it went through all available GPIO lines. Fixes: 869233f8 ("gpiolib: Optimize gpiochip_remove() when check for requested line") Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20200302082448.11795-1-geert+renesas@glider.beAcked-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 02 3月, 2020 3 次提交
-
-
由 Bartosz Golaszewski 提交于
When operating on the bits of watched_lines bitmap, we're using desc_to_gpio() which returns the GPIO number from the global numberspace. This leads to all sorts of memory corruptions and invalid behavior. We should switch to using gpio_chip_hwgpio() instead. Fixes: 51c1064e ("gpiolib: add new ioctl() for monitoring changes in line info") Reported-by: NKent Gibson <warthog618@gmail.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Tested-by: NKent Gibson <warthog618@gmail.com>
-
由 Kent Gibson 提交于
Fix the field having a bit cleared by the unwatch ioctl(). Fixes: 51c1064e ("gpiolib: add new ioctl() for monitoring changes in line info") Signed-off-by: NKent Gibson <warthog618@gmail.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Andy Shevchenko 提交于
Rename 'event' to 'ge' to be consistent with other use. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 29 2月, 2020 1 次提交
-
-
由 Andy Shevchenko 提交于
Here are the following optimizations have been done: - break the loop after first found requested line - due to above, drop redundant boolean variable - replace open coded variant of gpiochip_is_requested() - due to above, drop redundant pointer to struct gpio_desc - use 'unsigned int' instead of 'unsigned' for loop counter Note, pointer to struct gpio_chip followed by pointer to struct gpio_device is still valid, back link is not. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200225114725.839-1-andriy.shevchenko@linux.intel.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 25 2月, 2020 1 次提交
-
-
由 Marco Felsch 提交于
The function was currently used internal by the gpiolib. Since commit 56cc3af4 ("pinctrl: da9062: add driver support") it is also used by drivers so we need to export the symbol. Signed-off-by: NMarco Felsch <m.felsch@pengutronix.de> Link: https://lore.kernel.org/r/20200225093102.10964-1-m.felsch@pengutronix.deSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 22 2月, 2020 1 次提交
-
-
由 Geert Uytterhoeven 提交于
As GPIO hogs are configured at GPIO controller initialization time, adding/removing GPIO hogs in DT overlays does not work. Add support for GPIO hogs described in DT overlays by registering an OF reconfiguration notifier, to handle the addition and removal of GPIO hog subnodes to/from a GPIO controller device node. Note that when a GPIO hog device node is being removed, its "gpios" properties is no longer available, so we have to keep track of which node a hog belongs to, which is done by adding a pointer to the hog's device node to struct gpio_desc. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20200220130149.26283-3-geert+renesas@glider.beReviewed-by: NFrank Rowand <frank.rowand@sony.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-