Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Neel Bullywon <neelb2403@gmail.com>
Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andy Shevchenko <andriy.shevchenko@intel.com>
Subject: Re: [PATCH v7 2/3] iio: magnetometer: bmc150_magn: replace msleep with fsleep
Date: Fri, 20 Feb 2026 10:37:00 +0000	[thread overview]
Message-ID: <20260220103700.5acd36c2@jic23-huawei> (raw)
In-Reply-To: <20260216015454.61836-3-neelb2403@gmail.com>

On Sun, 15 Feb 2026 20:54:53 -0500
Neel Bullywon <neelb2403@gmail.com> wrote:

> Replace msleep(5) with fsleep(5 * USEC_PER_MSEC) to allow the kernel
> to select the most appropriate delay mechanism based on duration.
> Using USEC_PER_MSEC makes the unit conversion explicit.
> 
> Signed-off-by: Neel Bullywon <neelb2403@gmail.com>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

This is independent of patch 1, so I'll pick it up now.
Please base next version of patch 1 on top of the testing branch
of iio.git (or just reorder the patches locally and only post
that one for v8!)

Applied to the testing branch of iio.git.  Note I'll rebase
that on rc1 sometime next week and then it'll go out for linux-next
to pick up.

Thanks,

Jonathan
> ---
>  drivers/iio/magnetometer/bmc150_magn.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/magnetometer/bmc150_magn.c b/drivers/iio/magnetometer/bmc150_magn.c
> index ff6196c86e6b..e7f8d118242b 100644
> --- a/drivers/iio/magnetometer/bmc150_magn.c
> +++ b/drivers/iio/magnetometer/bmc150_magn.c
> @@ -683,7 +683,7 @@ static int bmc150_magn_init(struct bmc150_magn_data *data)
>  	 * 3ms power-on time according to datasheet, let's better
>  	 * be safe than sorry and set this delay to 5ms.
>  	 */
> -	msleep(5);
> +	fsleep(5 * USEC_PER_MSEC);
>  
>  	ret = bmc150_magn_set_power_mode(data, BMC150_MAGN_POWER_MODE_SUSPEND,
>  					 false);

#

  reply	other threads:[~2026-02-20 10:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-16  1:54 [PATCH v7 0/3] iio: magnetometer: bmc150_magn: cleanup and formatting Neel Bullywon
2026-02-16  1:54 ` [PATCH v7 1/3] iio: magnetometer: bmc150_magn: use automated cleanup for mutex Neel Bullywon
2026-02-16  8:33   ` Andy Shevchenko
2026-02-20 10:34     ` Jonathan Cameron
2026-02-20 19:29       ` Neel Bullywon
2026-02-16  1:54 ` [PATCH v7 2/3] iio: magnetometer: bmc150_magn: replace msleep with fsleep Neel Bullywon
2026-02-20 10:37   ` Jonathan Cameron [this message]
2026-02-16  1:54 ` [PATCH v7 3/3] iio: magnetometer: bmc150_magn: minor formatting cleanup Neel Bullywon
2026-02-16  8:35   ` Andy Shevchenko
2026-02-20 10:37     ` Jonathan Cameron

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=20260220103700.5acd36c2@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neelb2403@gmail.com \
    --cc=nuno.sa@analog.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