From: Jonathan Cameron <jic23@kernel.org>
To: andy.shevchenko@gmail.com
Cc: Andreas Klinger <ak@it-klinger.de>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Angel Iglesias <ang.iglesiasg@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/3] iio: pressure: Honeywell mprls0025pa pressure sensor
Date: Sun, 4 Jun 2023 14:07:22 +0100 [thread overview]
Message-ID: <20230604140722.5eef740b@jic23-huawei> (raw)
In-Reply-To: <ZHPVn4xzErSZfqVy@surfacebook>
>
> > + if (dev_fwnode(dev)) {
>
> Why not simply use defaults?
Potential for inconsistent set if a firmware provides some but not others?
(at least that was my assumption that could well be wrong)
>
> > + ret = device_property_read_u32(dev, "honeywell,pmin-pascal",
> > + &data->pmin);
> > + if (ret)
> > + return dev_err_probe(dev, ret,
> > + "honeywell,pmin-pascal could not be read\n");
> > + ret = device_property_read_u32(dev, "honeywell,pmax-pascal",
> > + &data->pmax);
> > + if (ret)
> > + return dev_err_probe(dev, ret,
> > + "honeywell,pmax-pascal could not be read\n");
> > + ret = device_property_read_u32(dev,
> > + "honeywell,transfer-function", &data->function);
> > + if (ret)
> > + return dev_err_probe(dev, ret,
> > + "honeywell,transfer-function could not be read\n");
> > + if (data->function > MPR_FUNCTION_C)
> > + return dev_err_probe(dev, -EINVAL,
next prev parent reply other threads:[~2023-06-04 13:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-16 11:30 [PATCH v5 0/3] Support Honeywell mprls0025pa pressure sensor Andreas Klinger
2023-05-16 11:32 ` [PATCH v5 1/3] dt-bindings: iio: pressure: Support Honeywell mprls0025pa sensor Andreas Klinger
2023-05-16 11:32 ` [PATCH v5 2/3] iio: pressure: Honeywell mprls0025pa pressure sensor Andreas Klinger
2023-05-28 22:28 ` andy.shevchenko
2023-06-04 13:07 ` Jonathan Cameron [this message]
2023-05-16 11:33 ` [PATCH v5 3/3] MAINTAINERS: Add Honeywell mprls0025pa sensor Andreas Klinger
2023-05-20 16:24 ` [PATCH v5 0/3] Support Honeywell mprls0025pa pressure sensor Jonathan Cameron
2023-05-28 22:09 ` andy.shevchenko
2023-06-04 13:07 ` 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=20230604140722.5eef740b@jic23-huawei \
--to=jic23@kernel.org \
--cc=ak@it-klinger.de \
--cc=andy.shevchenko@gmail.com \
--cc=ang.iglesiasg@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@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