Messages in this thread |  | | Date | Fri, 19 Jan 2024 16:54:36 +0000 | | From | Conor Dooley <> | | Subject | Re: [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] |  |