summaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>2013-04-03 08:01:59 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2013-04-11 16:29:00 +0200
commita45e1c8d17c04b8fbb27818ce3454d889696da08 (patch)
treeab619e634b8ef18b05ff99d24111114da4c865eb /drivers/nfc
parent63123108f45663a93cfbb7480050043c04d202bf (diff)
downloadop-kernel-dev-a45e1c8d17c04b8fbb27818ce3454d889696da08.zip
op-kernel-dev-a45e1c8d17c04b8fbb27818ce3454d889696da08.tar.gz
NFC: pn533: Print out response status bits in hex
For better debugging as the codes are defined in hex in the spec. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/pn533.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c
index 8e809e0..8ee032d 100644
--- a/drivers/nfc/pn533.c
+++ b/drivers/nfc/pn533.c
@@ -1724,6 +1724,8 @@ static int pn533_activate_target_nfcdep(struct pn533 *dev)
rsp = (struct pn533_cmd_activate_response *)resp->data;
rc = rsp->status & PN533_CMD_RET_MASK;
if (rc != PN533_CMD_RET_SUCCESS) {
+ nfc_dev_err(&dev->interface->dev,
+ "Target activation failed (error 0x%x)", rc);
dev_kfree_skb(resp);
return -EIO;
}
@@ -1851,7 +1853,7 @@ static int pn533_in_dep_link_up_complete(struct pn533 *dev, void *arg,
rc = rsp->status & PN533_CMD_RET_MASK;
if (rc != PN533_CMD_RET_SUCCESS) {
nfc_dev_err(&dev->interface->dev,
- "Bringing DEP link up failed %d", rc);
+ "Bringing DEP link up failed (error 0x%x)", rc);
goto error;
}
@@ -2065,8 +2067,7 @@ static int pn533_data_exchange_complete(struct pn533 *dev, void *_arg,
if (ret != PN533_CMD_RET_SUCCESS) {
nfc_dev_err(&dev->interface->dev,
- "PN533 reported error %d when exchanging data",
- ret);
+ "Exchanging data failed (error 0x%x)", ret);
rc = -EIO;
goto error;
}
OpenPOWER on IntegriCloud