Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1614608 > unrolled thread

Re: [PATCH] nfc: nxp-nci: use msleep for long delays

Started bySamuel Ortiz <sameo@linux.intel.com>
First post2017-04-02 00:40 +0200
Last post2017-04-02 00:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] nfc: nxp-nci: use msleep for long delays Samuel Ortiz <sameo@linux.intel.com> - 2017-04-02 00:40 +0200

#1614608 — Re: [PATCH] nfc: nxp-nci: use msleep for long delays

FromSamuel Ortiz <sameo@linux.intel.com>
Date2017-04-02 00:40 +0200
SubjectRe: [PATCH] nfc: nxp-nci: use msleep for long delays
Message-ID<trzQB-lI-7@gated-at.bofh.it>
Hi Nicholas,

On Sun, Jan 22, 2017 at 01:28:39PM +0100, Nicholas Mc Guire wrote:
> ulseep_range() uses hrtimers and provides no advantage over msleep()
> for larger delays. For this large delay msleep() is preferable.
> 
> Fixes: commit 6be88670fc59 ("NFC: nxp-nci_i2c: Add I2C support to NXP NCI driver")
> Link: http://lkml.org/lkml/2017/1/11/377
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> ---
> Problem was found by cocinelle script.
> 
> nxp_nci_i2c_write takes the negative return code as indicator that the
> NFC device was probably in stand-by mode, the first transaction attempt
> woke it up and that after 110ms latest it would be ready to receive.
> Overrunning this time by a few milliseconds will not hurt though so
> msleep() should be fine here.
> 
> Patch was compile tested with: x86_64_defconfig + CONFIG_NFC=m,
> CONFIG_NFC_NCI=m, CONFIG_NFC_NXP_NCI=m, CONFIG_NFC_NXP_NCI_I2C=m
> 
> Patch is against 4.10-rc4 (localversion-next is next-20170120)
> 
>  drivers/nfc/nxp-nci/i2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
Applied to nfc-next, thanks.

Cheers,
Samuel.

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web