[alsa-devel] [PATCH v2 4/5] ASoC: WM8903: Get default irq_active_low from IRQ controller

Stephen Warren swarren at nvidia.com
Mon Dec 5 17:52:19 CET 2011


Mark Brown wrote at Saturday, December 03, 2011 4:17 AM:
> On Fri, Dec 02, 2011 at 03:08:40PM -0700, Stephen Warren wrote:
> 
> > +	switch (irqd_get_trigger_type(irq_data)) {
> > +	case IRQ_TYPE_NONE:
> > +		/*
> > +		* We assume the controller imposes no restrictions,
> > +		* so we are able to select active-high
> > +		*/
> > +		/* Fall-through */
> > +	case IRQ_TYPE_LEVEL_HIGH:
> > +		pdata->irq_active_low = false;
> > +		break;
> > +	case IRQ_TYPE_LEVEL_LOW:
> > +		pdata->irq_active_low = true;
> > +		break;
> > +	default:
> > +		dev_err(&i2c->dev,
> > +			"Unsupported IRQ_TYPE %x\n",
> > +			irqd_get_trigger_type(irq_data));
> > +		return -EINVAL;
> 
> Actually, it occurs to me that we should treat the default case in the
> same way as IRQ_TYPE_NONE - even if the interrupt controller defaults to
> an edge triggered mode which we can't use it might also support a level
> triggered interrupt we can use.  If it doesn't then we'll just fail
> later on when we request the IRQ so the end result should be the same.

Yes, deferring the failure to later seems reasonable; it's probably better
to work somehow if the HW supports it rather than being anal about e.g.
incorrect device tree content.

> Don't worry about respinning for this unless the series needs to get
> resent for some other reason let's just fix it incrementally (I'll do
> that myself when I apply unless you want to).

I'm fine if you change that when applying it.

Thanks.

-- 
nvpublic



More information about the Alsa-devel mailing list