devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: "Nuno Sá" <noname.nuno@gmail.com>
Cc: Conor Dooley <conor.dooley@microchip.com>,
	"Paller, Kim Seer" <KimSeer.Paller@analog.com>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	"Hennerich, Michael" <Michael.Hennerich@analog.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>, Crt Mori <cmo@melexis.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>
Subject: Re: [PATCH v6 1/2] dt-bindings: iio: frequency: add admfm2000
Date: Fri, 19 Jan 2024 16:54:36 +0000	[thread overview]
Message-ID: <20240119-mammary-another-f060e43bcdf7@spud> (raw)
In-Reply-To: <dd3051170bc9724ca7e2884344dee3bc7b8f0a85.camel@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 922 bytes --]

> > > Hmmm, How is the enum easier than a boolean property :)? I guess the device has a
> > > default mode. So, if it is Direct IF mode you have 'adi,mixer-mode' to enable
> > > that
> > > mode and that's it. So the code is pretty much just:
> > > 
> > > if (device_property_read_bool()) {
> > 
> > device_property_present() is preferred I think.
> > 
> 
> Hmm, don't want to start an argument but I'm not sure either :). I would argue that
> device_property_read_bool() has more users (according to git grep - and if I did not
> mess the grep) and it pretty much wraps device_property_present(). So, if there was
> no value in it's "meaning" we would/should stop using it and eventually drop it...
> Anyways, not really a big deal.

If there's an actually boolean property that can have a true/false
value, but testing for presence alone device_property_present() is
the more accurate function to use.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2024-01-19 16:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18  8:58 [PATCH v6 0/2] Changes to admfm2000 driver Kim Seer Paller
2024-01-18  8:58 ` [PATCH v6 1/2] dt-bindings: iio: frequency: add admfm2000 Kim Seer Paller
2024-01-18 16:09   ` Conor Dooley
2024-01-19  0:30     ` Paller, Kim Seer
2024-01-19  8:20       ` Nuno Sá
2024-01-19  8:31         ` Conor Dooley
2024-01-19  9:16           ` Paller, Kim Seer
2024-01-19  9:21           ` Nuno Sá
2024-01-19 16:54             ` Conor Dooley [this message]
2024-01-18  8:58 ` [PATCH v6 2/2] iio: frequency: admfm2000: New driver Kim Seer Paller
2024-01-21 16:09   ` Jonathan Cameron

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=20240119-mammary-another-f060e43bcdf7@spud \
    --to=conor@kernel.org \
    --cc=KimSeer.Paller@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=brgl@bgdev.pl \
    --cc=cmo@melexis.com \
    --cc=conor+dt@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noname.nuno@gmail.com \
    --cc=robh+dt@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).