RE: [PATCH] ASoC: Add max98088 CODEC driver

From: Peter Hsiang
Date: Tue Sep 21 2010 - 22:50:40 EST


On Fri, Sep 03, 2010, Mark Brown wrote:
> On Thu, Sep 02, 2010 at 04:30:14PM -0700, Peter Hsiang wrote:
> > On Wed, Sep 01, 2010, Mark Brown wrote:
>
> > > > +/*
> > > > + * Read the MAX98088 I2C register space
> > > > + * Note: this driver source code is backward compatible to kernel
> > > > + * version 2.6.32.
> > > > + */
> > > > +static unsigned int max98088_read(struct snd_soc_codec *codec,
> > > > + unsigned int reg)
>
> > > Just use soc-cache. Compatibility code for older kernels isn't really
> > > acceptable for mainline due to the increased maintainance burden and it
> > > will at best result in a driver that doesn't work as well as possible.
>
> > This integrated registers feature is not available in 2.6.32
> > Is it ok with you to keep it this way for this release? Thanks.
>
> No, you should use the features of the current kernel. For your
> backport you can do things like supply soc-cache.c as well.

The soc-cache.c in the latest kernel-next version supports codecs
with volatile registers in 16 bit mode, but not for the 8 bit mode.
See snd_soc_8_8_write.

The source code comments confirmed this:
"Note at present this code can not be used by CODECs with
volatile registers."

For this codec (with volatile registers), should we use the read
and write functions in the codec driver until the 8-bit mode is
supported by Linux soc-cache.c?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/