[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bffe3d02-076c-47af-8770-2b89c1dccf08@kernel.org>
Date: Wed, 1 Oct 2025 11:59:03 +0200
From: Hans Verkuil <hverkuil+cisco@...nel.org>
To: Pratibimba Khadka <pratibimbakhadka@...il.com>, mchehab@...nel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Al Viro <viro@...iv.linux.org.uk>,
"open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)"
<linux-media@...r.kernel.org>,
"open list:STAGING SUBSYSTEM" <linux-staging@...ts.linux.dev>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: media: av7110: Replace msleep() with
usleep_range() in tuner function
On 26/06/2025 19:32, Pratibimba Khadka wrote:
> Replace msleep(10) with usleep_range(10000, 12000) in the PLL lock
> waiting loop of nexusca_stv0297_tuner_set_params().
>
> usleep_range() is preferred over msleep() for short delays (< 20ms) as
> it provides better accuracy and allows the scheduler flexibility for
> power management optimizations. The 10-12ms range maintains the same
> timing behavior while giving the kernel scheduler room to optimize.
>
> This change improves timing precision during the PLL lock detection
> phase without affecting the overall functionality of the tuner
> configuration process.
>
> Signed-off-by: Pratibimba Khadka <pratibimbakhadka@...il.com>
Thank you for your patch, but I'm not taking this patch. It's an old driver,
and msleep is perfectly fine here.
Regards,
Hans
> ---
> drivers/staging/media/av7110/av7110.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/av7110/av7110.c b/drivers/staging/media/av7110/av7110.c
> index bc9a2a40afcb..7f6c610579c8 100644
> --- a/drivers/staging/media/av7110/av7110.c
> +++ b/drivers/staging/media/av7110/av7110.c
> @@ -1827,7 +1827,7 @@ static int nexusca_stv0297_tuner_set_params(struct dvb_frontend *fe)
> if (i2c_transfer(&av7110->i2c_adap, &readmsg, 1) == 1)
> if (data[0] & 0x40)
> break;
> - msleep(10);
> + usleep_range(10000, 12000);
> }
>
> return 0;
Powered by blists - more mailing lists