summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark A. Greer <mgreer@animalcreek.com>2014-03-25 08:54:34 -0700
committerSamuel Ortiz <sameo@linux.intel.com>2014-04-22 00:37:27 +0200
commita0822a7e3b7333689b1c8cb92782e299791c2795 (patch)
treed74bd661f3fffe9b442273bc1caa74dfeefa4248
parent49d19cc794e73c3383283a5366ff31572d71a795 (diff)
downloadop-kernel-dev-a0822a7e3b7333689b1c8cb92782e299791c2795.zip
op-kernel-dev-a0822a7e3b7333689b1c8cb92782e299791c2795.tar.gz
NFC: trf7970a: Set 'Modulator and SYS_CLK Control' after 'ISO Control'
Writing to the 'ISO Control' register may cause the contents of the 'Modulator and SYS_CLK Control' register to change so be sure to write to 'Modulator and SYS_CLK Control' after writing to 'ISO Control'. Note that writing to the 'Modulator and SYS_CLK Control' register shouldn't be necessary at all according to the trf790a manual but testing shows that it is necessary. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r--drivers/nfc/trf7970a.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c
index d17d424..90ec2ad 100644
--- a/drivers/nfc/trf7970a.c
+++ b/drivers/nfc/trf7970a.c
@@ -765,11 +765,6 @@ static int trf7970a_init(struct trf7970a *trf)
if (ret)
goto err_out;
- ret = trf7970a_write(trf, TRF7970A_MODULATOR_SYS_CLK_CTRL,
- TRF7970A_MODULATOR_DEPTH_OOK);
- if (ret)
- goto err_out;
-
ret = trf7970a_write(trf, TRF7970A_ADJUTABLE_FIFO_IRQ_LEVELS,
TRF7970A_ADJUTABLE_FIFO_IRQ_LEVELS_WLH_96 |
TRF7970A_ADJUTABLE_FIFO_IRQ_LEVELS_WLL_32);
@@ -943,6 +938,11 @@ static int trf7970a_config_framing(struct trf7970a *trf, int framing)
return ret;
trf->iso_ctrl = iso_ctrl;
+
+ ret = trf7970a_write(trf, TRF7970A_MODULATOR_SYS_CLK_CTRL,
+ TRF7970A_MODULATOR_DEPTH_OOK);
+ if (ret)
+ return ret;
}
return 0;
OpenPOWER on IntegriCloud