summaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2016-01-13 00:14:19 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2016-01-13 00:18:06 -0800
commit809d9516da73345cca587743b57e45e9095d851e (patch)
tree13c5edd93cfc0b593674a3c95d195f36bb40f9ad /drivers/input/keyboard
parentc4dc5f8c953f23d45329abc8b8e04f0c1e314a75 (diff)
downloadblackbird-op-linux-809d9516da73345cca587743b57e45e9095d851e.tar.gz
blackbird-op-linux-809d9516da73345cca587743b57e45e9095d851e.zip
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>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r--drivers/input/keyboard/gpio_keys.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index 671cdc9a6aea..29093657f2ef 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -630,7 +630,7 @@ gpio_keys_get_devtree_pdata(struct device *dev)
if (!node)
return ERR_PTR(-ENODEV);
- nbuttons = of_get_child_count(node);
+ nbuttons = of_get_available_child_count(node);
if (nbuttons == 0)
return ERR_PTR(-ENODEV);
@@ -648,7 +648,7 @@ gpio_keys_get_devtree_pdata(struct device *dev)
of_property_read_string(node, "label", &pdata->name);
i = 0;
- for_each_child_of_node(node, pp) {
+ for_each_available_child_of_node(node, pp) {
enum of_gpio_flags flags;
button = &pdata->buttons[i++];
OpenPOWER on IntegriCloud