ASoC: tfa9879: Add device tree bindings
Subsystems (4)
PATCH 1/1 ASoC: tfa9879: Add device tree bindings
From: Fabio Estevam <[email protected]>
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
---
Hi Lukasz,
Could you please test this on your hardware?
.../devicetree/bindings/sound/tfa9879.txt | 23 ++++++++++++++++++++++ sound/soc/codecs/tfa9879.c | 6 ++++++ 2 files changed, 29 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/tfa9879.txt
Documentation/devicetree/bindings/sound/tfa9879.txt new file +23 -0
@@ -0,0 +1,23 @@ +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>; + }; +}; +
sound/soc/codecs/tfa9879.c +6 -0
@@ -312,9 +312,15 @@ static const struct i2c_device_id 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 = { .driver = { .name ="tfa9879" , + .of_match_table = tfa9879_of_match, }, .probe = tfa9879_i2c_probe, .remove = tfa9879_i2c_remove,
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1505861944-32447-1-git-send-email-festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Łukasz Majewski
Reviewed-byQuoted 59 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
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 <[email protected]>---
Hi Lukasz,Could you please test this on your hardware?
.../devicetree/bindings/sound/tfa9879.txt | 23 ++++++++++++++++++++++ sound/soc/codecs/tfa9879.c | 6 ++++++ 2 files changed, 29 insertions(+)create mode 100644
Documentation/devicetree/bindings/sound/tfa9879.txtDocumentation/devicetree/bindings/sound/tfa9879.txt new file +23
-0@@ -0,0 +1,23 @@ +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>; + }; +}; +sound/soc/codecs/tfa9879.c +2
-0@@ -312,9 +312,15 @@ static const struct i2c_device_id tfa9879_i2c_id[] = { };MODULE_DEVICE_TABLE (i2c, tfa9879_i2c_id); +static const struct of_device_id tfa9879_of_match[] = { + { .compatible ="nxp,tfa9879" , },
sound/soc/codecs/tfa9879.c static const struct i2c_device_id tfa9879_i2c_id[] = { · line 326
Quoted 10 lines
sound/soc/codecs/tfa9879.c +4
-0+ { } +}; +static struct i2c_driver tfa9879_i2c_driver = { .driver = { .name ="tfa9879" , + .of_match_table = tfa9879_of_match, }, .probe = tfa9879_i2c_probe, .remove = tfa9879_i2c_remove,
Signature · 13 lines
Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Applied "ASoC: tfa9879: Add device tree bindings" to the asoc tree
In reply to a message not in the archiveThe patch
ASoC: tfa9879: Add device tree bindings
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
3d345b5f7b2f613b6965fc3fc68de9f439752ffeMon Sep 17 00:00:00 2001
From: Fabio Estevam <[email protected]>
Date: Tue, 19 Sep 2017 19:59:04 -0300
Subject: [PATCH] ASoC: tfa9879: Add device tree bindings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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
--- .../devicetree/bindings/sound/tfa9879.txt | 23 ++++++++++++++++++++++ sound/soc/codecs/tfa9879.c | 6 ++++++ 2 files changed, 29 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/tfa9879.txt
Documentation/devicetree/bindings/sound/tfa9879.txt new file +23 -0
@@ -0,0 +1,23 @@ +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>; + }; +}; +
sound/soc/codecs/tfa9879.c +6 -0
@@ -312,9 +312,15 @@ static const struct i2c_device_id 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 = { .driver = { .name ="tfa9879" , + .of_match_table = tfa9879_of_match, }, .probe = tfa9879_i2c_probe, .remove = tfa9879_i2c_remove,
Signature · 6 lines
2.13.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html