diff mbox

[2/2] ASoC: rt5514: Set the pin GPIO6(IRQ) to output low as default

Message ID 1501480063-32225-2-git-send-email-oder_chiou@realtek.com (mailing list archive)
State New, archived
Headers show

Commit Message

Oder Chiou July 31, 2017, 5:47 a.m. UTC
The patch set the pin GPIO6(IRQ) to output low as default to prevent the
IRQ pin to trigger the IRQ function continuously in the float status.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
---
 sound/soc/codecs/rt5514.c | 6 ++++--
 sound/soc/codecs/rt5514.h | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

Comments

Mark Brown Aug. 1, 2017, 1:10 p.m. UTC | #1
On Mon, Jul 31, 2017 at 01:47:43PM +0800, Oder Chiou wrote:
> The patch set the pin GPIO6(IRQ) to output low as default to prevent the
> IRQ pin to trigger the IRQ function continuously in the float status.

Isn't this going to be a board specific thing?  If it's a GPIO
presumably it could have other configurations and it might cause
problems (perhaps even damage) if it has been used for some other
purpose.
diff mbox

Patch

diff --git a/sound/soc/codecs/rt5514.c b/sound/soc/codecs/rt5514.c
index 21cbb56..7a1c2aa 100644
--- a/sound/soc/codecs/rt5514.c
+++ b/sound/soc/codecs/rt5514.c
@@ -58,7 +58,8 @@  static const struct reg_sequence rt5514_i2c_patch[] = {
 };
 
 static const struct reg_sequence rt5514_patch[] = {
-	{RT5514_DIG_IO_CTRL,		0x00000040},
+	{RT5514_DIG_IO_CTRL,		0x00000240},
+	{RT5514_GPIO_CTRL1,		0x04000000},
 	{RT5514_CLK_CTRL1,		0x38020041},
 	{RT5514_SRC_CTRL,		0x44000eee},
 	{RT5514_ANA_CTRL_LDO10,		0x00028604},
@@ -74,7 +75,8 @@  static const struct reg_default rt5514_reg[] = {
 	{RT5514_I2S_CTRL2,		0x20000000},
 	{RT5514_VAD_CTRL6,		0xc00007d2},
 	{RT5514_EXT_VAD_CTRL,		0x80000080},
-	{RT5514_DIG_IO_CTRL,		0x00000040},
+	{RT5514_DIG_IO_CTRL,		0x00000240},
+	{RT5514_GPIO_CTRL1,		0x04000000},
 	{RT5514_PAD_CTRL1,		0x00804000},
 	{RT5514_DMIC_DATA_CTRL,		0x00000005},
 	{RT5514_DIG_SOURCE_CTRL,	0x00000002},
diff --git a/sound/soc/codecs/rt5514.h b/sound/soc/codecs/rt5514.h
index 2dc40e6..3da40d1 100644
--- a/sound/soc/codecs/rt5514.h
+++ b/sound/soc/codecs/rt5514.h
@@ -25,6 +25,7 @@ 
 #define RT5514_VAD_CTRL6			0x2030
 #define RT5514_EXT_VAD_CTRL			0x206c
 #define RT5514_DIG_IO_CTRL			0x2070
+#define RT5514_GPIO_CTRL1			0x2074
 #define RT5514_PAD_CTRL1			0x2080
 #define RT5514_DMIC_DATA_CTRL			0x20a0
 #define RT5514_DIG_SOURCE_CTRL			0x20a4