aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/mfd/arizona.txt18
-rw-r--r--drivers/mfd/arizona-core.c30
2 files changed, 48 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt
index a6e2ea41160c..8f2e2822238d 100644
--- a/Documentation/devicetree/bindings/mfd/arizona.txt
+++ b/Documentation/devicetree/bindings/mfd/arizona.txt
@@ -85,6 +85,24 @@ Optional properties:
85 present, the number of values should be less than or equal to the 85 present, the number of values should be less than or equal to the
86 number of inputs, unspecified inputs will use the chip default. 86 number of inputs, unspecified inputs will use the chip default.
87 87
88 - wlf,max-channels-clocked : The maximum number of channels to be clocked on
89 each AIF, useful for I2S systems with multiple data lines being mastered.
90 Specify one cell for each AIF to be configured, specify zero for AIFs that
91 should be handled normally.
92 If present, number of cells must be less than or equal to the number of
93 AIFs. If less than the number of AIFs, for cells that have not been
94 specified the corresponding AIFs will be treated as default setting.
95
96 - wlf,spk-fmt : PDM speaker data format, must contain 2 cells (OUT5 and OUT6).
97 See the datasheet for values.
98 The second cell is ignored for codecs that do not have OUT6 (wm5102, wm8997,
99 wm8998, wm1814)
100
101 - wlf,spk-mute : PDM speaker mute setting, must contain 2 cells (OUT5 and OUT6).
102 See the datasheet for values.
103 The second cell is ignored for codecs that do not have OUT6 (wm5102, wm8997,
104 wm8998, wm1814)
105
88 - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if 106 - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if
89 they are being externally supplied. As covered in 107 they are being externally supplied. As covered in
90 Documentation/devicetree/bindings/regulator/regulator.txt 108 Documentation/devicetree/bindings/regulator/regulator.txt
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 4c18c8ef05d9..672924d5ec9d 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -828,6 +828,7 @@ static int arizona_of_get_core_pdata(struct arizona *arizona)
828 struct property *prop; 828 struct property *prop;
829 const __be32 *cur; 829 const __be32 *cur;
830 u32 val; 830 u32 val;
831 u32 pdm_val[ARIZONA_MAX_PDM_SPK];
831 int ret, i; 832 int ret, i;
832 int count = 0; 833 int count = 0;
833 834
@@ -884,6 +885,35 @@ static int arizona_of_get_core_pdata(struct arizona *arizona)
884 count++; 885 count++;
885 } 886 }
886 887
888 count = 0;
889 of_property_for_each_u32(arizona->dev->of_node,
890 "wlf,max-channels-clocked",
891 prop, cur, val) {
892 if (count == ARRAY_SIZE(pdata->max_channels_clocked))
893 break;
894
895 pdata->max_channels_clocked[count] = val;
896 count++;
897 }
898
899 ret = of_property_read_u32_array(arizona->dev->of_node,
900 "wlf,spk-fmt",
901 pdm_val,
902 ARRAY_SIZE(pdm_val));
903
904 if (ret >= 0)
905 for (count = 0; count < ARRAY_SIZE(pdata->spk_fmt); ++count)
906 pdata->spk_fmt[count] = pdm_val[count];
907
908 ret = of_property_read_u32_array(arizona->dev->of_node,
909 "wlf,spk-mute",
910 pdm_val,
911 ARRAY_SIZE(pdm_val));
912
913 if (ret >= 0)
914 for (count = 0; count < ARRAY_SIZE(pdata->spk_mute); ++count)
915 pdata->spk_mute[count] = pdm_val[count];
916
887 return 0; 917 return 0;
888} 918}
889 919