]> git.ipfire.org Git - thirdparty/linux.git/commit
xhci: dbc: prepare to expose strings through sysfs
authorŁukasz Bartosik <ukaszb@chromium.org>
Tue, 20 Jan 2026 18:11:45 +0000 (20:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jan 2026 16:16:24 +0000 (17:16 +0100)
commita30c923c42508c6467aa65612b578bcba6c277f2
treea9107d107c01e700f7fb0686b76644499171a31c
parent27fbc19e52b9a76b79a1de691b0b978e335c4c35
xhci: dbc: prepare to expose strings through sysfs

Reorganize the code to prepare ground for setting serial number,
product and manufacturer names through sysfs. This commit:
1. Introduces new buffers for storing serial number, product and
   manufacturer name in utf8. The buffers will be used by sysfs
   *_show and *_store functions.
2. Increases USB string descriptor data maximum length to the
   value from USB specification (126 bytes of data).
3. Adds new helper functions get_str_desc_len, prepare_len
   and xhci_dbc_populate_str_desc.

Signed-off-by: Łukasz Bartosik <ukaszb@chromium.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://patch.msgid.link/20260120181148.128712-2-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-dbgcap.c
drivers/usb/host/xhci-dbgcap.h