From e59ef319b0f9714f3110015cbc033eb7d14c4153 Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Thu, 3 Jan 2019 11:15:59 +0100 Subject: [PATCH] hidpp20: non-rgb leds: switch back to HW control once configured As mentioned in the code: We revert to HW control of the LEDs. This effectively disable the capability of changing the DPI/profile LEDs, but this allows to make them work with the internal DPI/profile switches. The net result is: - DPI/profiles can't be controlled (but who wants this?) - The logo can properly controlled Signed-off-by: Benjamin Tissoires --- src/driver-hidpp20.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/driver-hidpp20.c b/src/driver-hidpp20.c index 8156abad..d350163e 100644 --- a/src/driver-hidpp20.c +++ b/src/driver-hidpp20.c @@ -588,6 +588,20 @@ hidpp20drv_update_led_1300(struct ratbag_led *led, struct hidpp20drv_data *data) if (rc) return rc; + /* + * We revert to HW control of the LEDs. + * This effectively disable the capability of changing the DPI/profile + * LEDs, but this allows to make them work with the internal DPI/profile + * switches. + * + * The net result is: + * - DPI/profiles can't be controlled (but who wants this?) + * - The logo can properly controlled + */ + rc = hidpp20_led_sw_control_set_sw_ctrl(data->dev, false); + if (rc) + return rc; + return RATBAG_SUCCESS; }