summaryrefslogtreecommitdiffstats
path: root/drivers/nfc/trf7970a.c
diff options
context:
space:
mode:
authorMark Greer <mgreer@animalcreek.com>2017-04-26 00:43:49 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2017-06-18 23:57:57 +0200
commit67dec1928d08b6ca7dc9bebc4d3fe2d54da4b108 (patch)
tree1e2f6d992fe505cb9f5855c28f2b3a8166a90084 /drivers/nfc/trf7970a.c
parentMAINTAINERS: NFC: trf7970a: Add Mark Greer as maintainer (diff)
downloadlinux-67dec1928d08b6ca7dc9bebc4d3fe2d54da4b108.tar.xz
linux-67dec1928d08b6ca7dc9bebc4d3fe2d54da4b108.zip
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: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to '')
-rw-r--r--drivers/nfc/trf7970a.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c
index 2d1c8ca6e679..1a87525a88cd 100644
--- a/drivers/nfc/trf7970a.c
+++ b/drivers/nfc/trf7970a.c
@@ -1940,8 +1940,10 @@ static int trf7970a_power_down(struct trf7970a *trf)
}
gpio_set_value(trf->en_gpio, 0);
- if (gpio_is_valid(trf->en2_gpio))
- gpio_set_value(trf->en2_gpio, 0);
+
+ if (!(trf->quirks & TRF7970A_QUIRK_EN2_MUST_STAY_LOW))
+ if (gpio_is_valid(trf->en2_gpio))
+ gpio_set_value(trf->en2_gpio, 0);
ret = regulator_disable(trf->regulator);
if (ret)