diff --git a/src/clevo_leds.c b/src/clevo_leds.c deleted file mode 100644 index 9310504..0000000 --- a/src/clevo_leds.c +++ /dev/null @@ -1,18 +0,0 @@ -/*! - * Copyright (c) 2018-2020 TUXEDO Computers GmbH - * - * This file is part of tuxedo-keyboard. - * - * tuxedo-keyboard is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software. If not, see . - */ diff --git a/src/clevo_leds.h b/src/clevo_leds.h index d56056f..7642568 100644 --- a/src/clevo_leds.h +++ b/src/clevo_leds.h @@ -21,7 +21,6 @@ #define CLEVO_LEDS_H #include -#include enum clevo_kb_backlight_types { CLEVO_KB_BACKLIGHT_TYPE_NONE = 0x00, @@ -232,6 +231,9 @@ int clevo_leds_init(struct platform_device *dev) } pr_debug("Keyboard backlight type: 0x%02x\n", clevo_kb_backlight_type); + clevo_leds_set_brightness_extern(CLEVO_KBD_BRIGHTNESS_DEFAULT); + clevo_leds_set_color_extern(CLEVO_KB_COLOR_DEFAULT); + if (clevo_kb_backlight_type == CLEVO_KB_BACKLIGHT_TYPE_FIXED_COLOR) { pr_debug("Registering fixed color leds interface\n"); ret = led_classdev_register(&dev->dev, &clevo_led_cdev); @@ -329,11 +331,11 @@ void clevo_leds_set_color_extern(u32 color) { clevo_mcled_cdevs[1].subled_info[0].intensity = (color >> 16) & 0xff; clevo_mcled_cdevs[1].subled_info[1].intensity = (color >> 8) & 0xff; clevo_mcled_cdevs[1].subled_info[2].intensity = color & 0xff; - clevo_mcled_cdevs[1].led_cdev.brightness_set(&clevo_mcled_cdevs[1].led_cdev, clevo_mcled_cdevs[0].led_cdev.brightness); + clevo_mcled_cdevs[1].led_cdev.brightness_set(&clevo_mcled_cdevs[1].led_cdev, clevo_mcled_cdevs[1].led_cdev.brightness); clevo_mcled_cdevs[2].subled_info[0].intensity = (color >> 16) & 0xff; clevo_mcled_cdevs[2].subled_info[1].intensity = (color >> 8) & 0xff; clevo_mcled_cdevs[2].subled_info[2].intensity = color & 0xff; - clevo_mcled_cdevs[2].led_cdev.brightness_set(&clevo_mcled_cdevs[2].led_cdev, clevo_mcled_cdevs[0].led_cdev.brightness); + clevo_mcled_cdevs[2].led_cdev.brightness_set(&clevo_mcled_cdevs[2].led_cdev, clevo_mcled_cdevs[2].led_cdev.brightness); } } EXPORT_SYMBOL(clevo_leds_set_color_extern);