All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: <mazziesaccount@gmail.com>, <mikko.mutanen@fi.rohmeurope.com>,
	<heikki.haikola@fi.rohmeurope.com>, <broonie@kernel.org>,
	<gregkh@linuxfoundation.org>, <rafael@kernel.org>,
	<linux-kernel@vger.kernel.org>, <geert@linux-m68k.org>
Subject: Re: [PATCH] regmap: regmap-irq: Make irq-type callbak optional
Date: Fri, 4 Jan 2019 11:32:07 +0000	[thread overview]
Message-ID: <20190104113207.GT16508@imbe.wolfsonmicro.main> (raw)
In-Reply-To: <20190104111443.GS16508@imbe.wolfsonmicro.main>

On Fri, Jan 04, 2019 at 11:14:43AM +0000, Charles Keepax wrote:
> On Fri, Jan 04, 2019 at 12:31:15PM +0200, Matti Vaittinen wrote:
> > +	if (num_type_reg)
> > +		d->irq_chip.irq_set_type = regmap_irq_set_type;
> > +
> 
> Afraid this also causes regressions at my end, still having a bit
> of a look but it looks like some how this prevents properties of the
> IRQ getting passed along which causes my system to not probe
> properly with:
> 
> genirq: Flags mismatch irq 58. 00002088 (cs35l35) vs. 00002088 (cs35l35)
> cs35l35 0-0041: Failed to request IRQ: -16
> 

My case is a shared IRQ with 2 amps (cs35l35) connected to a CODEC
(wm8280).

So looks like the issue is if you don't have a set_type callback
then the IRQ ends up as IRQF_TRIGGER_NONE, which causes the
second IRQ to fail the middle check here in __setup_irq:

		if (!((old->flags & new->flags) & IRQF_SHARED) ||
		    (oldtype != (new->flags & IRQF_TRIGGER_MASK)) ||
		    ((old->flags ^ new->flags) & IRQF_ONESHOT)) {

Kinda inclined to just leave the fix as currently submitted and
just drop this patch? But I can do more testing etc. if we want
to push further down this road.

Thanks,
Charles

  reply	other threads:[~2019-01-04 11:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04 10:31 [PATCH] regmap: regmap-irq: Make irq-type callbak optional Matti Vaittinen
2019-01-04 11:14 ` Charles Keepax
2019-01-04 11:32   ` Charles Keepax [this message]
2019-01-04 12:14     ` Matti Vaittinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190104113207.GT16508@imbe.wolfsonmicro.main \
    --to=ckeepax@opensource.cirrus.com \
    --cc=broonie@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.haikola@fi.rohmeurope.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=mazziesaccount@gmail.com \
    --cc=mikko.mutanen@fi.rohmeurope.com \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.