mirror of
https://github.com/wessel-novacustom/clevo-keyboard.git
synced 2024-11-14 19:24:00 +01:00
Prepare clevo skeleton
This commit is contained in:
parent
91a69bab8c
commit
81d6fe0e10
|
@ -54,8 +54,8 @@ static struct key_entry clevo_keymap[] = {
|
|||
{ KE_KEY, CLEVO_EVENT_KB_LEDS_INCREASE, { KEY_KBDILLUMUP } },
|
||||
{ KE_KEY, CLEVO_EVENT_KB_LEDS_TOGGLE, { KEY_KBDILLUMTOGGLE } },
|
||||
{ KE_KEY, CLEVO_EVENT_KB_LEDS_CYCLE_MODE, { KEY_LIGHTS_TOGGLE } },
|
||||
// Single cycle key (white only versions)
|
||||
{ KE_KEY, CLEVO_EVENT_KB_LEDS_CYCLE_BRIGHTNESS, { KEY_KBDILLUMTOGGLE } },
|
||||
// Single cycle key (white only versions) (currently handled in driver)
|
||||
// { KE_KEY, CLEVO_EVENT_KB_LEDS_CYCLE_BRIGHTNESS, { KEY_KBDILLUMTOGGLE } },
|
||||
|
||||
// Touchpad
|
||||
// The weirdly named touchpad toggle key that is implemented as KEY_F21 "everywhere"
|
||||
|
@ -256,6 +256,9 @@ static void clevo_keyboard_event_callb(u32 event)
|
|||
case CLEVO_EVENT_KB_LEDS_CYCLE_MODE:
|
||||
set_next_color_whole_kb();
|
||||
break;
|
||||
case CLEVO_EVENT_KB_LEDS_CYCLE_BRIGHTNESS:
|
||||
clevo_leds_notify_brightness_change_extern();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ int clevo_leds_init(struct platform_device *dev);
|
|||
int clevo_leds_remove(struct platform_device *dev);
|
||||
enum clevo_kb_backlight_types clevo_leds_get_backlight_type(void);
|
||||
void clevo_leds_restore_state_extern(void);
|
||||
void clevo_leds_notify_brightness_change_extern(void);
|
||||
void clevo_leds_set_brightness_extern(enum led_brightness brightness);
|
||||
void clevo_leds_set_color_extern(u32 color);
|
||||
|
||||
|
@ -414,6 +415,13 @@ void clevo_leds_restore_state_extern(void) {
|
|||
}
|
||||
EXPORT_SYMBOL(clevo_leds_restore_state_extern);
|
||||
|
||||
void clevo_leds_notify_brightness_change_extern(void) {
|
||||
if (clevo_kb_backlight_type == CLEVO_KB_BACKLIGHT_TYPE_FIXED_COLOR) {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(clevo_leds_notify_brightness_change_extern);
|
||||
|
||||
void clevo_leds_set_brightness_extern(enum led_brightness brightness) {
|
||||
if (clevo_kb_backlight_type == CLEVO_KB_BACKLIGHT_TYPE_FIXED_COLOR) {
|
||||
clevo_led_cdev.brightness_set(&clevo_led_cdev, brightness);
|
||||
|
|
Loading…
Reference in a new issue