From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"Oleksij Rempel" <o.rempel@pengutronix.de>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"David Jander" <david@protonic.nl>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
"Andy Shevchenko" <andy@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>
Subject: Re: [PATCH v4 2/2] iio: adc: Add TI ADS131M0x ADC driver
Date: Mon, 8 Dec 2025 17:08:59 +0000 [thread overview]
Message-ID: <20251208170859.00006f2f@huawei.com> (raw)
In-Reply-To: <aTYGvaZk_PzouTRf@smile.fi.intel.com>
On Mon, 8 Dec 2025 00:59:09 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Sun, Dec 07, 2025 at 07:33:13PM +0000, Jonathan Cameron wrote:
> > On Tue, 18 Nov 2025 15:18:21 +0100
> > Oleksij Rempel <o.rempel@pengutronix.de> wrote:
>
> ...
>
> > > + clk = devm_clk_get_enabled(dev, NULL);
> >
> > This surprised me, so I went digging. Anyone know why
> > the stub returns NULL? Given that the normal function doesn't have
> > that as an allowed return value that seems really odd.
> >
> > Still, it does, so this code is fine if odd.
>
> I believe it has to do something with an optional clocks or so, but OTOH
> I think it's so odd that may be considered as a bug in CCF APIs.
I'd think an optional clock is optional whether or not the generic clock
stuff is built. Hence should use devm_clk_get_optional_enabled()
That one I agree should be stubbed to return NULL (which it is)
Ah well, I don't really care about the answer, just diverted me for
a few mins so I thought I'd comment.
Jonathan
>
> > > + if (IS_ERR_OR_NULL(clk)) {
> > > + if (IS_ERR(clk))
> > > + ret = PTR_ERR(clk);
> > > + else
> > > + ret = -ENODEV;
> > > +
> > > + return dev_err_probe(dev, ret, "clk get enabled failed\n");
> > > + }
>
next prev parent reply other threads:[~2025-12-08 17:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-18 14:18 [PATCH v4 0/2] iio: adc: Add support for TI ADS131M0x ADCs Oleksij Rempel
2025-11-18 14:18 ` [PATCH v4 1/2] bindings: iio: adc: Add bindings " Oleksij Rempel
2025-11-18 14:18 ` [PATCH v4 2/2] iio: adc: Add TI ADS131M0x ADC driver Oleksij Rempel
2025-12-07 19:33 ` Jonathan Cameron
2025-12-07 22:59 ` Andy Shevchenko
2025-12-08 17:08 ` Jonathan Cameron [this message]
2025-11-18 15:14 ` [PATCH v4 0/2] iio: adc: Add support for TI ADS131M0x ADCs 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=20251208170859.00006f2f@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=david@protonic.nl \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=o.rempel@pengutronix.de \
--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;
as well as URLs for NNTP newsgroup(s).