NFC: trf7970a: Clear 'NFC Target Detection Level' register
authorMark A. Greer <mgreer@animalcreek.com>
Tue, 25 Mar 2014 15:54:31 +0000 (08:54 -0700)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 21 Apr 2014 22:37:27 +0000 (00:37 +0200)
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>
drivers/nfc/trf7970a.c

index cab302ce2c7ed3eb53a867d95b31537696b5b2eb..df634498c81b4fb370fc929c1853ede16120c963 100644 (file)
@@ -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)