lkml.org 
[lkml]   [2011]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [alsa-devel] [PATCH 1/3] ASoC: Add ADAU1701 codec driver
On Fri, Jun 10, 2011 at 07:18:49PM +0200, Lars-Peter Clausen wrote:
> This patch adds support for the Analog Devices ADAU1701 SigmaDSP.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

Looks OK but one thing it'd be nice to do:

> +static unsigned int adau1701_register_size(unsigned int reg)
> +{
> + switch (reg) {
> + case ADAU1701_DSPCTRL:
> + case ADAU1701_SEROCTL:
> + case ADAU1701_AUXNPOW:
> + case ADAU1701_OSCIPOW:
> + case ADAU1701_DACSET:
> + return 2;
> + case ADAU1701_SERICTL:
> + return 1;
> + }
> +
> + return 0;
> +}

I'd be happier if this complained loudly when it fell through the
switch in case something goes wrong. You've got checks in the callers
but I'd feel safer if the log were here in case we missed a caller.

Also someone should remonstrate with the hardware designers.


\
 
 \ /
  Last update: 2011-06-10 19:29    [from the cache]
©2003-2011 Jasper Spaans