From: Nicolin Chen <nicoleotsuka@gmail.com>
To: broonie@kernel.org, bardliao@realtek.com, oder_chiou@realtek.com
Cc: lgirdwood@gmail.com, linux-kernel@vger.kernel.org,
alsa-devel@alsa-project.org
Subject: [PATCH] ASoC: rt5659: Enable IRQ output for GPIO1 pin
Date: Wed, 24 Aug 2016 12:03:39 -0700 [thread overview]
Message-ID: <1472065419-22058-1-git-send-email-nicoleotsuka@gmail.com> (raw)
Since it's possible to have an IRQ without enabling JD3, the
GPIO1 pin then would remain its default GPIO function which
is set as an input direction (seeing from rt5659). Meanwhile,
CPU would also listen this connection via its own GPIO input:
[input] [input]
CPU GPIO <--------> RT5659 GPIO1
The result for the IRQ on the CPU side will be unexpectable.
So this patch enables the IRQ output for GPIO1 pin any way
as long as there's an IRQ assigned from platform data or DT:
[input] [IRQ output]
CPU GPIO <--------< RT5659 GPIO1
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
---
sound/soc/codecs/rt5659.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/codecs/rt5659.c b/sound/soc/codecs/rt5659.c
index 4c0d2b8..db54550 100644
--- a/sound/soc/codecs/rt5659.c
+++ b/sound/soc/codecs/rt5659.c
@@ -4189,6 +4189,9 @@ static int rt5659_i2c_probe(struct i2c_client *i2c,
if (ret)
dev_err(&i2c->dev, "Failed to reguest IRQ: %d\n", ret);
+ /* Enable IRQ output for GPIO1 pin any way */
+ regmap_update_bits(rt5659->regmap, RT5659_GPIO_CTRL_1,
+ RT5659_GP1_PIN_MASK, RT5659_GP1_PIN_IRQ);
}
return snd_soc_register_codec(&i2c->dev, &soc_codec_dev_rt5659,
--
2.1.4
reply other threads:[~2016-08-24 19:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1472065419-22058-1-git-send-email-nicoleotsuka@gmail.com \
--to=nicoleotsuka@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=bardliao@realtek.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oder_chiou@realtek.com \
/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).