aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-11-28gpiolib: Unify access to the device propertiesAndy Shevchenko1-7/+10
Some of the functions are using struct fwnode_handle, some struct device pointer. In the GPIO library the firmware node of the GPIO device is the same as GPIO node of the GPIO chip. Due to this fact we may use former to access properties everywhere in the code. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Brian Masney <[email protected]> Tested-by: Marijn Suijten <[email protected]> [Bartosz: stick to the 80-char limit where it's not hurting readability] Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-28gpio: Do not include <linux/kernel.h> when not really needed.Christophe JAILLET1-1/+1
<linux/kernel.h> is included only for using container_of(). Include <linux/container_of.h> instead, it is much lighter. Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-24gpio: pcf857x: Convert to i2c's .probe_new()Uwe Kleine-König1-3/+3
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-24gpio: pca953x: Convert to i2c's .probe_new()Uwe Kleine-König1-3/+3
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-24gpio: max732x: Convert to i2c's .probe_new()Uwe Kleine-König1-3/+3
.probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-24Merge branch 'i2c/client_device_id_helper-immutable' of ↵Bartosz Golaszewski2-0/+15
https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into gpio/for-next Introduce the i2c_client_get_device_id() helper.
2022-11-16dt-bindings: gpio: gpio-davinci: Increase maxItems in gpio-line-namesNishanth Menon1-1/+1
gpio-line-names really depends on ti,ngpios. However, the maximum value we have seen across the board is on K2G and da850 platforms where it can be upto 144. Link: https://lore.kernel.org/linux-arm-kernel/20221115200357.qa2rvw3clbz7unzq@symptom/T/#u Fixes: c830b87a761b ("dt-bindings: gpio: gpio-davinci: Convert to json-schema") Reported-by: Robert Nelson <[email protected]> Signed-off-by: Nishanth Menon <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-16Merge tag 'intel-gpio-v6.2-1' of ↵Bartosz Golaszewski3-3/+4
git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into gpio/for-next intel-gpio for v6.2-1 * Miscellaneous updates to the core (cdev, acpi) and Intel Merrifield driver The following is an automated git shortlog grouped by driver: gpiolib: - cdev: Fix typo in kernel doc for struct line - acpi: Use METHOD_NAME__AEI macro for acpi_walk_resources merrifield: - Use str_enable_disable() helper
2022-11-16gpiolib: ensure that fwnode is properly setBrian Masney1-1/+1
Note that this is a RFC patch and not meant to be merged. I looked into a problem with linux-next-20221110 on the Qualcomm SA8540P automotive board (sc8280xp) where the UFS host controller would fail to probe due to repeated probe deferrals when trying to get reset-gpios via devm_gpiod_get_optional(). of_get_named_gpiod_flags() returns -EPROBE_DEFER, which is caused by of_gpiochip_match_node_and_xlate() returning 0 since the of_xlate function pointer is not set for the qcom,sc8280xp-tlmm pinctrl driver. The pinctrl driver doesn't define one, so of_gpiochip_add() should automatically setup of_gpio_simple_xlate() on it's behalf. This doesn't happen since the fwnode member on the struct gpiochip is set to null when of_gpiochip_add() is called. Let's work around this by ensuring that it's set if available. Note that this broke sometime within the last few weeks within linux-next and I haven't bisected this. I'm posting this in the hopes that someone may know offhand which patch(es) may have broken this. Signed-off-by: Brian Masney <[email protected]> Tested-by: Marijn Suijten <[email protected]> Tested-by: Konrad Dybcio <[email protected]> Tested-by: Steev Klimaszewski <[email protected]> #Lenovo Thinkpad X13s Tested-by: Neil Armstrong <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-15gpio: sl28cpld: Replace irqchip mask_invert with unmask_baseAidan MacDonald1-2/+1
Remove use of the deprecated mask_invert flag. Inverted mask registers (where a '1' bit enables an IRQ) can be described more directly as an unmask register. Signed-off-by: Aidan MacDonald <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-15gpiolib: of: Use correct fwnode for DT-probed chipsThierry Reding1-1/+1
The OF node store in chip->fwnode is used to explicitly override the FW node for a GPIO chip. For chips that use the default FW node (i.e. that of their parent device), this will be NULL and cause the chip not to be fully registered. Instead, use the GPIO device's FW node, which is set to either the node of the parent device or the explicit override in chip->fwnode. Fixes: 8afe82550240 ("gpiolib: of: Prepare of_gpiochip_add() / of_gpiochip_remove() for fwnode") Tested-by: Marek Szyprowski <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Tested-by: Robert Marko <[email protected]> Tested-by: Andrew Halaney <[email protected]> Reviewed-by: Brian Masney <[email protected]> Tested-by: Brian Masney <[email protected]> Tested-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-15gpiolib: of: Drop redundant check in of_mm_gpiochip_remove()Andy Shevchenko1-3/+0
The callers never call the function with invalid pointer. Moreover, compiler quite likely dropped that check anyway because we use that pointer before the check. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-15gpiolib: of: Prepare of_mm_gpiochip_add_data() for fwnodeAndy Shevchenko1-2/+2
GPIO library is getting rid of of_node, fwnode should be utilized instead. Prepare of_mm_gpiochip_add_data() for fwnode. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-15gpiolib: add support for software nodesDmitry Torokhov5-0/+156
Now that static device properties understand notion of child nodes and references, let's teach gpiolib to handle them: - GPIOs are represented as a references to software nodes representing gpiochip - references must have 2 arguments - GPIO number within the chip and GPIO flags (GPIO_ACTIVE_LOW/GPIO_ACTIVE_HIGH, etc) - a new PROPERTY_ENTRY_GPIO() macro is supplied to ensure the above - name of the software node representing gpiochip must match label of the gpiochip, as we use it to locate gpiochip structure at runtime The following illustrates use of software nodes to describe a "System" button that is currently specified via use of gpio_keys_platform_data in arch/mips/alchemy/board-mtx1.c. It follows bindings specified in Documentation/devicetree/bindings/input/gpio-keys.yaml. static const struct software_node mxt1_gpiochip2_node = { .name = "alchemy-gpio2", }; static const struct property_entry mtx1_gpio_button_props[] = { PROPERTY_ENTRY_U32("linux,code", BTN_0), PROPERTY_ENTRY_STRING("label", "System button"), PROPERTY_ENTRY_GPIO("gpios", &mxt1_gpiochip2_node, 7, GPIO_ACTIVE_LOW), { } }; Similarly, arch/arm/mach-tegra/board-paz00.c can be converted to: static const struct software_node tegra_gpiochip_node = { .name = "tegra-gpio", }; static struct property_entry wifi_rfkill_prop[] __initdata = { PROPERTY_ENTRY_STRING("name", "wifi_rfkill"), PROPERTY_ENTRY_STRING("type", "wlan"), PROPERTY_ENTRY_GPIO("reset-gpios", &tegra_gpiochip_node, 25, GPIO_ACTIVE_HIGH); PROPERTY_ENTRY_GPIO("shutdown-gpios", &tegra_gpiochip_node, 85, GPIO_ACTIVE_HIGH); { }, }; static struct platform_device wifi_rfkill_device = { .name = "rfkill_gpio", .id = -1, }; ... software_node_register(&tegra_gpiochip_node); device_create_managed_software_node(&wifi_rfkill_device.dev, wifi_rfkill_prop, NULL); Acked-by: Linus Walleij <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-15gpiolib: consolidate GPIO lookupsDmitry Torokhov3-177/+76
Ensure that all paths to obtain/look up GPIOD from generic consumer-visible APIs go through the new gpiod_find_and_request() helper, so that we can easily extend it with support for new firmware mechanisms. The only exception is OF-specific [devm_]gpiod_get_from_of_node() API that is still being used by a couple of drivers and will be removed as soon as patches converting them to use generic fwnode/device APIs are accepted. Acked-by: Linus Walleij <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-15gpiolib: acpi: avoid leaking ACPI details into upper gpiolib layersDmitry Torokhov3-57/+48
There is no need for the generic parts of GPIOLIB to be aware of implementation details of ACPI-bases lookups. Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-15gpiolib: acpi: teach acpi_find_gpio() to handle data-only nodesDmitry Torokhov1-26/+50
In preparation of switching all ACPI-based GPIO lookups to go through acpi_find_gpio() we need to make sure it can handle data-only ACPI nodes, same as existing acpi_node_get_gpiod(). Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-15gpiolib: acpi: change acpi_find_gpio() to accept firmware nodeDmitry Torokhov3-5/+10
In preparation of switching all ACPI-based GPIO lookups to go through acpi_find_gpio() let's change it to accept device node as its argument as we do not always have access to device structure. Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-15gpiolib: of: change of_find_gpio() to accept device nodeDmitry Torokhov3-8/+8
In preparation of switching all OF-based GPIO lookups to go through of_find_gpio() let's change it to accept device node as its argument as we do not always have access to device structure. Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-14i2c: core: Introduce i2c_client_get_device_id helper functionAngel Iglesias2-0/+15
Introduces new helper function to aid in .probe_new() refactors. In order to use existing i2c_get_device_id() on the probe callback, the device match table needs to be accessible in that function, which would require bigger refactors in some drivers using the deprecated .probe callback. This issue was discussed in more detail in the IIO mailing list. Link: https://lore.kernel.org/all/[email protected]/ Suggested-by: Nuno Sá <[email protected]> Suggested-by: Andy Shevchenko <[email protected]> Suggested-by: Jonathan Cameron <[email protected]> Signed-off-by: Angel Iglesias <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2022-11-10gpio: davinci: add support of module buildGuillaume La Roque2-1/+12
Added module build support for the davinci gpio driver Signed-off-by: Guillaume La Roque <[email protected]> Signed-off-by: Nicolas Frayer <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-09gpiolib: of: Integrate of_gpiochip_init_valid_mask() into ↵Andy Shevchenko3-48/+53
gpiochip_init_valid_mask() In preparation to complete fwnode switch, integrate of_gpiochip_init_valid_mask() into gpiochip_init_valid_mask(). Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Dmitry Torokhov <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-09gpiolib: of: Prepare of_gpiochip_add() / of_gpiochip_remove() for fwnodeAndy Shevchenko1-4/+6
GPIO library is getting rid of of_node, fwnode should be utilized instead. Prepare of_gpiochip_add() / of_gpiochip_remove() for fwnode. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Dmitry Torokhov <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-09gpiolib: remove devm_fwnode_get_[index_]gpiod_from_child()Dmitry Torokhov1-21/+0
Now that there are no more users of these APIs in the kernel we can remove them. Signed-off-by: Dmitry Torokhov <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-09leds: lgm-sso: switch to using devm_fwnode_gpiod_get()Dmitry Torokhov1-3/+2
devm_fwnode_get_gpiod_from_child() is going away as the name is too unwieldy, let's switch to using the new devm_fwnode_gpiod_get(). Signed-off-by: Dmitry Torokhov <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-09leds: gpio: switch to using devm_fwnode_gpiod_get()Dmitry Torokhov1-3/+2
devm_fwnode_get_gpiod_from_child() is going away as the name is too unwieldy, let's switch to using the new devm_fwnode_gpiod_get(). Signed-off-by: Dmitry Torokhov <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-07gpio: hisi: Add initial device tree supportWeilong Chen2-1/+8
Add support for HiSilicon GPIO controller in embedded platform, which boot from devicetree. Signed-off-by: Weilong Chen <[email protected]> Acked-by: Jay Fang <[email protected]> Reviewed-by: Yicong Yang <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-07dt-bindings: gpio: add entry for hisilicon,ascend910-gpioWeilong Chen2-0/+57
Add the new compatible for HiSilicon gpio controller driver. Signed-off-by: Weilong Chen <[email protected]> Reviewed-by: Rob Herring <[email protected]> Reviewed-by: Yicong Yang <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-07gpio: Add Generic regmap GPIO conversion to the TODO listAndy Shevchenko1-0/+7
It's actually preferable to use Generic regmap GPIO over other simple approaches. Add a TODO item for that. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-04gpiolib: of: add polarity quirk for Freescale PCIe controllerDmitry Torokhov1-0/+9
Bindings for Freescale PCIe controller use a separate property called "reset-gpio-active-high" to control polarity of its reset line, add it to the list of quirks in gpiolib so that gpiod API can be used in the driver. Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-04gpiolib: of: factor out quirk setting polarity via separate propertyDmitry Torokhov1-45/+53
Several legacy bindings use a separate property to specify polarity of GPIOs instead of specifying it directly in the GPIO property. Factor out this code to make it easier to add more such cases. Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-11-04gpiolib: of: Make use of device_match_of_node()Andy Shevchenko1-1/+1
Make use of device_match_of_node() instead of open coding its functionality. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-10-27gpio: pca9570: add slg7xl45106 supportShubhrajyoti Datta1-1/+17
Dialog semiconductors SLG7XL45106 is an 8-bit I2C GPO expander. The output port is controlled by a data byte with register address. Add a compatible string for the same. Also update the driver to write and read from it. Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Shubhrajyoti Datta <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-10-27gpio: pca9570: add a platform data structureShubhrajyoti Datta1-5/+26
Add struct pca9570_platform_data for adding the platform data structure. Also modify the existing structs for pca9570 and pca9571 Signed-off-by: Shubhrajyoti Datta <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-10-27dt-bindings: gpio: pca9570: Add compatible for slg7xl45106Shubhrajyoti Datta1-0/+1
This patch adds compatible string for the SLG7XL45106, I2C GPO expander. Acked-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Shubhrajyoti Datta <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-10-26gpio: exar: Allow IO port accessAndy Shevchenko1-0/+1
It's possible that PCI device can provide an IO port resource for the device. regmap MMIO currently uses MMIO by default. With an additional flag we enable support for IO port accesses. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: William Breathitt Gray <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-10-26gpio: Add gpio latch driverSascha Hauer3-0/+226
This driver implements a GPIO multiplexer based on latches connected to other GPIOs. A set of data GPIOs is connected to the data input of multiple latches. The clock input of each latch is driven by another set of GPIOs. With two 8-bit latches 10 GPIOs can be multiplexed into 16 GPIOs. GPOs might be a better term as in fact the multiplexed pins are output only. Signed-off-by: Sascha Hauer <[email protected]> Reviewed-by: Serge Semin <[email protected]> Reviewed-by: Linus Walleij <[email protected]> [Bartosz: fixed the strange of_device_id formatting] Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-10-26dt-bindings: gpio: Add gpio-latch binding documentSascha Hauer1-0/+94
This adds a binding for a GPIO multiplexer driver based on latches connected to other GPIOs. Signed-off-by: Sascha Hauer <[email protected]> Reviewed-by: Rob Herring <[email protected]> Reviewed-by: Serge Semin <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-10-25gpiolib: cdev: Fix typo in kernel doc for struct lineAndy Shevchenko1-1/+1
When eflags has been renamed to the edflags, the kernel doc change were missed. Update kernel doc accordingly. Fixes: b1a92e94560d ("gpiolib: cdev: consolidate edge detector configuration flags") Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Kent Gibson <[email protected]>
2022-10-25gpiolib: acpi: Use METHOD_NAME__AEI macro for acpi_walk_resourcesXiang Yang1-1/+1
Using the METHOD_NAME__AEI macro instead of using "_AEI" directly. Signed-off-by: Xiang Yang <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2022-10-25gpio: pci-idio-16: Utilize the idio-16 GPIO libraryWilliam Breathitt Gray2-106/+14
The ACCES PCI-IDIO-16 device is part of the ACCES IDIO-16 family, so the idio-16 GPIO library module is selected and utilized to consolidate code. Signed-off-by: William Breathitt Gray <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-10-25gpio: 104-idio-16: Utilize the idio-16 GPIO libraryWilliam Breathitt Gray2-72/+17
The ACCES 104-IDIO-16 device is part of the ACCES IDIO-16 family, so the idio-16 GPIO library module is selected and utilized to consolidate code. Signed-off-by: William Breathitt Gray <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-10-25gpio: idio-16: Introduce the ACCES IDIO-16 GPIO library moduleWilliam Breathitt Gray5-0/+234
Exposes consumer library functions to facilitate communication with devices within the ACCES IDIO-16 family such as the 104-IDIO-16 and the PCI-IDIO-16. A CONFIG_GPIO_IDIO_16 Kconfig option is introduced by this patch. Modules wanting access to these idio-16 library functions should select this Kconfig option and import the GPIO_IDIO_16 symbol namespace. Cc: Andy Shevchenko <[email protected]> Signed-off-by: William Breathitt Gray <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-10-25gpio: ftgpio010: use device name for gpiochip name & labelJeremy Kerr1-1/+1
Currently, we use just the fixed string "FTGPIO010" as the gpiochip name for ftgpio010 drivers. Because it's fixed, this means we cannot distinguish multiple ftgpio010 devices present on a single system. This change uses the dev_name() instead, which should be unique between multiple instances. Signed-off-by: Jeremy Kerr <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-10-20gpiolib: of: add a quirk for reset line polarity for Himax LCDsDmitry Torokhov1-0/+36
Existing DTS that use legacy (non-standard) property name for the reset line "gpios-reset" also specify incorrect polarity (0 which maps to "active high"). Add a quirk to force polarity to "active low" so that once driver is converted to gpiod API that pays attention to line polarity it will work properly. Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-10-20gpiolib: of: add quirk for phy reset polarity for Freescale EthernetDmitry Torokhov1-0/+27
Bindings for Freescale Fast Ethernet Controller use a separate property "phy-reset-active-high" to specify polarity of its phy gpio line. To allow converting the driver to gpiod API we need to add this quirk to gpiolib. Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-10-20gpiolib: of: factor out code overriding gpio line polarityDmitry Torokhov1-20/+28
There are several instances where we use a separate property to override polarity specified in gpio property. Factor it out into a separate function. Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-10-20gpiolib: of: add a quirk for legacy names in MOXA ART RTCDmitry Torokhov1-0/+5
The driver is using non-standard "gpio-rtc-data", "gpio-rtc-sclk", and "gpio-rtc-reset" names for properties describing its gpios. In preparation to converting to the standard naming ("rtc-*-gpios") and switching the driver to gpiod API add a quirk to gpiolib to keep compatibility with existing DTSes. Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-10-20gpiolib: of: add a quirk for reset line for Cirrus CS42L56 codecDmitry Torokhov1-0/+3
The controller is using non-standard "cirrus,gpio-nreset" name for its reset gpio property, whereas gpiod API expects "<name>-gpios". Add a quirk so that gpiod API will still work on unmodified DTSes. Reviewed-by: Daniel Thompson <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2022-10-20gpiolib: of: add a quirk for reset line for Marvell NFC controllerDmitry Torokhov1-0/+10
The controller is using non-standard "reset-n-io" name for its reset gpio property, whereas gpiod API expects "<name>-gpios". Add a quirk so that gpiod API will still work on unmodified DTSes. Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>