Commit 3d345b5f authored by Fabio Estevam's avatar Fabio Estevam Committed by Mark Brown

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.htmlSigned-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: default avatarŁukasz Majewski <lukma@denx.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2bd6bf03
NXP TFA9879 class-D audio amplifier
Required properties:
- compatible : "nxp,tfa9879"
- reg : the I2C address of the device
Example:
&i2c1 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c1>;
status = "okay";
codec: tfa9879@6c {
#sound-dai-cells = <0>;
compatible = "nxp,tfa9879";
reg = <0x6c>;
};
};
...@@ -312,9 +312,15 @@ static const struct i2c_device_id tfa9879_i2c_id[] = { ...@@ -312,9 +312,15 @@ static const struct i2c_device_id tfa9879_i2c_id[] = {
}; };
MODULE_DEVICE_TABLE(i2c, tfa9879_i2c_id); MODULE_DEVICE_TABLE(i2c, tfa9879_i2c_id);
static const struct of_device_id tfa9879_of_match[] = {
{ .compatible = "nxp,tfa9879", },
{ }
};
static struct i2c_driver tfa9879_i2c_driver = { static struct i2c_driver tfa9879_i2c_driver = {
.driver = { .driver = {
.name = "tfa9879", .name = "tfa9879",
.of_match_table = tfa9879_of_match,
}, },
.probe = tfa9879_i2c_probe, .probe = tfa9879_i2c_probe,
.remove = tfa9879_i2c_remove, .remove = tfa9879_i2c_remove,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment