RFC: API Change: USB HID remove get_protocol/set_protocol/get_idle/set_idle callbacks

Johann Fischer

Problem description:

The USB HID class API offers the possibility to register callbacks
for Get/SetIdle, Get/SetProtocol to the application.
Rules for these callbacks are neither obvious nor documented.

The Get/SetProtocol callbacks are redundant and do not provide any
additional value since the way to inform the application
about the change of the protocol exists via the callback
hid_protocol_cb_t protocol_change.

The core provides implementation to handle Get/SetIdle requests and
on idle reports. If this is not suitable in any way then the application
should implement everything itself.

Also the possibility to call unknown application code while processing
control requests should also be avoided or reduced to a minimum.

Example that it can be used all wrong:

The probability that someone will be affected by this change is very low, since
the usage is neither necessary nor obvious.

Github Issue for this API change:

Github PR:

Johann Fischer

Join devel@lists.zephyrproject.org to automatically receive all group messages.