diff options
-rw-r--r-- | Documentation/devicetree/bindings/sound/rt5677.txt | 2 | ||||
-rw-r--r-- | sound/soc/codecs/rt5677.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Documentation/devicetree/bindings/sound/rt5677.txt b/Documentation/devicetree/bindings/sound/rt5677.txt index f07078997f87..1b3c13d206ff 100644 --- a/Documentation/devicetree/bindings/sound/rt5677.txt +++ b/Documentation/devicetree/bindings/sound/rt5677.txt | |||
@@ -18,7 +18,7 @@ Required properties: | |||
18 | Optional properties: | 18 | Optional properties: |
19 | 19 | ||
20 | - realtek,pow-ldo2-gpio : The GPIO that controls the CODEC's POW_LDO2 pin. | 20 | - realtek,pow-ldo2-gpio : The GPIO that controls the CODEC's POW_LDO2 pin. |
21 | - realtek,reset-gpio : The GPIO that controls the CODEC's RESET pin. | 21 | - realtek,reset-gpio : The GPIO that controls the CODEC's RESET pin. Active low. |
22 | 22 | ||
23 | - realtek,in1-differential | 23 | - realtek,in1-differential |
24 | - realtek,in2-differential | 24 | - realtek,in2-differential |
diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index b4cd7e3bf5f8..f73fd125e49c 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c | |||
@@ -4766,7 +4766,7 @@ static int rt5677_remove(struct snd_soc_codec *codec) | |||
4766 | 4766 | ||
4767 | regmap_write(rt5677->regmap, RT5677_RESET, 0x10ec); | 4767 | regmap_write(rt5677->regmap, RT5677_RESET, 0x10ec); |
4768 | gpiod_set_value_cansleep(rt5677->pow_ldo2, 0); | 4768 | gpiod_set_value_cansleep(rt5677->pow_ldo2, 0); |
4769 | gpiod_set_value_cansleep(rt5677->reset_pin, 0); | 4769 | gpiod_set_value_cansleep(rt5677->reset_pin, 1); |
4770 | 4770 | ||
4771 | return 0; | 4771 | return 0; |
4772 | } | 4772 | } |
@@ -4781,7 +4781,7 @@ static int rt5677_suspend(struct snd_soc_codec *codec) | |||
4781 | regcache_mark_dirty(rt5677->regmap); | 4781 | regcache_mark_dirty(rt5677->regmap); |
4782 | 4782 | ||
4783 | gpiod_set_value_cansleep(rt5677->pow_ldo2, 0); | 4783 | gpiod_set_value_cansleep(rt5677->pow_ldo2, 0); |
4784 | gpiod_set_value_cansleep(rt5677->reset_pin, 0); | 4784 | gpiod_set_value_cansleep(rt5677->reset_pin, 1); |
4785 | } | 4785 | } |
4786 | 4786 | ||
4787 | return 0; | 4787 | return 0; |
@@ -4793,7 +4793,7 @@ static int rt5677_resume(struct snd_soc_codec *codec) | |||
4793 | 4793 | ||
4794 | if (!rt5677->dsp_vad_en) { | 4794 | if (!rt5677->dsp_vad_en) { |
4795 | gpiod_set_value_cansleep(rt5677->pow_ldo2, 1); | 4795 | gpiod_set_value_cansleep(rt5677->pow_ldo2, 1); |
4796 | gpiod_set_value_cansleep(rt5677->reset_pin, 1); | 4796 | gpiod_set_value_cansleep(rt5677->reset_pin, 0); |
4797 | if (rt5677->pow_ldo2 || rt5677->reset_pin) | 4797 | if (rt5677->pow_ldo2 || rt5677->reset_pin) |
4798 | msleep(10); | 4798 | msleep(10); |
4799 | 4799 | ||
@@ -5138,7 +5138,7 @@ static int rt5677_i2c_probe(struct i2c_client *i2c, | |||
5138 | return ret; | 5138 | return ret; |
5139 | } | 5139 | } |
5140 | rt5677->reset_pin = devm_gpiod_get_optional(&i2c->dev, | 5140 | rt5677->reset_pin = devm_gpiod_get_optional(&i2c->dev, |
5141 | "realtek,reset", GPIOD_OUT_HIGH); | 5141 | "realtek,reset", GPIOD_OUT_LOW); |
5142 | if (IS_ERR(rt5677->reset_pin)) { | 5142 | if (IS_ERR(rt5677->reset_pin)) { |
5143 | ret = PTR_ERR(rt5677->reset_pin); | 5143 | ret = PTR_ERR(rt5677->reset_pin); |
5144 | dev_err(&i2c->dev, "Failed to request RESET: %d\n", ret); | 5144 | dev_err(&i2c->dev, "Failed to request RESET: %d\n", ret); |