From 462a088c474832b19ff2730de1e6bea66d399c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 15 Oct 2022 23:01:29 +0200 Subject: Add Turris kernel (includes patches from OpenWrt) --- ...-omnia-change-max-brightness-from-255-to-.patch | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pkgs/patches-linux-5.15/104-leds-turris-omnia-change-max-brightness-from-255-to-.patch (limited to 'pkgs/patches-linux-5.15/104-leds-turris-omnia-change-max-brightness-from-255-to-.patch') diff --git a/pkgs/patches-linux-5.15/104-leds-turris-omnia-change-max-brightness-from-255-to-.patch b/pkgs/patches-linux-5.15/104-leds-turris-omnia-change-max-brightness-from-255-to-.patch new file mode 100644 index 0000000..b99c0dc --- /dev/null +++ b/pkgs/patches-linux-5.15/104-leds-turris-omnia-change-max-brightness-from-255-to-.patch @@ -0,0 +1,36 @@ +From 349cbe949b9622cc05b148ecfa6268cbbae35b45 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Mon, 4 Jul 2022 12:59:55 +0200 +Subject: [PATCH] leds: turris-omnia: change max brightness from 255 to 1 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Using binary brightness makes more sense for this controller, because +internally in the MCU it works that way: the LED has a color, and a +state whether it is ON or OFF. + +The resulting brightness computation with led_mc_calc_color_components() +will now always result in either (0, 0, 0) or the multi_intensity value. + +Signed-off-by: Marek BehĂșn +--- + drivers/leds/leds-turris-omnia.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/leds/leds-turris-omnia.c b/drivers/leds/leds-turris-omnia.c +index fae155bd119c..f53bdc3f4cea 100644 +--- a/drivers/leds/leds-turris-omnia.c ++++ b/drivers/leds/leds-turris-omnia.c +@@ -146,7 +146,7 @@ static int omnia_led_register(struct i2c_client *client, struct omnia_led *led, + init_data.fwnode = &np->fwnode; + + cdev = &led->mc_cdev.led_cdev; +- cdev->max_brightness = 255; ++ cdev->max_brightness = 1; + cdev->brightness_set_blocking = omnia_led_brightness_set_blocking; + cdev->trigger_type = &omnia_hw_trigger_type; + cdev->default_trigger = omnia_hw_trigger.name; +-- +2.34.1 + -- cgit v1.2.3