diff mbox

[1/2] ASoC: rockchip-max98090: add documentation for rockchip-max98090 driver

Message ID 1410507036-15442-1-git-send-email-jay.xu@rock-chips.com
State Superseded, archived
Headers show

Commit Message

Jianqun Xu Sept. 12, 2014, 7:30 a.m. UTC
Add documentation for rockchip-max98090 driver, which is need by rockchip
board using a max98090.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
---
 .../sound/rockchip,rockchip-audio-max98090.txt     | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/rockchip,rockchip-audio-max98090.txt

Comments

Mark Brown Sept. 12, 2014, 1:44 p.m. UTC | #1
On Fri, Sep 12, 2014 at 03:30:36PM +0800, Jianqun wrote:
> Add documentation for rockchip-max98090 driver, which is need by rockchip
> board using a max98090.

Can this use simple-card (perhaps after a bit of extension)?

> +- rockchip,audio-codec : The phandle of the MAX98090 audio codec.

Is the driver really specific to this CODEC?

> +
> +Optional properties:
> +- rockchip,hp-det-gpios : The GPIO that detect headphones are plugged in
> +- rockchip,mic-det-gpios : The GPIO that detect micphones are plugged in
> +
> +Example:
> +
> +sound {
> +	compatible = "rockchip,rockchip-audio-max98090";
> +	rockchip,model = "ROCKCHIP-I2S";
> +	rockchip,i2s-controller = <&i2s>;
> +	rockchip,audio-codec = <&max98090>;
> +	rockchip,hp-det-gpios = <&gpio6 5 GPIO_ACTIVE_HIGH>;
> +	rockchip,mic-det-gpios = <&gpio6 11 GPIO_ACTIVE_HIGH>;
> +};
> -- 
> 1.9.1
> 
> 
>
jianqun Sept. 28, 2014, 12:54 a.m. UTC | #2
在 09/12/2014 09:44 PM, Mark Brown 写道:
> On Fri, Sep 12, 2014 at 03:30:36PM +0800, Jianqun wrote:
>> Add documentation for rockchip-max98090 driver, which is need by rockchip
>> board using a max98090.
> 
> Can this use simple-card (perhaps after a bit of extension)?
I haven't ever try simple-card, is there any sample usage for me from other vendor ?
> 
>> +- rockchip,audio-codec : The phandle of the MAX98090 audio codec.
> 
> Is the driver really specific to this CODEC?
I think yes, we need to add two gpio for mic and hp detect, but simple-card driver hasn't them
> 
>> +
>> +Optional properties:
>> +- rockchip,hp-det-gpios : The GPIO that detect headphones are plugged in
>> +- rockchip,mic-det-gpios : The GPIO that detect micphones are plugged in
>> +
>> +Example:
>> +
>> +sound {
>> +	compatible = "rockchip,rockchip-audio-max98090";
>> +	rockchip,model = "ROCKCHIP-I2S";
>> +	rockchip,i2s-controller = <&i2s>;
>> +	rockchip,audio-codec = <&max98090>;
>> +	rockchip,hp-det-gpios = <&gpio6 5 GPIO_ACTIVE_HIGH>;
>> +	rockchip,mic-det-gpios = <&gpio6 11 GPIO_ACTIVE_HIGH>;
>> +};
>> -- 
>> 1.9.1
>>
>>
>>
Mark Brown Sept. 28, 2014, 10:48 a.m. UTC | #3
On Sun, Sep 28, 2014 at 08:54:27AM +0800, Jianqun wrote:

Please fix your mailer to word wrap within paragraphs.

> 在 09/12/2014 09:44 PM, Mark Brown 写道:
> > On Fri, Sep 12, 2014 at 03:30:36PM +0800, Jianqun wrote:
> >> Add documentation for rockchip-max98090 driver, which is need by rockchip
> >> board using a max98090.

> > Can this use simple-card (perhaps after a bit of extension)?
> I haven't ever try simple-card, is there any sample usage for me from other vendor ?

$ git grep -l simple-audio-card
Documentation/devicetree/bindings/sound/simple-card.txt
arch/arm/boot/dts/kirkwood-openrd-client.dts
arch/arm/boot/dts/kirkwood-t5325.dts
arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
arch/arm/boot/dts/vf610-twr.dts
sound/soc/generic/simple-card.c

> >> +- rockchip,audio-codec : The phandle of the MAX98090 audio codec.

> > Is the driver really specific to this CODEC?

> I think yes, we need to add two gpio for mic and hp detect, but simple-card driver hasn't them

That'd be the "possibly with some extensions" bit then...  if they're
just isolated GPIOs there's not really much board specific about having
them.
jianqun Sept. 28, 2014, 11:05 a.m. UTC | #4
在 09/28/2014 06:48 PM, Mark Brown 写道:
> On Sun, Sep 28, 2014 at 08:54:27AM +0800, Jianqun wrote:
> 
> Please fix your mailer to word wrap within paragraphs.
> 
>> 在 09/12/2014 09:44 PM, Mark Brown 写道:
>>> On Fri, Sep 12, 2014 at 03:30:36PM +0800, Jianqun wrote:
>>>> Add documentation for rockchip-max98090 driver, which is need by rockchip
>>>> board using a max98090.
> 
>>> Can this use simple-card (perhaps after a bit of extension)?
>> I haven't ever try simple-card, is there any sample usage for me from other vendor ?
> 
> $ git grep -l simple-audio-card
> Documentation/devicetree/bindings/sound/simple-card.txt
> arch/arm/boot/dts/kirkwood-openrd-client.dts
> arch/arm/boot/dts/kirkwood-t5325.dts
> arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
> arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
> arch/arm/boot/dts/vf610-twr.dts
> sound/soc/generic/simple-card.c
> 
thanks
>>>> +- rockchip,audio-codec : The phandle of the MAX98090 audio codec.
> 
>>> Is the driver really specific to this CODEC?
> 
>> I think yes, we need to add two gpio for mic and hp detect, but simple-card driver hasn't them
> 
> That'd be the "possibly with some extensions" bit then...  if they're
> just isolated GPIOs there's not really much board specific about having
> them.
> 
I'll try it first, thanks Mark
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/sound/rockchip,rockchip-audio-max98090.txt b/Documentation/devicetree/bindings/sound/rockchip,rockchip-audio-max98090.txt
new file mode 100644
index 0000000..1aa300e
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rockchip,rockchip-audio-max98090.txt
@@ -0,0 +1,23 @@ 
+ROCKCHIP audio complex, with MAX98090 CODEC
+
+Required properties:
+- compatible : must be "rockchip,rockchip-audio-max98090"
+- rockchip,model : the user-visible name of this sound complex
+- rockchip,i2s-controller : The phandle of the Tegra I2S controller that's
+  connected to the CODEC.
+- rockchip,audio-codec : The phandle of the MAX98090 audio codec.
+
+Optional properties:
+- rockchip,hp-det-gpios : The GPIO that detect headphones are plugged in
+- rockchip,mic-det-gpios : The GPIO that detect micphones are plugged in
+
+Example:
+
+sound {
+	compatible = "rockchip,rockchip-audio-max98090";
+	rockchip,model = "ROCKCHIP-I2S";
+	rockchip,i2s-controller = <&i2s>;
+	rockchip,audio-codec = <&max98090>;
+	rockchip,hp-det-gpios = <&gpio6 5 GPIO_ACTIVE_HIGH>;
+	rockchip,mic-det-gpios = <&gpio6 11 GPIO_ACTIVE_HIGH>;
+};