On Tue, Jun 06, 2017 at 04:32:46PM +0200, Mylene Josserand wrote:
quoted
quoted
Notice that the DT parsing uses a sysinfo's variable (si->num_btns)
which is retrieved in the startup function (thanks to
get_sysinfo). So, currently, it is not possible to move the startup
function after the DT parsing.
Can't that be made the other way around? You parse the number of
buttons in the DT, and check the consistency with the hardware?
It could be possible but currently, it was designed to enable every button
from hardware's configuration and DT binding was just a way to customize
button's keycode (default is KEY_RESERVED).
If I base it on the DT, it means that some buttons could never be reported
(such as deactivated) because they will not be present in the DT. I am not
sure if it is the behavior we want. What do you think?
I don't really know. Both look reasonable, and it seems to be more a
matter of policy. Dmitry?
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com