From: Nicholas Mc Guire <hofrat@opentech.at>
To: Samuel Ortiz <sameo@linux.intel.com>
Cc: Daniel Mack <daniel@zonque.org>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
Nicholas Mc Guire <hofrat@opentech.at>
Subject: [PATCH 2/2] NFC: st95hf: fix timing factor error
Date: Tue, 9 Apr 2019 05:48:19 +0200 [thread overview]
Message-ID: <1554781699-42604-2-git-send-email-hofrat@opentech.at> (raw)
In-Reply-To: <1554781699-42604-1-git-send-email-hofrat@opentech.at>
The comment suggests that per ISO standard 5-6ms are required
but the code is 50-60ms delay - look like a simple typo - so
set the delay to 5000 to 6000.
Signed-off-by: Nicholas Mc Guire <hofrat@opentech.at>
Fixes: cab47333f0f7 ("NFC: Add STMicroelectronics ST95HF driver")
---
Problem located with an experimental coccinelle script
Note that as I do not have the standard - it could of course
also be a typo in the comment - in which case it should
then probably be using msleep(60) not usleep_ranges().
Patch was compile tested with: x86_64_defconfig + SPI=y,
NFC=y, NFC_DIGITAL=y, NFC_ST95HF=m
Patch is against 5.1-rc3 (localversion-next is -next-20190408)
drivers/nfc/st95hf/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nfc/st95hf/core.c b/drivers/nfc/st95hf/core.c
index 34bf1d7..89e6160 100644
--- a/drivers/nfc/st95hf/core.c
+++ b/drivers/nfc/st95hf/core.c
@@ -430,7 +430,7 @@ static int st95hf_select_protocol(struct st95hf_context *stcontext, int type)
* delay of 5-6 ms is required after select protocol
* command in case of ISO14443 Type B
*/
- usleep_range(50000, 60000);
+ usleep_range(5000, 6000);
/* secondary config. for 14443Type 4B after protocol select */
result = secondary_configuration_type4b(stcontext);
--
2.1.4
prev parent reply other threads:[~2019-04-09 4:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-09 3:48 [PATCH 1/2] NFC: st95hf: use msleep for long delay Nicholas Mc Guire
2019-04-09 3:48 ` Nicholas Mc Guire [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1554781699-42604-2-git-send-email-hofrat@opentech.at \
--to=hofrat@opentech.at \
--cc=daniel@zonque.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=sameo@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox