Re: [alsa-devel] [PATCHv4 2/7] ASoC: TWL6030: Add twl6030 codec driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 24, 2010 at 10:38:01AM +0000, Liam Girdwood wrote:
> On Tue, 2010-02-23 at 18:10 -0600, Olaya, Margarita wrote:

> > +       twl_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, &value, reg);
> > +       twl6030_write_reg_cache(codec, reg, value);

> You probably want to read from the cache if the register is not
> volatile. This saves a slow I2C read.

...and if you don't satisfy reads from the cache you may as well not
bother with it - it's just consuming memory.

> > +               /* skip read-only registers (ASICID, ASICREV, STATUS) */
> > +               if ((reg == TWL6030_REG_ASICID) ||
> > +                   (reg == TWL6030_REG_ASICREV) ||
> > +                   (reg == TWL6030_REG_STATUS))
> > +                       continue;
> > +               twl6030_write(codec, reg, cache[reg]);

A switch statement would be nicer here.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux