From: Jonathan Cameron <jic23@kernel.org>
To: Hermes Zhang <chenhuiz@axis.com>
Cc: Hermes Zhang <Hermes.Zhang@axis.com>,
robh@kernel.org, lars@metafoo.de, krzk+dt@kernel.org,
kernel@axis.com, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org
Subject: Re: [PATCH 3/3] iio: chemical: add support for Sensirion SEN5x/SEN6x
Date: Mon, 10 Feb 2025 19:09:42 +0000 [thread overview]
Message-ID: <20250210190942.21ba97cc@jic23-huawei> (raw)
In-Reply-To: <1237314b-78a8-a871-ea24-f3011766606b@axis.com>
On Mon, 10 Feb 2025 17:16:57 +0800
Hermes Zhang <chenhuiz@axis.com> wrote:
> Hi Jonathan,
>
> Thanks a lot for your review. I will fix most of them in v2, just one
> question below.
>
> Best Regards,
> Hermes
>
>
> On 2025/2/9 0:15, Jonathan Cameron wrote:
> > On Thu, 6 Feb 2025 14:15:17 +0800
> > Hermes Zhang <Hermes.Zhang@axis.com> wrote:
> >
> >
> >> +
> >> + state->last_update = jiffies;
> >> +
> >> + return 0;
> >> +}
> >> +
> >> +static ssize_t status_show(struct device *dev, struct device_attribute *attr,
> >> + char *buf)
> >> +{
> >> + struct iio_dev *indio_dev = dev_to_iio_dev(dev);
> >> + struct sen_common_state *state = iio_priv(indio_dev);
> >> + int status;
> >> + int ret;
> >> +
> >> + ret = sen_common_status(state->client, &status);
> > This is custom ABI. So it would need documentation and will need
> > to overcome quite a high barrier.
> >
> > Superficially this looks like debug perhaps that should be
> > in debugfs?
>
> The status is one of the support commands from the chip, we (from
> userspace) could read it and notify customer if the sensor is wrong or
> not. So it is ued in normal usage, regarding the ABI, I see your point,
> so instead of my way, do you have any suggestion for how to handle it in
> iio? Thanks.
What is actually reporting? I hope something more specific than
'wrong'. Also when do you read it? Standard software is never going to
so you may be better of doing some scheduled reading or reading it
on the back of a channel read. Unfortunately the nature of failure modes
is that they are not easy to describe in a generic ABI - sometimes
our best bet is to just log an error (rate limited).
Some of these look like they mean the data read is garbage when they
are happening?
Jonathan
>
> Best Regards,
>
> Hermes
>
>
next prev parent reply other threads:[~2025-02-10 19:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250206061521.2546108-1-Hermes.Zhang@axis.com>
2025-02-06 6:15 ` [PATCH 1/3] iio: add IIO_MOD_NOX modifier Hermes Zhang
2025-02-08 15:53 ` Jonathan Cameron
2025-02-06 6:15 ` [PATCH 2/3] dt-bindings: iio: chemical: sensirion,senxx: Add yaml description Hermes Zhang
2025-02-06 18:20 ` Conor Dooley
2025-02-08 7:07 ` Hermes Zhang
2025-02-11 18:44 ` Conor Dooley
2025-02-12 6:27 ` Hermes Zhang
2025-02-06 6:15 ` [PATCH 3/3] iio: chemical: add support for Sensirion SEN5x/SEN6x Hermes Zhang
2025-02-08 16:15 ` Jonathan Cameron
2025-02-10 9:16 ` Hermes Zhang
2025-02-10 19:09 ` Jonathan Cameron [this message]
2025-02-11 2:29 ` Hermes Zhang
2025-02-11 19:22 ` 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=20250210190942.21ba97cc@jic23-huawei \
--to=jic23@kernel.org \
--cc=Hermes.Zhang@axis.com \
--cc=chenhuiz@axis.com \
--cc=kernel@axis.com \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/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