diff options
author | Stephen Warren | 2013-06-12 12:34:30 -0500 |
---|---|---|
committer | Mark Brown | 2013-06-12 13:25:22 -0500 |
commit | dcad9f031240d59e9e1475a8e5b2cb427da94f6e (patch) | |
tree | 5bb28075e74375030c5fd2e89531f01660700047 /Documentation/devicetree/bindings/sound/rt5640.txt | |
parent | 997b05203b0a710e11f9b2732bef2d2fdc1d824b (diff) | |
download | ti-linux-kernel-dcad9f031240d59e9e1475a8e5b2cb427da94f6e.tar.gz ti-linux-kernel-dcad9f031240d59e9e1475a8e5b2cb427da94f6e.tar.xz ti-linux-kernel-dcad9f031240d59e9e1475a8e5b2cb427da94f6e.zip |
ASoC: rt5640: add device tree support
Modify the RT5640 driver to parse platform data from device tree. Write
a DT binding document to describe those properties.
Slight re-ordering of rt5640_i2c_probe() to better fit the DT parsing.
Since ldo1_en is optional, guard usage of it with gpio_is_valid(), rather
than open-coding an if (gpio) check.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'Documentation/devicetree/bindings/sound/rt5640.txt')
-rw-r--r-- | Documentation/devicetree/bindings/sound/rt5640.txt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/sound/rt5640.txt b/Documentation/devicetree/bindings/sound/rt5640.txt new file mode 100644 index 000000000000..005bcb24d72d --- /dev/null +++ b/Documentation/devicetree/bindings/sound/rt5640.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | RT5640 audio CODEC | ||
2 | |||
3 | This device supports I2C only. | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible : "realtek,rt5640". | ||
8 | |||
9 | - reg : The I2C address of the device. | ||
10 | |||
11 | - interrupts : The CODEC's interrupt output. | ||
12 | |||
13 | Optional properties: | ||
14 | |||
15 | - realtek,in1-differential | ||
16 | - realtek,in2-differential | ||
17 | Boolean. Indicate MIC1/2 input are differential, rather than single-ended. | ||
18 | |||
19 | - realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin. | ||
20 | |||
21 | Example: | ||
22 | |||
23 | rt5640 { | ||
24 | compatible = "realtek,rt5640"; | ||
25 | reg = <0x1c>; | ||
26 | interrupt-parent = <&gpio>; | ||
27 | interrupts = <TEGRA_GPIO(W, 3) GPIO_ACTIVE_HIGH>; | ||
28 | realtek,ldo1-en-gpios = | ||
29 | <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>; | ||
30 | }; | ||