10 Jun
2011
10 Jun
'11
7:27 p.m.
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.