pinctrl: qcom: Add generic ssbi and spmi GPIO/MPP bindings
authorStephen Boyd <sboyd@codeaurora.org>
Mon, 11 Jul 2016 19:01:09 +0000 (12:01 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 11 Aug 2016 08:18:46 +0000 (10:18 +0200)
The drivers don't really need to know which PMIC they're for, so
make a generic binding for them. This alleviates us from updating
the drivers every time a new PMIC comes out. It's still
recommended that we update the binding with new PMIC models and
always specify the specific model for the MPPs and gpios before
the generic compatible string in devicetree, but this at least
cuts down on adding more and more compatible strings to the
drivers until we actually need them.

Cc: <devicetree@vger.kernel.org>
Acked-by: "Ivan T. Ivanov" <iivanov.xz@gmail.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt
Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
drivers/pinctrl/qcom/pinctrl-spmi-mpp.c

index a54c39ebbf8bc5348c45d9b669ba609ad24a4d78..8d893a874634281127ddb2f69962577ee33a6798 100644 (file)
@@ -17,6 +17,9 @@ PMIC's from Qualcomm.
                    "qcom,pm8994-gpio"
                    "qcom,pma8084-gpio"
 
+                   And must contain either "qcom,spmi-gpio" or "qcom,ssbi-gpio"
+                   if the device is on an spmi bus or an ssbi bus respectively
+
 - reg:
        Usage: required
        Value type: <prop-encoded-array>
@@ -183,7 +186,7 @@ to specify in a pin configuration subnode:
 Example:
 
        pm8921_gpio: gpio@150 {
-               compatible = "qcom,pm8921-gpio";
+               compatible = "qcom,pm8921-gpio", "qcom,ssbi-gpio";
                reg = <0x150 0x160>;
                interrupts = <192 1>, <193 1>, <194 1>,
                             <195 1>, <196 1>, <197 1>,
index b484ba1af78c28b6d3224fde46fc81a2fea70934..2ab95bc26066ce54e09f3866611af2aded817d13 100644 (file)
@@ -19,6 +19,9 @@ of PMIC's from Qualcomm.
                    "qcom,pm8994-mpp",
                    "qcom,pma8084-mpp",
 
+                   And must contain either "qcom,spmi-mpp" or "qcom,ssbi-mpp"
+                   if the device is on an spmi bus or an ssbi bus respectively.
+
 - reg:
        Usage: required
        Value type: <prop-encoded-array>
@@ -158,7 +161,7 @@ to specify in a pin configuration subnode:
 Example:
 
        mpps@a000 {
-               compatible = "qcom,pm8841-mpp";
+               compatible = "qcom,pm8841-mpp", "qcom,spmi-mpp";
                reg = <0xa000>;
                gpio-controller;
                #gpio-cells = <2>;
index 686accb89f527a358d93129d660ae107f89f2e06..664b641fd776d545200ea4453a14dcd43103b7b1 100644 (file)
@@ -800,6 +800,7 @@ static const struct of_device_id pmic_gpio_of_match[] = {
        { .compatible = "qcom,pm8941-gpio" },   /* 36 GPIO's */
        { .compatible = "qcom,pm8994-gpio" },   /* 22 GPIO's */
        { .compatible = "qcom,pma8084-gpio" },  /* 22 GPIO's */
+       { .compatible = "qcom,spmi-gpio" }, /* Generic */
        { },
 };
 
index 1735ffef9d5c1ee102400fa6ae51c0df5dfb4647..6556dbeae65efc18df3d4d2dd879dc87bf3573f3 100644 (file)
@@ -914,6 +914,7 @@ static const struct of_device_id pmic_mpp_of_match[] = {
        { .compatible = "qcom,pm8941-mpp" },    /* 8 MPP's */
        { .compatible = "qcom,pm8994-mpp" },    /* 8 MPP's */
        { .compatible = "qcom,pma8084-mpp" },   /* 8 MPP's */
+       { .compatible = "qcom,spmi-mpp" },      /* Generic */
        { },
 };
 
This page took 0.030197 seconds and 5 git commands to generate.