X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Finput.h;h=3285a3ffa28919d31c042fd08cfc1e5774155db8;hb=b4ee6daad7a2604ca9466b2ba48de86cc27d381f;hp=c1af259e265adb646d1e86b4d0f392d2c8897f6f;hpb=b1d7a1875e2f96417a2ecd7ebe1680f650c2be22;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/input.h b/include/input.h index c1af259..3285a3f 100644 --- a/include/input.h +++ b/include/input.h @@ -1,9 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * Keyboard input helper functions (too small to be called a layer) * * Copyright (c) 2011 The Chromium OS Authors. - * - * SPDX-License-Identifier: GPL-2.0+ */ #ifndef _INPUT_H @@ -17,8 +16,8 @@ enum { enum { /* Keyboard LEDs */ INPUT_LED_SCROLL = 1 << 0, - INPUT_LED_CAPS = 1 << 1, - INPUT_LED_NUM = 1 << 2, + INPUT_LED_NUM = 1 << 1, + INPUT_LED_CAPS = 1 << 2, }; /* @@ -43,7 +42,8 @@ struct input_config { /* Which modifiers are active (1 bit for each MOD_... value) */ uchar modifiers; uchar flags; /* active state keys (FLAGS_...) */ - uchar leds; /* active LEDS (INPUT_LED_...) */ + uchar leds; /* active LEDs (INPUT_LED_...) */ + uchar leds_changed; /* LEDs that just changed */ uchar num_tables; /* number of modifier tables */ int prev_keycodes[INPUT_BUFFER_LEN]; /* keys held last time */ int num_prev_keycodes; /* number of prev keys */ @@ -162,6 +162,17 @@ void input_set_delays(struct input_config *config, int repeat_delay_ms, void input_allow_repeats(struct input_config *config, bool allow_repeats); /** + * Check if keyboard LEDs need to be updated + * + * This can be called after input_tstc() to see if keyboard LEDs need + * updating. + * + * @param config Input state + * @return -1 if no LEDs need updating, other value if they do + */ +int input_leds_changed(struct input_config *config); + +/** * Set up the key map tables * * This must be called after input_init() or keycode decoding will not work.