提交 67dec192 编写于 作者: M Mark Greer 提交者: Samuel Ortiz

NFC: trf7970a: Don't de-assert EN2 unless it was asserted

When the trf7970a part has the bug related to 'en2-rf-quirk',
the GPIO connected to the EN2 pin will not be asserted by the
driver when powering up so it shouldn't be de-asserted when
powering down.
Signed-off-by: NMark Greer <mgreer@animalcreek.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 581132b6
...@@ -1940,6 +1940,8 @@ static int trf7970a_power_down(struct trf7970a *trf) ...@@ -1940,6 +1940,8 @@ static int trf7970a_power_down(struct trf7970a *trf)
} }
gpio_set_value(trf->en_gpio, 0); gpio_set_value(trf->en_gpio, 0);
if (!(trf->quirks & TRF7970A_QUIRK_EN2_MUST_STAY_LOW))
if (gpio_is_valid(trf->en2_gpio)) if (gpio_is_valid(trf->en2_gpio))
gpio_set_value(trf->en2_gpio, 0); gpio_set_value(trf->en2_gpio, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册