[alsa-devel] [PATCH v3] tas2770: add tas2770 smart PA kernel driver

Mark Brown broonie at kernel.org
Thu Sep 12 13:17:40 CEST 2019


On Thu, Sep 12, 2019 at 10:00:38AM +0800, shifu0704 at thundersoft.com wrote:
> From: Frank Shi <shifu0704 at thundersoft.com>
> 
> add tas2770 smart PA kernel driver
> 
> Signed-off-by: Frank Shi <shifu0704 at thundersoft.com>
> ---
>  sound/soc/codecs/Kconfig   |   5 +
>  sound/soc/codecs/Makefile  |   2 +
>  sound/soc/codecs/tas2770.c | 952 +++++++++++++++++++++++++++++++++++++++++++++
>  sound/soc/codecs/tas2770.h | 166 ++++++++

We've lost the device tree binding patch from this version?

> +static int tas2770_regmap_read(struct tas2770_priv *tas2770,
> +			unsigned int reg, unsigned int *value)
> +{
> +	int result = 0;
> +	int retry_count = TAS2770_I2C_RETRY_COUNT;
> +
> +	while (retry_count--) {
> +		result = snd_soc_component_read(tas2770->component, reg,
> +			value);
> +		if (!result)
> +			break;
> +
> +		msleep(20);
> +	}
> +	if (!retry_count)
> +		return -ETIMEDOUT;
> +
> +	return 0;
> +}

It looks like we still have this code for what appears to be
handling the device randomly resetting underneath the driver.
Please, as I've said on both prior versions, split this out into
a separate patch to ease review and explain why this is required.
Start off with a simple driver which looks like normal drivers,
add this stuff later.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20190912/19eb05f4/attachment.sig>


More information about the Alsa-devel mailing list