The keyboard is a Logitech G915 TKL. The problem is that when the keyboard was connected via the Logitech Lightspeed adapter the battery levels did not appear in xfce4-power-manager (the taskbar widget). When connected via bluetooth the battery level was visible. The root cause was that the lightspeed usb connector (device id 0xc545), one of many from Logitech, was not associated with the kernel driver needed and defaulted to hid-generic. Keyboard functionality worked, but not the battery level reporting. So my kernel patch was a simple mapping telling the kernel to use the proper, already existing recvr_type_gaming_hidpp_ls_1_3, driver for this previously unknown device id.