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 <benjamin.tissoires@gmail.com>
This commit is contained in:
Benjamin Tissoires
2019-01-03 11:15:59 +01:00
committed by Peter Hutterer
parent 8a1487f6f4
commit e59ef319b0

View File

@@ -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;
}