- 16 11月, 2020 18 次提交
-
-
由 Andy Shevchenko 提交于
We may use BIT() macro to increase readability in acpi_gpio_adr_space_handler(). Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
As specified by ACPI the pin index is 16-bit unsigned integer. Define the variable, which holds it, accordingly. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
It appears that we are using similar code excerpts for ACPI OpRegion and event handling. Deduplicate those excerpts by extracting a new acpi_request_own_gpiod() helper. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
GpioInt() implies input configuration of the pin. Add this to the acpi_gpio_to_gpiod_flags() and make usable for GpioInt(). Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
GpioIo() resources don't contain an initial value for the output pin. Therefore instead of deducting its value solely based on bias field we should deduce that value from the polarity and the bias fields. Typical scenario is, when pin is defined in the table and its polarity, specified in _DSD or via platform code, is defined as active low, in the following call chain: -> acpi_populate_gpio_lookup() -> acpi_gpio_to_gpiod_flags() it will return GPIOD_OUT_HIGH if bias is set no matter if polarity is GPIO_ACTIVE_LOW, so it will return the current level instead of the logical level. Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: NVasile-Laurentiu Stanimir <vasile-laurentiu.stanimir@windriver.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
Move acpi_gpio_to_gpiod_flags() upper in the code to allow further refactoring. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
Mika noticed that some code is run under mutex when it doesn't require the lock, like an error code assignment. Move non-critical code outside of critical section. Suggested-by: NMika Westerberg <mika.westerberg@linux.intel.com> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
We didn't take into account the debounce settings supplied by ACPI. This change is targeting the mentioned gap. Reported-by: NCoiby Xu <coiby.xu@gmail.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
Use named item instead of plain integer for enum gpiod_flags to make it clear that even 0 has its own meaning. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
In some cases the GpioInt() resource is coming with bias settings which may affect system functioning. Respect bias settings for GpioInt() resource by calling acpi_gpio_update_gpiod_*flags() API in acpi_dev_gpio_irq_get(). Reported-by: NJamie McClymont <jamie@kwiius.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
In some cases we would like to have debounce setter which doesn't fail when a feature is not supported by a controller. Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com>
-
由 Andy Shevchenko 提交于
This function is useful for internal use in the GPIO library. There will be new user coming, prepare a helper for the new comer and the existing ones. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
Move bias related code from gpio_set_config() to gpio_set_bias(). Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
In the future we will need to have a separate function that takes an arbitrary argument value. Extract gpio_set_config_with_argument() for that purpose. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
Instead of open coded macro use, call pinconf_to_config_packed(). Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
It's no difference in the functionality, but after the change the code is less error prone to various checkers. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
Replace unsigned by unsigned int in GPIO library code. Note, legacy API left untouched. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
intel-pinctrl for v5.10-2 * Respect bias setting when comes from ACPI The following is an automated git shortlog grouped by driver: intel: - Set default bias in case no particular value given - Fix 2 kOhm bias which is 833 Ohm
-
- 12 11月, 2020 1 次提交
-
-
由 Linus Walleij 提交于
-
- 11 11月, 2020 1 次提交
-
-
由 Damien Le Moal 提交于
Fix the check on the number of IRQs to allow up to the maximum (32) instead of only the maximum minus one. Fixes: 96868dce ("gpio/sifive: Add GPIO driver for SiFive SoCs") Cc: stable@vger.kernel.org Signed-off-by: NDamien Le Moal <damien.lemoal@wdc.com> Link: https://lore.kernel.org/r/20201107081420.60325-10-damien.lemoal@wdc.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 10 11月, 2020 1 次提交
-
-
由 Linus Walleij 提交于
Merge tag 'gpio-fixes-for-v5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes gpio fixes for v5.10-rc3 - fix missing conversion to gpiolib irqchip in gpio-dwapb - fix bank properties for ast2600 variant in gpio-aspeed - make sysfs work again when the character device is disabled - fix interrupt handling in gpio-pcie-idio-24
-
- 06 11月, 2020 3 次提交
-
-
由 Arnaud de Turckheim 提交于
This enables the PEX8311 internal PCI wire interrupt and the PEX8311 local interrupt input so the local interrupts are forwarded to the PCI. Fixes: 58556204 ("gpio: Add GPIO support for the ACCES PCIe-IDIO-24 family") Cc: stable@vger.kernel.org Signed-off-by: NArnaud de Turckheim <quarium@gmail.com> Reviewed-by: NWilliam Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Arnaud de Turckheim 提交于
This fixes the COS Enable Register value for enabling/disabling the corresponding IRQs bank. Fixes: 58556204 ("gpio: Add GPIO support for the ACCES PCIe-IDIO-24 family") Cc: stable@vger.kernel.org Signed-off-by: NArnaud de Turckheim <quarium@gmail.com> Reviewed-by: NWilliam Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Arnaud de Turckheim 提交于
Fix the bitwise operation to remove only the corresponding bit from the mask. Fixes: 58556204 ("gpio: Add GPIO support for the ACCES PCIe-IDIO-24 family") Cc: stable@vger.kernel.org Signed-off-by: NArnaud de Turckheim <quarium@gmail.com> Reviewed-by: NWilliam Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 05 11月, 2020 1 次提交
-
-
由 Kent Gibson 提交于
In gpiochip_setup_dev() the call to gpiolib_cdev_register() indirectly calls device_add(). This is still required for the sysfs even when CONFIG_GPIO_CDEV is not selected in the build. Replace the stubbed functions in gpiolib-cdev.h with macros in gpiolib.c that perform the required device_add() and device_del() when CONFIG_GPIO_CDEV is not selected. Fixes: d143493c (gpiolib: make cdev a build option) Reported-by: NNicolas Schichan <nschichan@freebox.fr> Signed-off-by: NKent Gibson <warthog618@gmail.com> Tested-by: NNicolas Schichan <nschichan@freebox.fr> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
- 29 10月, 2020 1 次提交
-
-
由 Deepak R Varma 提交于
Address code indentation warning messages by checkpatch script. Combine split function parameters on one line. This also resolves the "use tabs instead of space" warning by checkpatch script. Signed-off-by: NDeepak R Varma <mh12gx2825@gmail.com> Link: https://lore.kernel.org/r/20201013190212.GA85788@ubuntu204Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 28 10月, 2020 10 次提交
-
-
由 Tony Lindgren 提交于
This reverts commit 579ced8f. Turns out I was overly optimistic about cpu_pm blocking idle being a solution for handling edge interrupts. While it helps in preventing entering idle states that potentially lose context, we can still get an edge interrupt triggering while entering idle. So we need to also add back the workaround for seeing if there are any pending edge interrupts when waking up. Signed-off-by: NTony Lindgren <tony@atomide.com> Cc: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: Grygorii Strashko <grygorii.strashko@ti.com> Cc: Keerthy <j-keerthy@ti.com> Cc: Ladislav Michl <ladis@linux-mips.org> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com> Cc: Russell King <rmk+kernel@armlinux.org.uk> Cc: Tero Kristo <t-kristo@ti.com> Link: https://lore.kernel.org/r/20201028060556.56038-1-tony@atomide.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Linus Walleij 提交于
We actually handle the gpio_irq_chip set-up properly now despite what the comment says. Also assign this pointer along with the rest of the gpio_irq_chip setup code. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20201019134429.65563-1-linus.walleij@linaro.org
-
由 Linus Walleij 提交于
Now that all gpiolib irqchip users have been over to use the irqchip template, we can finally retire the old code path and leave just one way in to the irqchip: set up the template when registering the gpio_chip. For a while we had two code paths for this which was a bit confusing. This brings this work to a conclusion, there is now one way of doing this. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Cc: Thierry Reding <thierry.reding@gmail.com> Link: https://lore.kernel.org/r/20201019134046.65101-1-linus.walleij@linaro.org
-
由 Andy Shevchenko 提交于
Use the new compat_need_64bit_alignment_fixup() helper to avoid ugly ifdeffery in IOCTL compatibility code. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: NKent Gibson <warthog618@gmail.com> Depends-on: 527c4125 ("compat: add a compat_need_64bit_alignment_fixup() helper") Link: https://lore.kernel.org/r/20201014103315.82662-1-andriy.shevchenko@linux.intel.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Andy Shevchenko 提交于
First of all, bias has a special type as being a part of enum pin_config_param. Second, 0 is also defined bias which is equivalent to BUS_HOLD. Taking into account above, change type of bias variable and refactor gpio_set_bias() in a way that it doesn't use BUS_HOLD as a place holder. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20201009184359.16427-1-andriy.shevchenko@linux.intel.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Kent Gibson 提交于
Clarify that a char array containing a string is considered 'empty' if the first character is the null terminator. The remaining characters are not relevant to this determination. Signed-off-by: NKent Gibson <warthog618@gmail.com> Reviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20201005070329.21055-6-warthog618@gmail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Kent Gibson 提交于
Remove leading whitespace in ABI v1 comment. Signed-off-by: NKent Gibson <warthog618@gmail.com> Reviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20201005070329.21055-5-warthog618@gmail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Kent Gibson 提交于
Add kernel-doc formatting to all references to structs, enums, fields and constants, and move deprecation warnings into the Note section of the deprecated struct. Replace 'OR:ed' with 'added', as the former looks odd. Signed-off-by: NKent Gibson <warthog618@gmail.com> Reviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20201005070329.21055-4-warthog618@gmail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Kent Gibson 提交于
Make debounce_period_us field documentation consistent with other fields in the union. Signed-off-by: NKent Gibson <warthog618@gmail.com> Reviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20201005070329.21055-3-warthog618@gmail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
由 Kent Gibson 提交于
Fix kernel-doc warnings, specifically gpioline_info_changed.padding is not documented and 'GPIO event types' describes defines, which are not documented by kernel-doc. Signed-off-by: NKent Gibson <warthog618@gmail.com> Reviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20201005070329.21055-2-warthog618@gmail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 26 10月, 2020 4 次提交
-
-
由 Billy Tsai 提交于
GPIO_T is mapped to the most significant byte of input/output mask, and the byte in "output" mask should be 0 because GPIO_T is input only. All the other bits need to be 1 because GPIO_Q/R/S support both input and output modes. Fixes: ab4a8553 ("gpio: aspeed: Add in ast2600 details to Aspeed driver") Signed-off-by: NBilly Tsai <billy_tsai@aspeedtech.com> Reviewed-by: NTao Ren <rentao.bupt@gmail.com> Reviewed-by: NJoel Stanley <joel@jms.id.au> Reviewed-by: NAndrew Jeffery <andrew@aj.id.au> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Jia He 提交于
Commit 0ea68393 ("gpio: dwapb: Convert driver to using the GPIO-lib-based IRQ-chip") missed the case in dwapb_irq_set_wake(). Without this fix, probing the dwapb gpio driver will hit a error: "address between user and kernel address ranges" on a Ampere armv8a server and cause a panic. Fixes: 0ea68393 ("gpio: dwapb: Convert driver to using the GPIO-lib-based IRQ-chip") Signed-off-by: NJia He <justin.he@arm.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Acked-by: NSerge Semin <fancer.lancer@gmail.com> Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
-
由 Andy Shevchenko 提交于
When GPIO library asks pin control to set the bias, it doesn't pass any value of it and argument is considered boolean (and this is true for ACPI GpioIo() / GpioInt() resources, by the way). Thus, individual drivers must behave well, when they got the resistance value of 1 Ohm, i.e. transforming it to sane default. In case of Intel pin control hardware the 5 kOhm sounds plausible because on one hand it's a minimum of resistors present in all hardware generations and at the same time it's high enough to minimize leakage current (will be only 200 uA with the above choice). Fixes: e57725ea ("pinctrl: intel: Add support for hardware debouncer") Reported-by: NJamie McClymont <jamie@kwiius.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-
由 Andy Shevchenko 提交于
2 kOhm bias was never an option in Intel GPIO hardware, the available matrix is: 000 none 001 1 kOhm (if available) 010 5 kOhm 100 20 kOhm As easy to get the 3 resistors are gated separately and according to parallel circuits calculations we may get combinations of the above where the result is always strictly less than minimal resistance. Hence, additional values can be: 011 ~833.3 Ohm 101 ~952.4 Ohm 110 ~4 kOhm 111 ~800 Ohm That said, convert TERM definitions to be the bit masks to reflect the above. While at it, enable the same setting for pull down case. Fixes: 7981c001 ("pinctrl: intel: Add Intel Sunrisepoint pin controller and GPIO support") Cc: Jamie McClymont <jamie@kwiius.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com>
-