nuttx/drivers/usbhost
Justin Hammond d95d8c0fb1 usbhost: Report each device as it is enumerated.
A host that enumerates a device says nothing about it unless the whole of
CONFIG_DEBUG_USB_INFO is on, and then it says a great deal else besides.
The quietest case is the one that matters most: a device no class driver
claims produces no output at all, so a user with an unsupported device
sees exactly what a user with no device sees.

Add CONFIG_USBHOST_ANNOUNCE, reporting each device once, in the shape a
reader is likely to recognise from other systems: where it is, what it is,
its vendor, product and release, and the maker, product and serial number
it reports in its own string descriptors.  Those cost a control transfer
each, so they are read only where a report was asked for, and only once
the device is addressed.

The report is made after binding rather than from within it, because a
composite device never reaches the class lookup: usbhost_composite() is
tried first and binds it.  Whether a driver claimed the device is tracked
rather than read from the returned status, which the per interface loop
sets to OK whatever happened.

The port is given as the path from the root hub, and the path names the
bus, because a device on the first port of a hub and one on the first port
of a controller are otherwise reported identically.  struct
usbhost_roothubport_s gains that bus number for the purpose; a driver that
does not set it reports zero, which is the only bus it has.

Class codes are translated where a name is more use than a number, which
includes the HID boot protocols, so a keyboard is reported as a keyboard.

Default n, so no existing configuration changes.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Justin Hammond <justin@dynam.ac>
2026-08-09 02:09:47 +08:00
..
CMakeLists.txt drivers/usbhost/usbhost_cdcecm.c: Added support for Host CDC-ECM 2026-05-06 06:20:03 +08:00
hid_parser.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
Kconfig usbhost: Report each device as it is enumerated. 2026-08-09 02:09:47 +08:00
Make.defs drivers/usbhost/usbhost_cdcecm.c: Added support for Host CDC-ECM 2026-05-06 06:20:03 +08:00
usbhost_bthci.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_cdcacm.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_cdcecm.c drivers/usbhost/usbhost_cdcecm.c: Converted CDC-ECM to lower half 2026-05-06 06:20:03 +08:00
usbhost_cdcmbim.c drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
usbhost_composite.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_composite.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
usbhost_devaddr.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_drivers.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_enumerate.c usbhost: Report each device as it is enumerated. 2026-08-09 02:09:47 +08:00
usbhost_findclass.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_ft232r.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_hidkbd.c drivers/usbhost: report the HID keyboard through the keyboard upper half 2026-07-31 11:02:20 -03:00
usbhost_hidmouse.c drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
usbhost_hub.c arch/arm/src/stm32h5/stm32_usbdrdhost.c: Fixed Hub support 2026-04-19 14:24:40 +08:00
usbhost_max3421e.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_registerclass.c drivers/usbhost: Refuse to register the same class driver twice. 2026-08-08 14:55:34 -03:00
usbhost_registry.c drivers/usbhost: Use small lock to protect usbhost common function 2025-12-13 12:39:48 +08:00
usbhost_registry.h drivers/usbhost: Use small lock to protect usbhost common function 2025-12-13 12:39:48 +08:00
usbhost_skeleton.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_storage.c drivers/usbhost: Register the partitions on a mass storage device. 2026-08-08 14:40:52 -03:00
usbhost_trace.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_waiter.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_xboxcontroller.c drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
usbhost_xhci.h drivers/usbhost: add xHCI support 2025-05-15 21:58:57 +08:00
usbhost_xhci_pci.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_xhci_trace.c drivers/usbhost: Correct the xHCI controller name in a trace string. 2026-08-08 14:55:00 -03:00
usbhost_xhci_trace.h drivers/usbhost: Define the xHCI endpoint-allocation trace. 2026-08-08 14:55:00 -03:00