From: Mark Brown <broonie@kernel.org>
To: Fletcher Woodruff <fletcherw@chromium.org>
Cc: linux-kernel@vger.kernel.org, Ben Zhang <benzh@chromium.org>,
Bard Liao <bardliao@realtek.com>,
Jaroslav Kysela <perex@perex.cz>,
Liam Girdwood <lgirdwood@gmail.com>,
Oder Chiou <oder_chiou@realtek.com>,
Takashi Iwai <tiwai@suse.com>,
Curtis Malainey <cujomalainey@chromium.org>,
Ross Zwisler <zwisler@google.org>,
alsa-devel@alsa-project.org
Subject: Re: [PATCH 1/2] ASoC: rt5677: allow multiple interrupt sources
Date: Tue, 2 Apr 2019 12:02:36 +0700 [thread overview]
Message-ID: <20190402050236.GV2059@sirena.org.uk> (raw)
In-Reply-To: <20190401205519.34023-1-fletcherw@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]
On Mon, Apr 01, 2019 at 02:55:18PM -0600, Fletcher Woodruff wrote:
> From: Ben Zhang <benzh@chromium.org>
>
> This patch allows headphone plug detect and mic present
> detect to be enabled at the same time. This patch implements
> an irq_chip with irq_domain directly instead of using
> regmap_irq, so that interrupt source line polarities can
> be flipped to support irq sharing.
regmap-irq should support active high/low, and if it doesn't it can't be
a unique thing that only this device wants to implement so the common
code should be improved.
> + mutex_lock(&rt5677->irq_lock);
> + /*
> + * Loop to handle interrupts until the last i2c read shows no pending
> + * irqs. The interrupt line is shared by multiple interrupt sources.
> + * After the regmap_read() below, a new interrupt source line may
> + * become high before the regmap_write() finishes, so there isn't a
> + * rising edge on the shared interrupt line for the new interrupt. Thus,
> + * the loop is needed to avoid missing irqs.
> + *
> + * A safeguard of 20 loops is used to avoid hanging in the irq handler
> + * if there is something wrong with the interrupt status update. The
> + * interrupt sources here are audio jack plug/unplug events which
> + * shouldn't happen at a high frequency for a long period of time.
> + * Empirically, more than 3 loops have never been seen.
> + */
> + for (loop = 0; loop < 20; loop++) {
This looks unrelated to the polarity of the interupt?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-04-02 5:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-01 20:55 [PATCH 1/2] ASoC: rt5677: allow multiple interrupt sources Fletcher Woodruff
2019-04-01 20:55 ` [PATCH 2/2] ASoC: rt5677: make ACPI property names match _DSD Fletcher Woodruff
2019-04-02 5:06 ` Mark Brown
2019-04-02 15:52 ` Fletcher Woodruff
2019-04-03 3:33 ` Mark Brown
2019-04-05 20:42 ` [PATCH v2 0/3] Fix jack detection for Chromebook Pixel Fletcher Woodruff
2019-04-05 20:42 ` [PATCH v2 1/3] ASoC: rt5677: allow multiple interrupt sources Fletcher Woodruff
2019-04-08 6:10 ` Mark Brown
2019-04-09 19:53 ` Fletcher Woodruff
2019-04-05 20:42 ` [PATCH v2 2/3] ASoC: rt5677: handle concurrent interrupts Fletcher Woodruff
2019-04-05 20:42 ` [PATCH v2 3/3] ASoC: rt5677: fall back to DT prop names on error Fletcher Woodruff
2019-04-15 19:45 ` [PATCH v3 0/3] Fix jack detection for Chromebook Pixel Fletcher Woodruff
2019-04-15 19:45 ` [PATCH v3 1/3] ASoC: rt5677: allow multiple interrupt sources Fletcher Woodruff
2019-04-25 15:31 ` [PATCH v3 2/3] ASoC: rt5677: handle concurrent interrupts Fletcher Woodruff
2019-04-25 15:31 ` [PATCH v3 3/3] ASoC: rt5677: fall back to DT prop names on error Fletcher Woodruff
2019-04-18 9:07 ` [PATCH v3 0/3] Fix jack detection for Chromebook Pixel Mark Brown
2019-04-25 15:28 ` Fletcher Woodruff
2019-04-02 5:02 ` Mark Brown [this message]
2019-04-03 21:32 ` [PATCH 1/2] ASoC: rt5677: allow multiple interrupt sources Fletcher Woodruff
2019-04-04 5:32 ` Mark Brown
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=20190402050236.GV2059@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=bardliao@realtek.com \
--cc=benzh@chromium.org \
--cc=cujomalainey@chromium.org \
--cc=fletcherw@chromium.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oder_chiou@realtek.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=zwisler@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).