lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aYHfwpL_2109UcCq@smile.fi.intel.com>
Date: Tue, 3 Feb 2026 13:45:06 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: Jonathan Cameron <jic23@...nel.org>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, kernel@...gutronix.de,
	linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
	devicetree@...r.kernel.org, Andy Shevchenko <andy@...nel.org>,
	David Lechner <dlechner@...libre.com>,
	Nuno Sá <nuno.sa@...log.com>,
	David Jander <david@...tonic.nl>
Subject: Re: [PATCH v4 07/13] iio: dac: ds4424: use fsleep() instead of
 usleep_range()

On Tue, Feb 03, 2026 at 10:34:27AM +0100, Oleksij Rempel wrote:
> The DS4422/DS4424 and DS4402/DS4404 datasheets do not specify a minimum
> delay between power-up (POR) and the availability of the I2C interface.
> 
> The driver previously used `usleep_range(1000, 1200)` to enforce a ~1ms
> delay. Replace this with `fsleep(1000)` to allow the kernel to select the

> most efficient sleep mechanism (usleep or msleep) while retaining the

Information in the parentheses is not needed and may be confusing in the future
if kernel gets some Xsleep on top of the given list (which by the fact misses
udelay).

> existing conservative delay to ensure device readiness.

There is a couple of nit-picks, otherwise LGTM,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...el.com>

> +	/*
> +	 * The datasheet does not specify a power-up to I2C ready time.
> +	 * Maintain the existing conservative 1ms delay to ensure the
> +	 * device is ready for communication.
> +	 */
> +	fsleep(1000);

Perhaps use 1 * USEC_PER_MSEC as an argument?


-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ