Re: [PATCH 2/2] ASoC: codecs: Add aw88166 amplifier driver

From: Markus Elfring
Date: Tue Feb 25 2025 - 08:15:26 EST



> The driver is for amplifiers aw88166 of Awinic Technology


You may occasionally put more than 57 characters into text lines
of such a change description.


See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.14-rc4#n94



> +++ b/sound/soc/codecs/aw88166.c
> @@ -0,0 +1,1937 @@

> +static int aw_dev_dsp_read(struct aw_device *aw_dev,
+ unsigned short dsp_addr, unsigned int *dsp_data, unsigned char data_type)
> +{

> + mutex_lock(&aw_dev->dsp_lock);
> + switch (data_type) {
> + case AW88166_DSP_16_DATA:

> + mutex_unlock(&aw_dev->dsp_lock);
> +
> + return ret;
> +}


Under which circumstances would you become interested to apply a statement
like “guard(mutex)(&aw_dev->dsp_lock);”?
https://elixir.bootlin.com/linux/v6.14-rc4/source/include/linux/mutex.h#L201

Regards,
Markus