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: <20251025-54825-942964@bhairav-test.ee.iitb.ac.in>
Date: Sat, 25 Oct 2025 11:18:25 +0530
From: Akhilesh Patil <akhilesh@...iitb.ac.in>
To: Jonathan Cameron <jonathan.cameron@...wei.com>
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 Thu, Oct 23, 2025 at 06:34:17PM +0100, Jonathan Cameron wrote:
> 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.

Sure.

> 
> > 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.

Okay. Removed this macro and used value directly along with
improved comment.

> 
> 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.

Datasheet recommends value greater than 10ms.
30ms is what I started with for initial testing.
I have checked it working for even 10ms, 20ms etc.
Let me use 20ms here with margin over 10 and mention it
in the comment in code.

> 
> 
> > +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.

okay, got it. Fixed. 

Regards,
Akhilesh


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ