[usb_moded] Refactor entering/leaving usb mode. JB#41748
Split mode switching to three layers: Tracking cable connection state,
choosing target mode, and performing required actions to activate
the chosen mode.
Try to minimize places where layer borders are crossed - which should
work also as an enabler for moving blocking actions to separate thread
later on.
Arrange logic in such manner that usb gadget is always configured as
being able to serve some function - fallback being the dummy mass_storage
function used for charging.
Deprecate command line options that serve no useful purpose after the
changes.
Signed-off-by:
Simo Piiroinen <simo.piiroinen@jollamobile.com>
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment