projects
/
platform
/
kernel
/
linux-rpi3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
307e5ca
)
NFC: trf7970a: Don't turn off RF if its already off
author
Mark A. Greer
<mgreer@animalcreek.com>
Tue, 2 Sep 2014 22:12:40 +0000
(15:12 -0700)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Sun, 7 Sep 2014 21:13:45 +0000
(23:13 +0200)
Don't try to turn off of RF transmitter is its
already off.
Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/trf7970a.c
patch
|
blob
|
history
diff --git
a/drivers/nfc/trf7970a.c
b/drivers/nfc/trf7970a.c
index
e4671e5
..
429146b
100644
(file)
--- a/
drivers/nfc/trf7970a.c
+++ b/
drivers/nfc/trf7970a.c
@@
-859,6
+859,10
@@
err_out:
static void trf7970a_switch_rf_off(struct trf7970a *trf)
{
+ if ((trf->state == TRF7970A_ST_PWR_OFF) ||
+ (trf->state == TRF7970A_ST_RF_OFF))
+ return;
+
dev_dbg(trf->dev, "Switching rf off\n");
trf->chip_status_ctrl &= ~TRF7970A_CHIP_STATUS_RF_ON;