[PATCH v2 0/3] ASoC: add devicetree support for WM8961 codec
This series adds devicetree support for the Wolfson WM8961 codec. The first patch adds a schema, the second patch hooks it up in the code, and the third patch allows it to be selected in Kconfig.
Changes since v1: - Fix ordering of property lists and example in schema - Fix wording of commit message - Fix unused variable warning - Split Kconfig change to separate commit
Doug Brown (3): ASoC: dt-bindings: add schema for WM8961 ASoC: wm8961: add support for devicetree ASoC: codecs: allow WM8961 to be selected by the user
.../devicetree/bindings/sound/wlf,wm8961.yaml | 40 +++++++++++++++++++ sound/soc/codecs/Kconfig | 2 +- sound/soc/codecs/wm8961.c | 7 ++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8961.yaml
Create a simple DT schema for the existing Wolfson WM8961 driver so that DT support can be added to the driver.
Signed-off-by: Doug Brown doug@schmorgal.com --- .../devicetree/bindings/sound/wlf,wm8961.yaml | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8961.yaml
diff --git a/Documentation/devicetree/bindings/sound/wlf,wm8961.yaml b/Documentation/devicetree/bindings/sound/wlf,wm8961.yaml new file mode 100644 index 000000000000..795d34e1e97a --- /dev/null +++ b/Documentation/devicetree/bindings/sound/wlf,wm8961.yaml @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/wlf,wm8961.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Wolfson WM8961 Ultra-Low Power Stereo CODEC + +maintainers: + - patches@opensource.cirrus.com + +properties: + compatible: + const: wlf,wm8961 + + reg: + maxItems: 1 + + '#sound-dai-cells': + const: 0 + +required: + - compatible + - reg + - '#sound-dai-cells' + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + wm8961: codec@4a { + compatible = "wlf,wm8961"; + reg = <0x4a>; + #sound-dai-cells = <0>; + }; + };
On 03/10/2022 05:24, Doug Brown wrote:
Create a simple DT schema for the existing Wolfson WM8961 driver so that DT support can be added to the driver.
Signed-off-by: Doug Brown doug@schmorgal.com
Reviewed-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
Best regards, Krzysztof
On Sun, Oct 02, 2022 at 08:24:12PM -0700, Doug Brown wrote:
Create a simple DT schema for the existing Wolfson WM8961 driver so that DT support can be added to the driver.
Signed-off-by: Doug Brown doug@schmorgal.com
Acked-by: Charles Keepax ckeepax@opensource.cirrus.com
Thanks, Charles
Add support for devicetree to the WM8961 driver so it can be used with modern DT-based kernels.
Signed-off-by: Doug Brown doug@schmorgal.com --- sound/soc/codecs/wm8961.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c index 7dc6aaf65576..a4857024711d 100644 --- a/sound/soc/codecs/wm8961.c +++ b/sound/soc/codecs/wm8961.c @@ -971,9 +971,16 @@ static const struct i2c_device_id wm8961_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, wm8961_i2c_id);
+static const struct of_device_id wm8961_of_match[] __maybe_unused = { + { .compatible = "wlf,wm8961", }, + { } +}; +MODULE_DEVICE_TABLE(of, wm8961_of_match); + static struct i2c_driver wm8961_i2c_driver = { .driver = { .name = "wm8961", + .of_match_table = of_match_ptr(wm8961_of_match), }, .probe_new = wm8961_i2c_probe, .id_table = wm8961_i2c_id,
On Sun, Oct 02, 2022 at 08:24:13PM -0700, Doug Brown wrote:
Add support for devicetree to the WM8961 driver so it can be used with modern DT-based kernels.
Signed-off-by: Doug Brown doug@schmorgal.com
Acked-by: Charles Keepax ckeepax@opensource.cirrus.com
Thanks, Charles
Allow the WM8961 driver to be enabled independently now that it is usable with devicetree.
Signed-off-by: Doug Brown doug@schmorgal.com --- sound/soc/codecs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index e3b90c425faf..2b5787ee8d31 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -1929,7 +1929,7 @@ config SND_SOC_WM8960 depends on I2C
config SND_SOC_WM8961 - tristate + tristate "Wolfson Microelectronics WM8961 CODEC" depends on I2C
config SND_SOC_WM8962
On Sun, Oct 02, 2022 at 08:24:14PM -0700, Doug Brown wrote:
Allow the WM8961 driver to be enabled independently now that it is usable with devicetree.
Signed-off-by: Doug Brown doug@schmorgal.com
Acked-by: Charles Keepax ckeepax@opensource.cirrus.com
Thanks, Charles
On Sun, 2 Oct 2022 20:24:11 -0700, Doug Brown wrote:
This series adds devicetree support for the Wolfson WM8961 codec. The first patch adds a schema, the second patch hooks it up in the code, and the third patch allows it to be selected in Kconfig.
Changes since v1:
- Fix ordering of property lists and example in schema
- Fix wording of commit message
- Fix unused variable warning
- Split Kconfig change to separate commit
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/3] ASoC: dt-bindings: add schema for WM8961 commit: b9b0d88d87e5565e8d12bcf22ec601e8b4658dc6 [2/3] ASoC: wm8961: add support for devicetree commit: c96851ee8195c820b765c6a7effcec79c81eb9c6 [3/3] ASoC: codecs: allow WM8961 to be selected by the user commit: 74a6a948c8fc28c8937e24178739979b3cd2ce14
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
participants (4)
-
Charles Keepax
-
Doug Brown
-
Krzysztof Kozlowski
-
Mark Brown