aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@nxp.com>2017-09-19 18:59:04 -0400
committerMark Brown <broonie@kernel.org>2017-09-20 07:39:47 -0400
commit3d345b5f7b2f613b6965fc3fc68de9f439752ffe (patch)
treefbdec5d08a6a2237af272ca19914573f46f33ca0
parent2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff)
ASoC: tfa9879: Add device tree bindings
Even though the tfa9879 driver can probe via device tree trough the I2C core code, it is preferable to have explicit device tree bindings instead [1], so add this support. [1] https://www.spinics.net/lists/devicetree/msg195176.html Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Ɓukasz Majewski <lukma@denx.de> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--Documentation/devicetree/bindings/sound/tfa9879.txt23
-rw-r--r--sound/soc/codecs/tfa9879.c6
2 files changed, 29 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/sound/tfa9879.txt b/Documentation/devicetree/bindings/sound/tfa9879.txt
new file mode 100644
index 000000000000..23ba522d9e2b
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/tfa9879.txt
@@ -0,0 +1,23 @@
1NXP TFA9879 class-D audio amplifier
2
3Required properties:
4
5- compatible : "nxp,tfa9879"
6
7- reg : the I2C address of the device
8
9Example:
10
11&i2c1 {
12 clock-frequency = <100000>;
13 pinctrl-names = "default";
14 pinctrl-0 = <&pinctrl_i2c1>;
15 status = "okay";
16
17 codec: tfa9879@6c {
18 #sound-dai-cells = <0>;
19 compatible = "nxp,tfa9879";
20 reg = <0x6c>;
21 };
22};
23
diff --git a/sound/soc/codecs/tfa9879.c b/sound/soc/codecs/tfa9879.c
index 95e0a7abeb7a..f8dd67ca0744 100644
--- a/sound/soc/codecs/tfa9879.c
+++ b/sound/soc/codecs/tfa9879.c
@@ -312,9 +312,15 @@ static const struct i2c_device_id tfa9879_i2c_id[] = {
312}; 312};
313MODULE_DEVICE_TABLE(i2c, tfa9879_i2c_id); 313MODULE_DEVICE_TABLE(i2c, tfa9879_i2c_id);
314 314
315static const struct of_device_id tfa9879_of_match[] = {
316 { .compatible = "nxp,tfa9879", },
317 { }
318};
319
315static struct i2c_driver tfa9879_i2c_driver = { 320static struct i2c_driver tfa9879_i2c_driver = {
316 .driver = { 321 .driver = {
317 .name = "tfa9879", 322 .name = "tfa9879",
323 .of_match_table = tfa9879_of_match,
318 }, 324 },
319 .probe = tfa9879_i2c_probe, 325 .probe = tfa9879_i2c_probe,
320 .remove = tfa9879_i2c_remove, 326 .remove = tfa9879_i2c_remove,