From b887eb09d3cbda145d9fff4b9a56c384edd07ed7 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Tue, 25 Mar 2014 08:54:31 -0700 Subject: [PATCH] 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 Signed-off-by: Samuel Ortiz --- drivers/nfc/trf7970a.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c index cab302c..df63449 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) -- 2.7.4