[alsa-devel] [PATCH v2] tas2770: add tas2770 smart PA kernel driver
Mark Brown
broonie at kernel.org
Wed Sep 11 12:51:31 CEST 2019
On Wed, Sep 11, 2019 at 06:25:29PM +0800, shifu0704 at thundersoft.com wrote:
> +++ b/sound/soc/codecs/tas2770.c
> @@ -0,0 +1,954 @@
> +/*
> + * SPDX-License-Identifier: GPL-2.0
> + *
> + * ALSA SoC Texas Instruments TAS2770 20-W Digital Input Mono Class-D
> + * Audio Amplifier with Speaker I/V Sense
> + *
> + * Copyright (C) 2016-2017 Texas Instruments Incorporated - http://www.ti.com/
> + * Author: Tracy Yi <tracy-yi at ti.com>
> + * Shi Fu <shifu0704 at thundersoft.com>
> + */
This is a C style comment not a C++ style comment.
> +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;
This appears to be the same as the previous version? It looks
like we still have code to hande the device randomly resetting
underneath the driver - like I said we really need to understand
why that's being done, I'd strongly suggest splitting that code
out into a separate patch so we can review the base driver and
hopefully merge it while we discuss this reboot support.
-------------- 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/20190911/5eec325b/attachment.sig>
More information about the Alsa-devel
mailing list