All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran@ksquared.org.uk>
To: Jacopo Mondi <jacopo@jmondi.org>, linux-renesas-soc@vger.kernel.org
Cc: "Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
	"Kieran Bingham" <kieran.bingham+renesas@ideasonboard.com>
Subject: [PATCH v9.2 9/9] fixes! [rdacm20]: Use usleep_range over mdelay(10)
Date: Wed, 10 Jun 2020 13:46:23 +0100	[thread overview]
Message-ID: <20200610124623.51085-10-kieran@bingham.xyz> (raw)
In-Reply-To: <20200610124623.51085-1-kieran@bingham.xyz>

From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

Prefer usleep_range rather than the busy looping mdelay for 10ms waits.

msleep( n < 20 ) may sleep up to 20 milliseconds, but in this instance I
don't think that's a issue here. All the same, use usleep_range between
10, 15 milliseconds.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
---
 drivers/media/i2c/rdacm20.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/rdacm20.c b/drivers/media/i2c/rdacm20.c
index cda3e6372ea9..1ed928c4ca70 100644
--- a/drivers/media/i2c/rdacm20.c
+++ b/drivers/media/i2c/rdacm20.c
@@ -488,9 +488,9 @@ static int rdacm20_initialize(struct rdacm20_device *dev)
 	 * MAX9271 GPIO1 and verify communication with the OV10635.
 	 */
 	max9271_clear_gpios(dev->serializer, MAX9271_GPIO1OUT);
-	mdelay(10);
+	usleep_range(10000, 15000);
 	max9271_set_gpios(dev->serializer, MAX9271_GPIO1OUT);
-	mdelay(10);
+	usleep_range(10000, 15000);
 
 again:
 	ret = ov10635_read16(dev, OV10635_PID);
-- 
2.25.1


  parent reply	other threads:[~2020-06-10 12:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 12:46 [PATCH v9.2 0/9] GMSL fixups ready for v10 Kieran Bingham
2020-06-10 12:46 ` [PATCH v9.2 1/9] fixes! [max9286]: Fix whitespace indent Kieran Bingham
2020-06-10 12:46 ` [PATCH v9.2 2/9] fixes! [max9286]: Validate link formats Kieran Bingham
2020-06-10 15:02   ` Jacopo Mondi
2020-06-12 13:22     ` Kieran Bingham
2020-06-10 12:46 ` [PATCH v9.2 3/9] fixes! [max9286]: Use single sample per pixel Kieran Bingham
2020-06-10 15:14   ` Jacopo Mondi
2020-06-10 12:46 ` [PATCH v9.2 4/9] fixes! [max9286]: Remove redundant DPHY check Kieran Bingham
2020-06-10 12:46 ` [PATCH v9.2 5/9] fixes! [max9286]: Remove redundant call Kieran Bingham
2020-06-10 12:46 ` [PATCH v9.2 6/9] fixes! [max9286-dt]: Add GPIO controller support Kieran Bingham
2020-06-10 15:16   ` Jacopo Mondi
2020-06-12 12:35     ` Kieran Bingham
2020-06-12 12:47       ` Kieran Bingham
2020-06-12 13:14         ` Jacopo Mondi
2020-06-10 12:46 ` [PATCH v9.2 7/9] fixes! [max9286-dt]: Fix dt-validation Kieran Bingham
2020-06-10 12:46 ` [PATCH v9.2 8/9] fixes! [max9286-dt]: Correctly match the hex camera node reg Kieran Bingham
2020-06-10 12:46 ` Kieran Bingham [this message]
2020-06-10 13:20   ` [PATCH v9.2 9/9] fixes! [rdacm20]: Use usleep_range over mdelay(10) Jacopo Mondi
2020-06-10 12:50 ` [PATCH v9.2 0/9] GMSL fixups ready for v10 Kieran Bingham
2020-06-10 14:44 ` [PATCH] fixup! dt-bindings: media: i2c: Add bindings for Maxim Integrated MAX9286 Jacopo Mondi
2020-06-12 12:28   ` Kieran Bingham
2020-06-10 14:48 ` [PATCH v9.2 0/9] GMSL fixups ready for v10 Jacopo Mondi

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=20200610124623.51085-10-kieran@bingham.xyz \
    --to=kieran@ksquared.org.uk \
    --cc=jacopo@jmondi.org \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund@ragnatech.se \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.