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] [day] [month] [year] [list]
Message-ID: <20251023183417.00007d22@huawei.com>
Date: Thu, 23 Oct 2025 18:34:17 +0100
From: Jonathan Cameron <jonathan.cameron@...wei.com>
To: Akhilesh Patil <akhilesh@...iitb.ac.in>
CC: <jic23@...nel.org>, <dlechner@...libre.com>, <robh@...nel.org>,
	<krzk+dt@...nel.org>, <conor+dt@...nel.org>, <nuno.sa@...log.com>,
	<andy@...nel.org>, <marcelo.schmitt1@...il.com>, <vassilisamir@...il.com>,
	<salah.triki@...il.com>, <skhan@...uxfoundation.org>,
	<linux-iio@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<devicetree@...r.kernel.org>, <akhileshpatilvnit@...il.com>
Subject: Re: [PATCH v3 2/2] iio: pressure: adp810: Add driver for adp810
 sensor

On Tue, 21 Oct 2025 11:20:30 +0530
Akhilesh Patil <akhilesh@...iitb.ac.in> wrote:

> Add driver for Aosong adp810 differential pressure and temperature sensor.
> This sensor provides an I2C interface for reading data.
> Calculate CRC of the data received using standard crc8 library to verify
> data integrity.
> 
> Tested on TI am62x sk board with sensor connected at i2c-2.
> 
> Signed-off-by: Akhilesh Patil <akhilesh@...iitb.ac.in>

A couple of trivial bits of follow up from me given you are going to be
doing a v4 for the stuff Andy picked up on.  Otherwise I'd just have
tweaked it whilst applying for these two.

> diff --git a/drivers/iio/pressure/adp810.c b/drivers/iio/pressure/adp810.c
> new file mode 100644
> index 000000000000..5fcb0447c628
> --- /dev/null
> +++ b/drivers/iio/pressure/adp810.c

> +/*
> + * Time taken in ms by sensor to do measurements after triggering.
> + * As per datasheet 10ms is sufficient but we define 30ms for better margin.
> + */
> +#define ADP810_MEASURE_LATENCY_MS	30
I'd just put this value in the one place that it is used and combine the two
comments on why it has this particular value.

30ms seems like a bit over the top for handling silicon variation etc.
Any background for the large margin?  If you've seen this as necessary
in practice then just state that - it's useful info to have available
to a future reader of the driver.


> +static const struct iio_info adp810_info = {
> +	.read_raw	= adp810_read_raw,
Trivial but there is no benefit in using a tab before the =

In general aligning this stuff isn't a good plan. It causes
a mass of churn in the long run as some of the callbacks have longer
names and suddenly whole thing needs reindenting.

> +};


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ