[alsa-devel] [PATCH] ASoC: Add device tree binding for WM8903

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Dec 1 18:11:42 CET 2011


On Thu, Dec 01, 2011 at 08:46:35AM -0800, Stephen Warren wrote:
> Mark Brown wrote at Thursday, December 01, 2011 6:26 AM:

> > This all seems really complicated and invasive, especially the
> > have_pdata flag.  Why not just always have a platform data structure and
> > fill it in from the device tree?

> The first patch set did that, and you objected to how it was structured...

No, that's what I asked you to do first time round (or at least what we
discussed on IRC).  The problem with the first version was that you had
two unrelated places where the defaults were specified, the problem with
this version is that you copy everything into new variables which makes
the diff really big and noisy.  I'd *really* expect the device tree data
to just be a different way of supplying platform data.

> > > +			trigger = irqd_get_trigger_type(irq_data);

> > This stuff isn't device tree specific.

> OK, I could remove the platform data's irq_active_low flag, and determine
> the IRQ polarity this way in all cases. Do you want that? I avoided doing
> it this time around since it'd affect non-device-tree users of the codec
> too, and I aimed for complete backwards compatibility (although that said,
> the only in-tree user is the Tegra machines, and they don't set this flag,
> so the impact would be minimal in-tree)

As a first step I'd use this code to set the default if the platform
data doesn't set the flag.


More information about the Alsa-devel mailing list