]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
gpio: qcom_pmic: drop gpio-count property
authorCaleb Connolly <caleb.connolly@linaro.org>
Tue, 5 Dec 2023 13:46:52 +0000 (13:46 +0000)
committerCaleb Connolly <caleb.connolly@linaro.org>
Tue, 16 Jan 2024 12:26:53 +0000 (12:26 +0000)
This property is not part of the dt bindings and all boards use the new
gpio-ranges property instead. Drop support for this.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Tested-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
doc/device-tree-bindings/gpio/pm8916_gpio.txt [deleted file]
drivers/gpio/qcom_pmic_gpio.c

diff --git a/doc/device-tree-bindings/gpio/pm8916_gpio.txt b/doc/device-tree-bindings/gpio/pm8916_gpio.txt
deleted file mode 100644 (file)
index 58185b8..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-Driver for part of pm8916 PMIC - gpio and power/reset keys
-
-This device should be child of SPMI pmic.
-
-1) GPIO driver
-
-Required properties:
-- compatible: "qcom,pm8916-gpio"
-- reg: peripheral ID, size of register block
-- gpio-controller
-- gpio-count: number of GPIOs
-- #gpio-cells: 2
-
-Optional properties:
-- gpio-bank-name: name of bank (as default "pm8916" is used)
-
-Example:
-
-pmic_gpios: gpios@c000 {
-       compatible = "qcom,pm8916-gpio";
-       reg = <0xc000 0x400>;
-       gpio-controller;
-       gpio-count = <4>;
-       #gpio-cells = <2>;
-       gpio-bank-name="pmic";
-};
-
-
-2) Power/Reset key driver
-
-Required properties:
-- compatible: "qcom,pm8916-pwrkey"
-- reg: peripheral ID, size of register block
-- gpio-controller
-- #gpio-cells: 2
-
-Optional properties:
-- gpio-bank-name: name of bank (as default "pm8916_key" is used)
-
-
-Example:
-
-pmic_pon: pon@800 {
-       compatible = "qcom,pm8916-pwrkey";
-       reg = <0x800 0x96>;
-       #gpio-cells = <2>;
-       gpio-controller;
-};
index 5221bd27825ed5b011a82d69891b45dac596b6d7..6167c8411678944ad359788eecacb8fa2184d021 100644 (file)
@@ -268,14 +268,11 @@ static int qcom_gpio_of_to_plat(struct udevice *dev)
        struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
        int ret;
 
-       uc_priv->gpio_count = dev_read_u32_default(dev, "gpio-count", 0);
-       if (!uc_priv->gpio_count) {
-               ret = qcom_gpio_of_parse_ranges(dev);
-               if (ret > 0)
-                       uc_priv->gpio_count = ret;
-               else
-                       return ret;
-       }
+       ret = qcom_gpio_of_parse_ranges(dev);
+       if (ret > 0)
+               uc_priv->gpio_count = ret;
+       else
+               return ret;
 
        uc_priv->bank_name = "pmic";