summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-11-11 17:05:40 (GMT)
committerSimon Glass <sjg@chromium.org>2015-11-20 03:13:41 (GMT)
commit3b5f6f5001d0f3dfde98ccc6b9350fe74dac41f8 (patch)
tree114c3fda09983d90591ee629923a934a390d196a /drivers/input
parentba42034267050d1a41479ba133d1c5b8679397f7 (diff)
downloadu-boot-3b5f6f5001d0f3dfde98ccc6b9350fe74dac41f8.tar.xz
input: Allow updating of keyboard LEDs
Add a function which returns a new keyboard LED value when the LEDs need updating. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/input.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 5de8d9d..954ecec 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -275,6 +275,7 @@ static struct input_key_xlate *process_modifier(struct input_config *config,
if (config->flags & FLAG_SCROLL_LOCK)
leds |= INPUT_LED_SCROLL;
config->leds = leds;
+ config->leds_changed = flip;
}
}
@@ -586,6 +587,14 @@ void input_allow_repeats(struct input_config *config, bool allow_repeats)
config->allow_repeats = allow_repeats;
}
+int input_leds_changed(struct input_config *config)
+{
+ if (config->leds_changed)
+ return config->leds;
+
+ return -1;
+}
+
int input_add_tables(struct input_config *config, bool german)
{
struct kbd_entry *entry;