On Thu, Sep 12, 2019 at 10:00:38AM +0800, shifu0704@thundersoft.com wrote:
From: Frank Shi shifu0704@thundersoft.com
add tas2770 smart PA kernel driver
Signed-off-by: Frank Shi shifu0704@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.