]> git.karo-electronics.de Git - linux-beck.git/commitdiff
pinctrl: Add support for PM8916 GPIO's and MPP's
authorIvan T. Ivanov <ivan.ivanov@linaro.org>
Tue, 31 Mar 2015 09:37:18 +0000 (12:37 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 8 Apr 2015 15:00:18 +0000 (17:00 +0200)
Add compatible string definitions and supported pin functions.

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
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
include/dt-bindings/pinctrl/qcom,pmic-gpio.h
include/dt-bindings/pinctrl/qcom,pmic-mpp.h

index 7ed08048516a9c9815913602fdd1c252689c1315..1ae63c0acd40b2609e173380d6785d7174248525 100644 (file)
@@ -10,6 +10,7 @@ PMIC's from Qualcomm.
                    "qcom,pm8018-gpio"
                    "qcom,pm8038-gpio"
                    "qcom,pm8058-gpio"
+                   "qcom,pm8916-gpio"
                    "qcom,pm8917-gpio"
                    "qcom,pm8921-gpio"
                    "qcom,pm8941-gpio"
@@ -74,6 +75,7 @@ to specify in a pin configuration subnode:
                    gpio1-gpio6 for pm8018
                    gpio1-gpio12 for pm8038
                    gpio1-gpio40 for pm8058
+                   gpio1-gpio4 for pm8916
                    gpio1-gpio38 for pm8917
                    gpio1-gpio44 for pm8921
                    gpio1-gpio36 for pm8941
index 854774b194ed7064bb0c29705fd6f9fcf2af2c34..ed19991aad35e2e5556b39f632c0607e5cdde5b9 100644 (file)
@@ -8,6 +8,7 @@ of PMIC's from Qualcomm.
        Value type: <string>
        Definition: Should contain one of:
                    "qcom,pm8841-mpp",
+                   "qcom,pm8916-mpp",
                    "qcom,pm8941-mpp",
                    "qcom,pma8084-mpp",
 
@@ -67,6 +68,7 @@ to specify in a pin configuration subnode:
        Definition: List of MPP pins affected by the properties specified in
                    this subnode.  Valid pins are:
                    mpp1-mpp4 for pm8841
+                   mpp1-mpp4 for pm8916
                    mpp1-mpp8 for pm8941
                    mpp1-mpp4 for pma8084
 
index 0f11a26d932b616611abfdd5aef92c0fb6c9c872..b2d22218a2582f94b2c5d0274843fa0c2d3d7162 100644 (file)
@@ -810,6 +810,7 @@ static int pmic_gpio_remove(struct platform_device *pdev)
 }
 
 static const struct of_device_id pmic_gpio_of_match[] = {
+       { .compatible = "qcom,pm8916-gpio" },   /* 4 GPIO's */
        { .compatible = "qcom,pm8941-gpio" },   /* 36 GPIO's */
        { .compatible = "qcom,pma8084-gpio" },  /* 22 GPIO's */
        { },
index a8924dba335e51861475dedb84566e2bfbc8976e..8f36c5f9194903fd8433736499a03a61afbfb2ac 100644 (file)
@@ -925,6 +925,7 @@ static int pmic_mpp_remove(struct platform_device *pdev)
 
 static const struct of_device_id pmic_mpp_of_match[] = {
        { .compatible = "qcom,pm8841-mpp" },    /* 4 MPP's */
+       { .compatible = "qcom,pm8916-mpp" },    /* 4 MPP's */
        { .compatible = "qcom,pm8941-mpp" },    /* 8 MPP's */
        { .compatible = "qcom,pma8084-mpp" },   /* 8 MPP's */
        { },
index fa74d7cc960cbfccd65de7b82aed49842ab55367..aafa76cb569dfc7a0ebe71a53c9b49a01016dea3 100644 (file)
 #define PM8058_GPIO_L5                 6
 #define PM8058_GPIO_L2                 7
 
+/*
+ * Note: PM8916 GPIO1 and GPIO2 are supporting
+ * only L2(1.15V) and L5(1.8V) options
+ */
+#define PM8916_GPIO_VPH                        0
+#define PM8916_GPIO_L2                 2
+#define PM8916_GPIO_L5                 3
+
 #define PM8917_GPIO_VPH                        0
 #define PM8917_GPIO_S4                 2
 #define PM8917_GPIO_L15                        3
 #define PM8058_GPIO39_MP3_CLK          PMIC_GPIO_FUNC_FUNC1
 #define PM8058_GPIO40_EXT_BB_EN                PMIC_GPIO_FUNC_FUNC1
 
+#define PM8916_GPIO1_BAT_ALRM_OUT      PMIC_GPIO_FUNC_FUNC1
+#define PM8916_GPIO1_KEYP_DRV          PMIC_GPIO_FUNC_FUNC2
+#define PM8916_GPIO2_DIV_CLK           PMIC_GPIO_FUNC_FUNC1
+#define PM8916_GPIO2_SLEEP_CLK         PMIC_GPIO_FUNC_FUNC2
+#define PM8916_GPIO3_KEYP_DRV          PMIC_GPIO_FUNC_FUNC1
+#define PM8916_GPIO4_KEYP_DRV          PMIC_GPIO_FUNC_FUNC2
+
 #define PM8917_GPIO9_18_KEYP_DRV       PMIC_GPIO_FUNC_FUNC1
 #define PM8917_GPIO20_BAT_ALRM_OUT     PMIC_GPIO_FUNC_FUNC1
 #define PM8917_GPIO21_23_UART_TX       PMIC_GPIO_FUNC_FUNC2
index d2c7dabe32231661a8e0cbe5d9706a40b89deb56..c10205491f8d6589f3d63ab21eb6d01d7d4ac049 100644 (file)
 #define PM8841_MPP_VPH                 0
 #define PM8841_MPP_S3                  2
 
+#define PM8916_MPP_VPH                 0
+#define PM8916_MPP_L2                  2
+#define PM8916_MPP_L5                  3
+
 #define PM8941_MPP_VPH                 0
 #define PM8941_MPP_L1                  1
 #define PM8941_MPP_S3                  2