Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Rob Herring (Arm)" <robh@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	linux-iio@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: stm32-dfsdm: Treat flags as booleans
Date: Sun, 21 Jun 2026 15:10:26 +0100	[thread overview]
Message-ID: <20260621151026.69714694@jic23-huawei> (raw)
In-Reply-To: <ai1dhJWb9vKqxEEe@ashevche-desk.local>

On Sat, 13 Jun 2026 16:39:16 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Fri, Jun 12, 2026 at 04:51:50PM -0500, Rob Herring (Arm) wrote:
> > The "st,adc-alt-channel" and "st,filter0-sync" properties are
> > documented as boolean flags. The legacy parser read them as integer
> > cells, unlike the child-node parser which already checks only for
> > presence.
> > 
> > Use presence and boolean helpers so both parsers follow the binding and
> > the property type checker no longer reports the flags.  
> 
> For the patch
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> 
> However one interesting remark below.
> 
> ...
> 
> > -	ret = of_property_read_u32_index(indio_dev->dev.of_node,
> > -					 "st,adc-alt-channel", chan_idx,
> > -					 &df_ch->alt_si);  
> 
> > +	df_ch->alt_si = of_property_present(indio_dev->dev.of_node,  
> 
> I believe it still has another (serious?) issue. We usually don't use indio_dev
> for device properties. It's not a device that is described in DT.
> It seems the only driver in IIO that does that. Note, I haven't conducted any
> deeper research, it might be (however I'm quite in doubt) that this is correct
> use and one device registers a few indio_dev:s.

It is curious.  The registration sequence in this driver is complex, but I'm not
seeing anything that sets the fwnode for the struct iio_dev->dev before calling
the init() callbacks that end up in this code.  It is set later by iio_device_register()
(iirc that has something to do with consumers turning up later).

St folk could you take a look at this and see what we are missing
if it does currently work?

For now I'll apply this patch but might need to drop it if a fix clashes
with it.

Thanks,

Jonathan



> 
> > +					    "st,adc-alt-channel");  
> 



      reply	other threads:[~2026-06-21 14:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12 21:51 [PATCH] iio: stm32-dfsdm: Treat flags as booleans Rob Herring (Arm)
2026-06-13 13:39 ` Andy Shevchenko
2026-06-21 14:10   ` Jonathan Cameron [this message]

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=20260621151026.69714694@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=nuno.sa@analog.com \
    --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