Re: [PATCH v1] ASoC: tas2505: Add tas2505 driver

From: Mark Brown
Date: Fri Jul 14 2023 - 09:46:37 EST


On Wed, Jul 12, 2023 at 12:43:21PM +0800, Kevin Lu wrote:

> + val = (ucontrol->value.integer.value[0] & 0x7f);
> + val = mc->invert ? mc->max - val : val;
> + val = (val < 0) ? 0 : val;

Please write normal if statements, it helps with legibility.

> + .num_reg_defaults = ARRAY_SIZE(tas2505_reg_defaults),
> + .cache_type = REGCACHE_RBTREE,

Please use REGCACHE_MAPLE for new devices where you'd otherwise have
used RBTREE unless there's a particular reason - it's more modern.

Attachment: signature.asc
Description: PGP signature