[PATCH 2/5] mfd: arizona: Add device tree binding for max_channels_clocked

From: Charles Keepax
Date: Mon Sep 23 2013 - 14:41:57 EST


Add device tree bindings for the pdata max_channels_clocked, that allows
the user to limit the number of channels clocked on a single AIF.

Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
---
Documentation/devicetree/bindings/mfd/arizona.txt | 7 +++++++
drivers/mfd/arizona-core.c | 5 +++++
2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt
index e2cecfc..9eeef62 100644
--- a/Documentation/devicetree/bindings/mfd/arizona.txt
+++ b/Documentation/devicetree/bindings/mfd/arizona.txt
@@ -40,6 +40,11 @@ Optional properties:
the chip default will be used. If present exactly five values must
be specified.

+ - wlf,max-channels-clocked : The maximum number of channels to be clocked on
+ each AIF, useful for I2S systems with multiple data lines being mastered.
+ If specified three cells must supplied one for each AIF, specify zero for
+ AIFs that should be handled normally.
+
Example:

codec: wm5102@1a {
@@ -59,4 +64,6 @@ codec: wm5102@1a {
0xffffffff
0xffffffff
>;
+
+ wlf,max-channels-clocked = <2 0 0>;
};
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 986abc5..b3337ee 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -605,6 +605,11 @@ static int arizona_of_get_core_pdata(struct arizona *arizona)

arizona_of_get_gpio_defaults(arizona, "wlf,gpio-defaults");

+ arizona_of_read_u32_array(arizona, "wlf,max-channels-clocked",
+ false,
+ pdata->max_channels_clocked,
+ ARRAY_SIZE(pdata->max_channels_clocked));
+
return 0;
}

--
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/