From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Ceclan Dumitru <mitrutzceclan@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
linus.walleij@linaro.org, brgl@bgdev.pl, andy@kernel.org,
linux-gpio@vger.kernel.org,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Michael Walle" <michael@walle.cc>,
"Andy Shevchenko" <andy.shevchenko@gmail.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"ChiaEn Wu" <chiaen_wu@richtek.com>,
"Niklas Schnelle" <schnelle@linux.ibm.com>,
"Leonard Göhrs" <l.goehrs@pengutronix.de>,
"Mike Looijmans" <mike.looijmans@topic.nl>,
"Haibo Chen" <haibo.chen@nxp.com>,
"Hugo Villeneuve" <hvilleneuve@dimonoff.com>,
"David Lechner" <dlechner@baylibre.com>,
"Ceclan Dumitru" <dumitru.ceclan@analog.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v12 2/2] iio: adc: ad7173: add AD7173 driver
Date: Mon, 22 Jan 2024 11:09:02 +0000 [thread overview]
Message-ID: <20240122110902.00004357@Huawei.com> (raw)
In-Reply-To: <57ea42b3-106b-4361-8d07-4e1656bf6e58@gmail.com>
On Mon, 22 Jan 2024 12:02:35 +0200
Ceclan Dumitru <mitrutzceclan@gmail.com> wrote:
> On 1/21/24 17:50, Jonathan Cameron wrote:
> >> + ret = devm_ad_sd_setup_buffer_and_trigger(dev, indio_dev);
> > If the error interrupt is provided either first, or as the only interrupt
> > this is going to use the wrong one.
> >
> > Probably need to have a variant of that which takes an explicit irq so that
> > figuring out which irq is relevant becomes a driver problem rather than the
> > library having a go based on spi->irq.
>
> Would it be acceptable to check if spi->irq interrupt number is equal to
> fwnode_irq_get_byname(dev_fwnode(dev), "rdy")?
That would be a good start and probably cover most cases.
>
> If not, a message could be passed that specifies either that "rdy" is
> needed or that it must be placed first.
If you are mandating the order, that should possibly be reflected in the binding.
If this was hard to fix, I'd be fine with leaving for when someone runs into
a case where they have it ordered the other way around, but given it seems simple
to fix up probably better to just do it and avoid having to remember anything
about it later.
>
>
> Another alternative would be adding irq to ad_sigma_delta_info so a
> driver could specify the desired interrupt to be used for conversions.
>
That works. Make it optional so if value is 0 use spi->irq as before so
that you don't need to modify the other drivers.
Jonathan
next prev parent reply other threads:[~2024-01-22 11:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-18 12:49 [PATCH v12 1/2] dt-bindings: adc: add AD7173 Dumitru Ceclan
2024-01-18 12:49 ` [PATCH v12 2/2] iio: adc: ad7173: add AD7173 driver Dumitru Ceclan
2024-01-21 15:50 ` Jonathan Cameron
2024-01-22 10:02 ` Ceclan Dumitru
2024-01-22 11:09 ` Jonathan Cameron [this message]
2024-01-18 15:23 ` [PATCH v12 1/2] dt-bindings: adc: add AD7173 Conor Dooley
2024-01-18 15:51 ` Ceclan Dumitru
2024-01-18 16:06 ` Conor Dooley
2024-01-21 15:41 ` Jonathan Cameron
2024-01-22 17:48 ` Conor Dooley
2024-01-18 22:42 ` David Lechner
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=20240122110902.00004357@Huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=arnd@arndb.de \
--cc=brgl@bgdev.pl \
--cc=chiaen_wu@richtek.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=dumitru.ceclan@analog.com \
--cc=haibo.chen@nxp.com \
--cc=hvilleneuve@dimonoff.com \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=l.goehrs@pengutronix.de \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@walle.cc \
--cc=mike.looijmans@topic.nl \
--cc=mitrutzceclan@gmail.com \
--cc=robh+dt@kernel.org \
--cc=schnelle@linux.ibm.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