Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: qcom_spmi: Add support for pmi8994

Document the regulators available on pmi8994 and add support for
this PMIC to the SPMI PMIC regulator driver.

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Rajendra Nayak and committed by
Mark Brown
ca5cd8c9 2bd6bf03

+22
+13
Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt
··· 8 8 "qcom,pm8916-regulators" 9 9 "qcom,pm8941-regulators" 10 10 "qcom,pm8994-regulators" 11 + "qcom,pmi8994-regulators" 11 12 12 13 - interrupts: 13 14 Usage: optional ··· 101 100 Definition: Reference to regulator supplying the input pin, as 102 101 described in the data sheet. 103 102 103 + - vdd_s1-supply: 104 + - vdd_s2-supply: 105 + - vdd_s3-supply: 106 + - vdd_l1-supply: 107 + Usage: optional (pmi8994 only) 108 + Value type: <phandle> 109 + Definition: Reference to regulator supplying the input pin, as 110 + described in the data sheet. 111 + 104 112 105 113 The regulator node houses sub-nodes for each regulator within the device. Each 106 114 sub-node is identified using the node's name, with valid values listed for each ··· 131 121 s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, l1, l2, l3, l4, l5, 132 122 l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l20, 133 123 l21, l22, l23, l24, l25, l26, l27, l28, l29, l30, l31, l32, lvs1, lvs2 124 + 125 + pmi8994: 126 + s1, s2, s3, l1 134 127 135 128 The content of each sub-node is defined by the standard binding for regulators - 136 129 see regulator.txt - with additional custom properties described below:
+9
drivers/regulator/qcom_spmi-regulator.c
··· 1619 1619 { } 1620 1620 }; 1621 1621 1622 + static const struct spmi_regulator_data pmi8994_regulators[] = { 1623 + { "s1", 0x1400, "vdd_s1", }, 1624 + { "s2", 0x1700, "vdd_s2", }, 1625 + { "s3", 0x1a00, "vdd_s3", }, 1626 + { "l1", 0x4000, "vdd_l1", }, 1627 + { } 1628 + }; 1629 + 1622 1630 static const struct of_device_id qcom_spmi_regulator_match[] = { 1623 1631 { .compatible = "qcom,pm8841-regulators", .data = &pm8841_regulators }, 1624 1632 { .compatible = "qcom,pm8916-regulators", .data = &pm8916_regulators }, 1625 1633 { .compatible = "qcom,pm8941-regulators", .data = &pm8941_regulators }, 1626 1634 { .compatible = "qcom,pm8994-regulators", .data = &pm8994_regulators }, 1635 + { .compatible = "qcom,pmi8994-regulators", .data = &pmi8994_regulators }, 1627 1636 { } 1628 1637 }; 1629 1638 MODULE_DEVICE_TABLE(of, qcom_spmi_regulator_match);