Messages in this thread Patch in this message | | | From | Nicholas Mc Guire <> | Subject | [PATCH 2/2] NFC: st95hf: fix timing factor error | Date | Tue, 9 Apr 2019 05:48:19 +0200 |
| |
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
| |