Commit a474dce8 authored by Mark Brown's avatar Mark Brown

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.
parents 46234fbe 74a6a948
# 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>;
};
};
...@@ -1930,7 +1930,7 @@ config SND_SOC_WM8960 ...@@ -1930,7 +1930,7 @@ config SND_SOC_WM8960
depends on I2C depends on I2C
config SND_SOC_WM8961 config SND_SOC_WM8961
tristate tristate "Wolfson Microelectronics WM8961 CODEC"
depends on I2C depends on I2C
config SND_SOC_WM8962 config SND_SOC_WM8962
......
...@@ -971,9 +971,16 @@ static const struct i2c_device_id wm8961_i2c_id[] = { ...@@ -971,9 +971,16 @@ static const struct i2c_device_id wm8961_i2c_id[] = {
}; };
MODULE_DEVICE_TABLE(i2c, 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 = { static struct i2c_driver wm8961_i2c_driver = {
.driver = { .driver = {
.name = "wm8961", .name = "wm8961",
.of_match_table = of_match_ptr(wm8961_of_match),
}, },
.probe_new = wm8961_i2c_probe, .probe_new = wm8961_i2c_probe,
.id_table = wm8961_i2c_id, .id_table = wm8961_i2c_id,
......
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