Re: [PATCH 1/2] mfd: Core support for the WM8400 AudioPlus HiFiCODEC and PMU

From: Mark Brown
Date: Wed Sep 10 2008 - 15:13:45 EST


On Wed, Sep 10, 2008 at 07:47:01PM +0100, Liam Girdwood wrote:
> On Wed, 2008-09-10 at 19:28 +0100, Mark Brown wrote:

> > +}
> > +EXPORT_SYMBOL_GPL(wm8400_block_read);

> Slight formatting difference with read and block read.

Erk, yeah. Will fix.

> > +void wm8400_notify_codec_reset(struct wm8400 *wm8400)
> > +{
> > + int i;
> > +
> > + mutex_lock(&wm8400->io_lock);
> > +
> > + /* Reset all codec registers to their initial value */
> > + for (i = 0; i < ARRAY_SIZE(wm8400->reg_cache); i++)
> > + if (reg_data[i].is_codec)
> > + wm8400->reg_cache[i] = reg_data[i].default_val;
> > +
> > + mutex_unlock(&wm8400->io_lock);
> > +}
> > +EXPORT_SYMBOL_GPL(wm8400_notify_codec_reset);
> > +

> I would probably rename this since it's really resetting the codec cache
> and not resetting the codec.

The notify in the name was supposed to cover that (implying that it's
notifying the core rather than actually doing the reset) but it's
obviously not doing the job. I think wm8400_reset_codec_reg_cache()
should be obvious enough?

> Fwiw, I've separated out the different wm8350 functions into separate
> headers - Imho, It just makes it a little easier to read.

Yeah, I considered doing that but decided that it was more trouble than
it was worth - the device has far fewer functions than the WM8350.
--
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/