pinctrl: qcom: Add generic ssbi and spmi GPIO/MPP bindings

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.

Change-Id: I4ea4c511108f37cbfae0a5ccaaaeadadcae37254
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>
Git-commit: 647dbd1e84871f6c0548f7fbb46eefc4da21f783
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
This commit is contained in:
Stephen Boyd 2016-07-11 12:01:09 -07:00 committed by Fenglin Wu
parent d1402bbe5f
commit cc54c7c347
4 changed files with 10 additions and 2 deletions

View file

@ -16,6 +16,9 @@ PMIC's from Qualcomm.
"qcom,pm8941-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>
@ -181,7 +184,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>,

View file

@ -17,6 +17,9 @@ of PMIC's from Qualcomm.
"qcom,pm8941-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>
@ -156,7 +159,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>;

View file

@ -807,6 +807,7 @@ 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 */
{ .compatible = "qcom,spmi-gpio" }, /* Generic */
{ },
};

View file

@ -911,6 +911,7 @@ static const struct of_device_id pmic_mpp_of_match[] = {
{ .compatible = "qcom,pm8916-mpp" }, /* 4 MPP's */
{ .compatible = "qcom,pm8941-mpp" }, /* 8 MPP's */
{ .compatible = "qcom,pma8084-mpp" }, /* 8 MPP's */
{ .compatible = "qcom,spmi-mpp" }, /* Generic */
{ },
};