public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Abhai Kollara <abhai@protonmail.com>
To: Hans de Goede <hansg@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	Abhai Kollara <abhai@protonmail.com>
Subject: [PATCH v3] staging: media: atomisp: gc2235: prefer fsleep over msleep
Date: Sat, 18 Apr 2026 20:18:01 +0000	[thread overview]
Message-ID: <20260418201755.2604188-1-abhai@protonmail.com> (raw)
In-Reply-To: <20260318212645.2014561-1-abhai@protonmail.com>

The gc2235 driver uses msleep(5) during power-up. msleep() is often
imprecise for durations under 20ms. Replace it with fsleep()
to provide better precision.

Signed-off-by: Abhai Kollara <abhai@protonmail.com>
---
v3:
 - Use fsleep() instead of usleep_range() per Sakari Ailus's feedback.
v2:
 - Replaced msleep() with usleep_range() (Superseded).
v1:
 - Initial version.

 drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
index d3414312e1de..7999c8595a68 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
@@ -433,7 +433,7 @@ static int power_up(struct v4l2_subdev *sd)
 			goto fail_power;
 	}
 
-	msleep(5);
+	fsleep(5000);
 	return 0;
 
 fail_clk:
-- 
2.43.0



  parent reply	other threads:[~2026-04-18 20:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18 21:27 [PATCH] staging: atomisp: gc2235: prefer usleep_range over msleep Abhai Kollara
2026-03-19 20:42 ` [PATCH v2] staging: media: " Abhai Kollara
2026-04-16  9:44   ` Sakari Ailus
2026-04-18 20:18 ` Abhai Kollara [this message]
2026-04-18 22:08   ` [PATCH v3] staging: media: atomisp: gc2235: prefer fsleep " Sakari Ailus

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=20260418201755.2604188-1-abhai@protonmail.com \
    --to=abhai@protonmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@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