summaryrefslogtreecommitdiff
path: root/drivers/nfc
diff options
context:
space:
mode:
authorMark A. Greer <mgreer@animalcreek.com>2014-03-25 08:54:31 -0700
committerSamuel Ortiz <sameo@linux.intel.com>2014-04-22 00:37:27 +0200
commitb887eb09d3cbda145d9fff4b9a56c384edd07ed7 (patch)
treee0d86dbf37df10cf8c6679a1b5076ca4b825e2d3 /drivers/nfc
parent5876bc75e2d3174cd1cd944ee33edc77cd1173ca (diff)
NFC: trf7970a: Clear 'NFC Target Detection Level' register
Due to a trf7970a erratum, the 'NFC Target Detection Level' register (0x18) must be cleared after power-up. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/trf7970a.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c
index cab302ce2c7e..df634498c81b 100644
--- a/drivers/nfc/trf7970a.c
+++ b/drivers/nfc/trf7970a.c
@@ -757,6 +757,11 @@ static int trf7970a_init(struct trf7970a *trf)
if (ret)
goto err_out;
+ /* Must clear NFC Target Detection Level reg due to erratum */
+ ret = trf7970a_write(trf, TRF7970A_NFC_TARGET_LEVEL, 0);
+ if (ret)
+ goto err_out;
+
ret = trf7970a_write(trf, TRF7970A_MODULATOR_SYS_CLK_CTRL,
TRF7970A_MODULATOR_DEPTH_OOK);
if (ret)