After upgrading my Huawei phone (which is rooted) to Android 5.1.1 (CM 12.1) the 'USB debugging' option is greyed out with message:
'Device is in charging mode, USB debugging is disabled'.
The message is present even when the cable is not connected.
I have already tried following solutions (but the USB debugging is still greyed out):
Restarting the phone
Disabling developer mode and enabling again
Disabling developer mode, restarting the phone and enabling it again
Removing the cable and trying all above solutions