aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2013-07-01 11:26:58 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2013-08-13 18:35:18 -0400
commit3a8eab39ac53f2d35d663634e16b486e8a5a65a9 (patch)
treee7a970f90e7eed9dd0b3a5add536eaebf2ffbe2f /drivers/nfc
parent5eef4845619b88957349415b7b1498e00220fa2b (diff)
NFC: pn533: Enable AUTO RFCA
The AUTO RFCA bit forbids the pn533 chipset to turn its radio on whenever an external field is present. Without this bit set, some devices seems to get over flood by the pn533 rf field and thus become hardly detectable. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/pn533.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c
index ff3e19dcc7c5..125d995c11a9 100644
--- a/drivers/nfc/pn533.c
+++ b/drivers/nfc/pn533.c
@@ -168,8 +168,9 @@ struct pn533_fw_version {
168#define PN533_CFGITEM_MAX_RETRIES 0x05 168#define PN533_CFGITEM_MAX_RETRIES 0x05
169#define PN533_CFGITEM_PASORI 0x82 169#define PN533_CFGITEM_PASORI 0x82
170 170
171#define PN533_CFGITEM_RF_FIELD_ON 0x1 171#define PN533_CFGITEM_RF_FIELD_AUTO_RFCA 0x2
172#define PN533_CFGITEM_RF_FIELD_OFF 0x0 172#define PN533_CFGITEM_RF_FIELD_ON 0x1
173#define PN533_CFGITEM_RF_FIELD_OFF 0x0
173 174
174#define PN533_CONFIG_TIMING_102 0xb 175#define PN533_CONFIG_TIMING_102 0xb
175#define PN533_CONFIG_TIMING_204 0xc 176#define PN533_CONFIG_TIMING_204 0xc
@@ -1696,7 +1697,7 @@ static void pn533_wq_rf(struct work_struct *work)
1696 return; 1697 return;
1697 1698
1698 *skb_put(skb, 1) = PN533_CFGITEM_RF_FIELD; 1699 *skb_put(skb, 1) = PN533_CFGITEM_RF_FIELD;
1699 *skb_put(skb, 1) = 0; 1700 *skb_put(skb, 1) = PN533_CFGITEM_RF_FIELD_AUTO_RFCA;
1700 1701
1701 rc = pn533_send_cmd_async(dev, PN533_CMD_RF_CONFIGURATION, skb, 1702 rc = pn533_send_cmd_async(dev, PN533_CMD_RF_CONFIGURATION, skb,
1702 pn533_rf_complete, NULL); 1703 pn533_rf_complete, NULL);
@@ -2598,6 +2599,8 @@ static int pn533_rf_field(struct nfc_dev *nfc_dev, u8 rf)
2598 u8 rf_field = !!rf; 2599 u8 rf_field = !!rf;
2599 int rc; 2600 int rc;
2600 2601
2602 rf_field |= PN533_CFGITEM_RF_FIELD_AUTO_RFCA;
2603
2601 rc = pn533_set_configuration(dev, PN533_CFGITEM_RF_FIELD, 2604 rc = pn533_set_configuration(dev, PN533_CFGITEM_RF_FIELD,
2602 (u8 *)&rf_field, 1); 2605 (u8 *)&rf_field, 1);
2603 if (rc) { 2606 if (rc) {