Fix keyboard max level
This commit is contained in:
parent
fb11bf952b
commit
0bea02cb05
14
kb.c
14
kb.c
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* kb.c
|
* kb.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017 Jeremy Soller <jeremy@system76.com>
|
* Copyright (C) 2017 Jeremy Soller <jeremy@system76.com>
|
||||||
* Copyright (C) 2014-2016 Arnoud Willemsen <mail@lynthium.com>
|
* Copyright (C) 2014-2016 Arnoud Willemsen <mail@lynthium.com>
|
||||||
* Copyright (C) 2013-2015 TUXEDO Computers GmbH <tux@tuxedocomputers.com>
|
* Copyright (C) 2013-2015 TUXEDO Computers GmbH <tux@tuxedocomputers.com>
|
||||||
|
|
@ -50,8 +50,8 @@ struct {
|
||||||
#undef C
|
#undef C
|
||||||
|
|
||||||
#define KB_COLOR_DEFAULT KB_COLOR_white
|
#define KB_COLOR_DEFAULT KB_COLOR_white
|
||||||
#define KB_BRIGHTNESS_MAX 10
|
#define KB_BRIGHTNESS_MAX 3
|
||||||
#define KB_BRIGHTNESS_DEFAULT KB_BRIGHTNESS_MAX
|
#define KB_BRIGHTNESS_DEFAULT 0
|
||||||
|
|
||||||
static int param_set_kb_color(const char *val, const struct kernel_param *kp)
|
static int param_set_kb_color(const char *val, const struct kernel_param *kp)
|
||||||
{
|
{
|
||||||
|
|
@ -267,13 +267,13 @@ static void kb_full_color__set_color(unsigned left, unsigned center,
|
||||||
kb_colors[right].name, (unsigned int)kb_colors[right].value.rgb,
|
kb_colors[right].name, (unsigned int)kb_colors[right].value.rgb,
|
||||||
kb_colors[extra].name, (unsigned int)kb_colors[extra].value.rgb
|
kb_colors[extra].name, (unsigned int)kb_colors[extra].value.rgb
|
||||||
);
|
);
|
||||||
|
|
||||||
ec_kb_color_set(EC_KB_LEFT, kb_colors[left].value.rgb);
|
ec_kb_color_set(EC_KB_LEFT, kb_colors[left].value.rgb);
|
||||||
kb_backlight.color.left = left;
|
kb_backlight.color.left = left;
|
||||||
|
|
||||||
ec_kb_color_set(EC_KB_CENTER, kb_colors[center].value.rgb);
|
ec_kb_color_set(EC_KB_CENTER, kb_colors[center].value.rgb);
|
||||||
kb_backlight.color.center = center;
|
kb_backlight.color.center = center;
|
||||||
|
|
||||||
ec_kb_color_set(EC_KB_RIGHT, kb_colors[right].value.rgb);
|
ec_kb_color_set(EC_KB_RIGHT, kb_colors[right].value.rgb);
|
||||||
kb_backlight.color.right = right;
|
kb_backlight.color.right = right;
|
||||||
|
|
||||||
|
|
@ -569,4 +569,4 @@ static ssize_t s76_color_store(struct device *child,
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
static DEVICE_ATTR(kb_color, 0644,
|
static DEVICE_ATTR(kb_color, 0644,
|
||||||
s76_color_show, s76_color_store);
|
s76_color_show, s76_color_store);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue