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

Mark Brown broonie at opensource.wolfsonmicro.com
Sat Dec 3 12:17:14 CET 2011


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.

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).


More information about the Alsa-devel mailing list