[PATCH 2/2] ASoC: wm8961: add support for devicetree

Krzysztof Kozlowski krzysztof.kozlowski at linaro.org
Sun Oct 2 10:08:19 CEST 2022


On 01/10/2022 22:00, Doug Brown wrote:
> This adds support for devicetree to the WM8961 driver so it can be used

Do not use "This commit/patch adds ...".
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95

Just "Add support for ..."


> with modern DT-based kernels.
> 
> Signed-off-by: Doug Brown <doug at schmorgal.com>
> ---
>  sound/soc/codecs/Kconfig  | 2 +-
>  sound/soc/codecs/wm8961.c | 6 ++++++
>  2 files changed, 7 insertions(+), 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"

This is independent change. Please split to separate commit.

>  	depends on I2C
>  
>  config SND_SOC_WM8962
> diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c
> index 7dc6aaf65576..539096184eda 100644
> --- a/sound/soc/codecs/wm8961.c
> +++ b/sound/soc/codecs/wm8961.c
> @@ -971,6 +971,12 @@ 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[] = {
> +	{ .compatible = "wlf,wm8961", },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(of, wm8961_of_match);

Compile-test with W=1 and without CONFIG_OF. Is there a warning here?

Best regards,
Krzysztof



More information about the Alsa-devel mailing list