Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: gpio-keys - allow disabling individual buttons in DT

Add support to disable buttons from DT via status property if given button
is not supported on given platforms. This will help re-using existing dtsi
files across multiple platforms.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Laxman Dewangan and committed by
Dmitry Torokhov
809d9516 c4dc5f8c

+2 -2
+2 -2
drivers/input/keyboard/gpio_keys.c
··· 630 630 if (!node) 631 631 return ERR_PTR(-ENODEV); 632 632 633 - nbuttons = of_get_child_count(node); 633 + nbuttons = of_get_available_child_count(node); 634 634 if (nbuttons == 0) 635 635 return ERR_PTR(-ENODEV); 636 636 ··· 648 648 of_property_read_string(node, "label", &pdata->name); 649 649 650 650 i = 0; 651 - for_each_child_of_node(node, pp) { 651 + for_each_available_child_of_node(node, pp) { 652 652 enum of_gpio_flags flags; 653 653 654 654 button = &pdata->buttons[i++];