rockbox/firmware/usbstack
mojyack 2291aa24f2 usb: refactor control request handling
this commit is a combination of the following changes, which
significantly refactors usb core and class drivers.

1. unify usb buffers of each class driver to reduce iram usage
currently, many class drivers allocate their own buffer to receive
control out data, which is a waste of iram.
share one common buffer for that usage to address the issue.

2. simplify control request handling by implicitly receiving write
   request data packets
change 1 above fixed the data destination. therefore, having the core
receive the data allows us to reduce the class driver's work and
simplifies the api.

3. enhance usb core's control request handling and unify the legacy
   driver api
in order to implement change 2, both the legacy and new driver apis
should be supported. so that, using the designware driver as a
reference, the new driver api functionality is move into usb core.
this simplifies the usb device drivers by requiring them to implement
only the functionalities equivalent to the legacy api.

tested with ipodvideo(arc) and erosqnative(designware)

Change-Id: I3627daa90278751f599e2108ec150ec3f8f6c524
2026-05-25 12:42:36 +01:00
..
iap usb: add usb iAP driver 2026-05-03 12:40:54 -04:00
usb_audio.c usb: refactor control request handling 2026-05-25 12:42:36 +01:00
usb_audio.h usb: hold class_driver instance in each driver 2026-05-03 15:18:51 -04:00
usb_audio_def.h usbaudio: convert to asynchronous operation 2025-11-15 07:32:05 -05:00
usb_charging_only.c usb: enable cpu boost for specific class drivers 2026-05-04 18:15:52 +09:00
usb_charging_only.h usb: hold class_driver instance in each driver 2026-05-03 15:18:51 -04:00
usb_class_driver.h usb: refactor control request handling 2026-05-25 12:42:36 +01:00
usb_core.c usb: refactor control request handling 2026-05-25 12:42:36 +01:00
usb_hid.c usb: refactor control request handling 2026-05-25 12:42:36 +01:00
usb_hid.h usb: hold class_driver instance in each driver 2026-05-03 15:18:51 -04:00
usb_hid_def.h usb: hid: move hid definitions to usb_hid_def.h 2026-01-12 16:57:36 -05:00
usb_hid_usage_tables.h usb_hid: add support for Battery Strength 2021-03-06 04:15:02 +00:00
usb_iap.c usb: refactor control request handling 2026-05-25 12:42:36 +01:00
usb_iap.h usb: hold class_driver instance in each driver 2026-05-03 15:18:51 -04:00
usb_serial.c usb: refactor control request handling 2026-05-25 12:42:36 +01:00
usb_serial.h usb: hold class_driver instance in each driver 2026-05-03 15:18:51 -04:00
usb_storage.c usb: refactor control request handling 2026-05-25 12:42:36 +01:00
usb_storage.h usb: hold class_driver instance in each driver 2026-05-03 15:18:51 -04:00