From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: jic23@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com,
andy@kernel.org, robh@kernel.org, conor+dt@kernel.org,
krzk+dt@kernel.org, linux-iio@vger.kernel.org, s32@nxp.com,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
chester62515@gmail.com, mbrugger@suse.com,
ghennadi.procopciuc@oss.nxp.com
Subject: Re: [PATCH v1 2/2] iio: adc: Add the NXP SAR ADC support for the s32g2/3 platforms
Date: Thu, 4 Sep 2025 18:52:53 +0200 [thread overview]
Message-ID: <9d4e7851-a874-413b-974c-d499ed59f553@linaro.org> (raw)
In-Reply-To: <aLlAugdr-hwMNIje@smile.fi.intel.com>
On 04/09/2025 09:33, Andy Shevchenko wrote:
> On Wed, Sep 03, 2025 at 05:28:09PM +0200, Daniel Lezcano wrote:
>> On 03/09/2025 13:48, Andy Shevchenko wrote:
>>> On Wed, Sep 03, 2025 at 12:27:56PM +0200, Daniel Lezcano wrote:
[ ... ]
>>>> + ret = read_poll_timeout(readl, msr, !(msr & REG_ADC_MSR_CALBUSY),
>>>
>>> Why not readl_poll_timeout()?
>>>
>>>> + NXP_SAR_ADC_WAIT_US,
>>>> + NXP_SAR_ADC_CAL_TIMEOUT_US,
>>>> + true, REG_ADC_MSR(base));
>>>> + if (ret)
>>>> + return ret;
>>>
>>>> + if (!(msr & REG_ADC_MSR_CALFAIL))
>>>> + return 0;
>>>
>>> I would expect standard pattern — "errors first", but here either works.
>>
>> Does it mean this chunk of code can be preserved or do you prefer an error
>> block followed with a return 0 ?
>
> Up to you. Only the question above (readl_poll_timeout() use) stays unanswered
> so far.
It is a typo, it should be readl_poll_timeout() as you suggested
[ ... ]
Thanks
-- Daniel
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2025-09-04 16:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-03 10:27 [PATCH v1 0/2] NXP SAR ADC IIO driver for s32g2/3 platforms Daniel Lezcano
2025-09-03 10:27 ` [PATCH v1 1/2] dt-bindings: iio: adc: Add the NXP SAR ADC " Daniel Lezcano
2025-09-03 21:52 ` Rob Herring (Arm)
2025-09-04 19:47 ` David Lechner
2025-09-06 7:29 ` Krzysztof Kozlowski
2025-09-03 10:27 ` [PATCH v1 2/2] iio: adc: Add the NXP SAR ADC support for the " Daniel Lezcano
2025-09-03 11:20 ` Nuno Sá
2025-09-03 14:53 ` Daniel Lezcano
2025-09-03 15:41 ` Jonathan Cameron
2025-09-04 17:40 ` Daniel Lezcano
2025-09-04 17:49 ` David Lechner
2025-09-05 9:44 ` Daniel Lezcano
2025-09-05 15:25 ` David Lechner
2025-09-05 20:58 ` Daniel Lezcano
2025-09-05 21:54 ` David Lechner
2025-09-03 11:48 ` Andy Shevchenko
2025-09-03 15:28 ` Daniel Lezcano
2025-09-04 7:33 ` Andy Shevchenko
2025-09-04 16:52 ` Daniel Lezcano [this message]
2025-09-06 7:34 ` Krzysztof Kozlowski
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=9d4e7851-a874-413b-974c-d499ed59f553@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=chester62515@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=ghennadi.procopciuc@oss.nxp.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mbrugger@suse.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=s32@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).