Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: add devicetree support for WM8961 codec

Merge series from Doug Brown <doug@schmorgal.com>:

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.

+48 -1
+40
Documentation/devicetree/bindings/sound/wlf,wm8961.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/sound/wlf,wm8961.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Wolfson WM8961 Ultra-Low Power Stereo CODEC 8 + 9 + maintainers: 10 + - patches@opensource.cirrus.com 11 + 12 + properties: 13 + compatible: 14 + const: wlf,wm8961 15 + 16 + reg: 17 + maxItems: 1 18 + 19 + '#sound-dai-cells': 20 + const: 0 21 + 22 + required: 23 + - compatible 24 + - reg 25 + - '#sound-dai-cells' 26 + 27 + additionalProperties: false 28 + 29 + examples: 30 + - | 31 + i2c { 32 + #address-cells = <1>; 33 + #size-cells = <0>; 34 + 35 + wm8961: codec@4a { 36 + compatible = "wlf,wm8961"; 37 + reg = <0x4a>; 38 + #sound-dai-cells = <0>; 39 + }; 40 + };
+1 -1
sound/soc/codecs/Kconfig
··· 1930 1930 depends on I2C 1931 1931 1932 1932 config SND_SOC_WM8961 1933 - tristate 1933 + tristate "Wolfson Microelectronics WM8961 CODEC" 1934 1934 depends on I2C 1935 1935 1936 1936 config SND_SOC_WM8962
+7
sound/soc/codecs/wm8961.c
··· 971 971 }; 972 972 MODULE_DEVICE_TABLE(i2c, wm8961_i2c_id); 973 973 974 + static const struct of_device_id wm8961_of_match[] __maybe_unused = { 975 + { .compatible = "wlf,wm8961", }, 976 + { } 977 + }; 978 + MODULE_DEVICE_TABLE(of, wm8961_of_match); 979 + 974 980 static struct i2c_driver wm8961_i2c_driver = { 975 981 .driver = { 976 982 .name = "wm8961", 983 + .of_match_table = of_match_ptr(wm8961_of_match), 977 984 }, 978 985 .probe_new = wm8961_i2c_probe, 979 986 .id_table = wm8961_i2c_id,