lkml.org 
[lkml]   [2024]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 1/2] dt-bindings: iio: frequency: add admfm2000
> > > 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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2024-01-19 17:55    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog