From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Joshua Crofts <joshua.crofts1@gmail.com>
Cc: "Olivier Louvignes" <olivier@mgcrea.io>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Paul Cercueil" <paul@crapouillou.net>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] iio: adc: Add a driver for the Ingenic X1600 ADC
Date: Sat, 24 Oct 2026 13:12:42 +0300 [thread overview]
Message-ID: <atyEmgH7jqY0cM7A@ashevche-desk.local> (raw)
In-Reply-To: <20261024090006.00002720@gmail.com>
On Sat, Oct 24, 2026 at 09:00:06AM +0200, Joshua Crofts wrote:
> On Sat, 24 Oct 2026 06:13:57 +0200
> Olivier Louvignes <olivier@mgcrea.io> wrote:
Olivier, I also missed the cover letter, can you make sure it's there in v3,
please?
...
> > + case IIO_CHAN_INFO_RAW:
> > + ret = x1600_adc_read_raw_channel(adc, chan->channel, val);
> > + return ret ? ret : IIO_VAL_INT;
>
> You can use the Elvis operator here.
While true, Jonathan preference to open code this type of cases
if (ret)
return ret;
return IIO_VAL_INT;
...
> > + /*
> > + * Powered up for good: the keys poll it every few tens of milliseconds,
> > + * and powering up takes 2 ms.
> > + */
> > + writel(0, adc->base + X1600_ADC_REG_ENABLE);
> > + fsleep(2000);
fsleep(2 * USEC_PER_MSEC);
(will require time.h to be included).
> > + writel(0, adc->base + X1600_ADC_REG_CTRL);
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-10-24 10:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-24 4:13 [PATCH v2 1/2] dt-bindings: iio: adc: Add " Olivier Louvignes
2026-10-24 4:13 ` [PATCH v2 2/2] iio: adc: Add a driver for " Olivier Louvignes
2026-10-24 7:00 ` Joshua Crofts
2026-10-24 10:12 ` Andy Shevchenko [this message]
2026-10-24 8:22 ` H. Nikolaus Schaller
2026-10-24 17:57 ` H. Nikolaus Schaller
2026-10-24 6:38 ` [PATCH v2 1/2] dt-bindings: iio: adc: Add " Joshua Crofts
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=atyEmgH7jqY0cM7A@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=joshua.crofts1@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=olivier@mgcrea.io \
--cc=paul@crapouillou.net \
--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
all inboxes | Powered by JetHome®