Re: [PATCH 1/2] Input: cros-ec-keyb: Only register keyboard if rows/columns exist

From: Stephen Boyd
Date: Mon Apr 25 2022 - 16:12:58 EST


Quoting Dmitry Torokhov (2022-04-24 20:47:03)
> >
> > + /*
> > + * No rows and columns? There isn't a matrix but maybe there are
> > + * switches to register in cros_ec_keyb_register_bs() because this is a
> > + * detachable device.
> > + */
> > + if (!device_property_read_bool(dev, "keypad,num-rows") &&
> > + !device_property_read_bool(dev, "keypad,num-cols"))
>
> Why are we abusing device_property_read_bool() for properties that are
> not flags instead of using device_property_present()?
>

Because I wrote this using DT APIs first and wasn't aware that
device_property_present() was a thing. I'll resend it with that API
usage.