From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
Cc: <jic23@kernel.org>, <dlechner@baylibre.com>, <robh@kernel.org>,
<krzk+dt@kernel.org>, <conor+dt@kernel.org>, <nuno.sa@analog.com>,
<andy@kernel.org>, <marcelo.schmitt1@gmail.com>,
<vassilisamir@gmail.com>, <salah.triki@gmail.com>,
<skhan@linuxfoundation.org>, <linux-iio@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
<akhileshpatilvnit@gmail.com>
Subject: Re: [PATCH v3 2/2] iio: pressure: adp810: Add driver for adp810 sensor
Date: Thu, 23 Oct 2025 18:34:17 +0100 [thread overview]
Message-ID: <20251023183417.00007d22@huawei.com> (raw)
In-Reply-To: <5cf1419bff57b906faeb942c5d782d7fe70ad41d.1761022919.git.akhilesh@ee.iitb.ac.in>
On Tue, 21 Oct 2025 11:20:30 +0530
Akhilesh Patil <akhilesh@ee.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@ee.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.
> +};
next prev parent reply other threads:[~2025-10-23 17:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 5:49 [PATCH v3 0/2] iio: pressure: add driver and bindings for adp810 Akhilesh Patil
2025-10-21 5:50 ` [PATCH v3 1/2] dt-bindings: iio: pressure: Add Aosong adp810 Akhilesh Patil
2025-10-21 5:50 ` [PATCH v3 2/2] iio: pressure: adp810: Add driver for adp810 sensor Akhilesh Patil
2025-10-21 15:20 ` Andy Shevchenko
2025-10-23 17:27 ` Jonathan Cameron
2025-10-25 4:19 ` Akhilesh Patil
2025-10-25 5:28 ` Akhilesh Patil
2025-10-23 17:34 ` Jonathan Cameron [this message]
2025-10-25 5:48 ` Akhilesh Patil
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=20251023183417.00007d22@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=akhilesh@ee.iitb.ac.in \
--cc=akhileshpatilvnit@gmail.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.schmitt1@gmail.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=salah.triki@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=vassilisamir@gmail.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 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.