Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp3982686pxb; Mon, 27 Sep 2021 07:02:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZPt2gv8shKSMagVQ9V79vJMs+YnuJNO4IuhvB+M1v+VSFqg3k2I8Ly+PhENrztP1kUwTo X-Received: by 2002:aa7:848c:0:b0:43f:cbf8:49af with SMTP id u12-20020aa7848c000000b0043fcbf849afmr113785pfn.32.1632751353350; Mon, 27 Sep 2021 07:02:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632751353; cv=none; d=google.com; s=arc-20160816; b=k5erypCqmm5ctrUU37eB2OmGijUx5vDAhIcU+OE8iISPQselNcvIgaTlAdvBkV3UKx +0Awkk1A0wT1BDctqeTuIcUhKJCO2aLmMWX0gE242p0jQ2NgqzGC3guzTN01zqPVCt13 o7F8vfVY6r1jhmJLfZcuHWip80i0yt814IZliIra0fr1am5AlNALmxI8Q25HoGmvJ4g6 si2rh0rxXtS+F4SrHfDWNBupoY27aI0Rm5SUVTRQfYF+BTIuaCQxmxJCrq/PBX5KfK27 8O0G2pK1ckWCkkk0HxRcYMrLW4qiggStNEcIJZW5mIGtqrjlViZE7DdCEoUwhiWq0h7e UnVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wXpGy2PTM0V+81OXlHnkwAzAJa3gGFl1D+aA4vzoKOg=; b=jcJ8/2MuWg2VK3+RUc2h0efFtXZy3nx22L6LblWEtwtCWhE3XoqtprbAp/eoMzdQn0 8MlA/p3G63TV6cdH7B114sj0bAC4sfAFx7+3WB8CSAWgVHka5ZpDkfX0UW31Mxhdnejs /xzDL5jDM/+QmEJ7KT+Wn4nzkOZIqnwJVsD59qPr7MPlN78F4abDryLMuFKBenIKz16p 4SNfQwNnmi5YUTH7x/bz79Cc4QAx2D4p0Gblm1vlOzVRFd10Yfv+NdxgJC/IEvuUQd4v FLRJk48In8IZ+LVJrnyUSf4+0vz+QsaN5GetcgnyDBGsaWDloWHDVhvzBEBRrLea1kyl vLAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fSPSfvsN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t15si26089277pjj.175.2021.09.27.07.02.18; Mon, 27 Sep 2021 07:02:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fSPSfvsN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234926AbhI0OCU (ORCPT + 99 others); Mon, 27 Sep 2021 10:02:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:48072 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234718AbhI0OBf (ORCPT ); Mon, 27 Sep 2021 10:01:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A452561262; Mon, 27 Sep 2021 13:59:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632751197; bh=vzkglIlnrsU3phpeMtmJ3uYRb1oFLlWKkXKAwzdpsEM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fSPSfvsN1J+dO4MJphnWB7Ir0YsFXD4pja1GgydDSA3ALq341adDwgUL61uJVPUSj xhmqvfSDyvk95BWpW3w91aMvipiStuoFt9pfRqq0x39DqXeNdWOCvcxnQP0kOVyI4E kvDSSRg8HftvI1zi8W9uEI/N4KUlv/zD4Fw6uGWYJvFCZ6C6WfVsvv0jhlDcei3kkf APttyRbnTzn8eyVAVHSeXCnT2AzTA2Da69MDGAepIR+IHGg/GGs77Do6SGriyUrKfp FkW4ZP9kdmCtsck+dRqM4Gvh+k9A+N8jI/R8b5mbltUCVeWXWUcEdVPIkdJouHbvWd C6euDVJzP+u+g== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mUrAh-000AuQ-Sq; Mon, 27 Sep 2021 15:59:55 +0200 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Greg Kroah-Hartman Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , Heikki Krogerus , Rajat Jain , linux-kernel@vger.kernel.org Subject: [PATCH 14/17] ABI: sysfs-bus-usb: add missing sysfs fields Date: Mon, 27 Sep 2021 15:59:47 +0200 Message-Id: <7f6f7b955032836546f78a9041b22c10b6f4bc5b.1632750608.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are lots of interface, power and endpoint properties that are currently missing any documentation. Add a description for them. Signed-off-by: Mauro Carvalho Chehab --- See [PATCH 00/17] at: https://lore.kernel.org/all/cover.1632750608.git.mchehab+huawei@kernel.org/ Documentation/ABI/testing/sysfs-bus-usb | 274 ++++++++++++++++++++++++ 1 file changed, 274 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb index 7269077ce505..2ebe5708b4bc 100644 --- a/Documentation/ABI/testing/sysfs-bus-usb +++ b/Documentation/ABI/testing/sysfs-bus-usb @@ -288,3 +288,277 @@ Description: USB 3.2 adds Dual-lane support, 2 rx and 2 tx -lanes over Type-C. Inter-Chip SSIC devices support asymmetric lanes up to 4 lanes per direction. Devices before USB 3.2 are single lane (tx_lanes = 1) + +What: /sys/bus/usb/devices/usbX/bAlternateSetting +Description: + The current interface alternate setting number, in decimal. + + See USB specs for its meaning. + +What: /sys/bus/usb/devices/usbX/bcdDevice +Description: + The device's release number, in hexadecimal. + + See USB specs for its meaning. + +What: /sys/bus/usb/devices/usbX/bConfigurationValue +Description: + While a USB device typically have just one configuration + setting, some devices support multiple configurations. + + This value shows the current configuration, in decimal. + + Changing its value will change the device's configuration + to another setting. + + The number of configurations supported by a device is at: + + /sys/bus/usb/devices/usbX/bNumConfigurations + + See USB specs for its meaning. + +What: /sys/bus/usb/devices/usbX/bDeviceClass +Description: + Class code of the device, in hexadecimal. + + See USB specs for its meaning. + +What: /sys/bus/usb/devices/usbX/bDeviceProtocol +Description: + Protocol code of the device, in hexadecimal. + + See USB specs for its meaning. + +What: /sys/bus/usb/devices/usbX/bDeviceSubClass +Description: + Subclass code of the device, in hexadecimal. + + See USB specs for its meaning. + +What: /sys/bus/usb/devices/usbX/bInterfaceClass +Description: + Class code of the interface, in hexadecimal. + + See USB specs for its meaning. + +What: /sys/bus/usb/devices/usbX/bInterfaceNumber +Description: + Interface number, in hexadecimal. + + See USB specs for its meaning. + +What: /sys/bus/usb/devices/usbX/bInterfaceProtocol +Description: + Protocol code of the interface, in hexadecimal. + + See USB specs for its meaning. + +What: /sys/bus/usb/devices/usbX/bInterfaceSubClass +Description: + Subclass code of the interface, in hexadecimal. + + See USB specs for its meaning. + +What: /sys/bus/usb/devices/usbX/bmAttributes +Description: + Attributes of the current configuration, in hexadecimal. + + See USB specs for its meaning. + +What: /sys/bus/usb/devices/usbX/bMaxPacketSize0 +Description: + Maximum endpoint 0 packet size, in decimal. + + See USB specs for its meaning. + +What: /sys/bus/usb/devices/usbX/bMaxPower +Description: + Maximum power consumption of the active configuration of + the device, in miliamperes. + +What: /sys/bus/usb/devices/usbX/bNumConfigurations +Description: + Number of the possible configurations of the device, in + decimal. The current configuration is controlled via: + + /sys/bus/usb/devices/usbX/bConfigurationValue + + See USB specs for its meaning. + +What: /sys/bus/usb/devices/usbX/bNumEndpoints +Description: + Number of endpoints used on this interface, in hexadecimal. + + See USB specs for its meaning. + +What: /sys/bus/usb/devices/usbX/bNumInterfaces +Description: + Number of interfaces on this device, in decimal. + +What: /sys/bus/usb/devices/usbX/busnum +Description: + Number of the bus. + +What: /sys/bus/usb/devices/usbX/configuration +Description: + Contents of the string descriptor associated with the + current configuration. It may include the firmware version + of a device and/or its serial number. + +What: /sys/bus/usb/devices/usbX/descriptors +Description: + Contains the interface descriptors, in binary. + +What: /sys/bus/usb/devices/usbX/idProduct +Description: + Product ID, in hexadecimal. + +What: /sys/bus/usb/devices/usbX/idVendor +Description: + Vendor ID, in hexadecimal. + +What: /sys/bus/usb/devices/usbX/devspec +Description: + Displays the Device Tree Open Firmware node of the interface. + +What: /sys/bus/usb/devices/usbX/avoid_reset_quirk +Description: + Most devices have this set to zero. + + If the value is 1, enable a USB quirk that prevents this + device to use reset. + + (read/write) + +What: /sys/bus/usb/devices/usbX/devnum +Description: + USB interface device number, in decimal. + +What: /sys/bus/usb/devices/usbX/devpath +Description: + String containing the USB interface device path. + +What: /sys/bus/usb/devices/usbX/manufacturer +Description: + Vendor specific string containing the name of the + manufacturer of the device. + +What: /sys/bus/usb/devices/usbX/maxchild +Description: + Number of ports of an USB hub + +What: /sys/bus/usb/devices/usbX/persist +Description: + Keeps the device even if it gets disconnected. + +What: /sys/bus/usb/devices/usbX/product +Description: + Vendor specific string containing the name of the + device's product. + +What: /sys/bus/usb/devices/usbX/speed +Description: + Shows the device's max speed, according to the USB version, + in Mbps. + Can be: + + ======= ==================== + Unknown speed unknown + 1.5 Low speed + 15 Full speed + 480 High Speed + 5000 Super Speed + 10000 Super Speed+ + 20000 Super Speed+ Gen 2x2 + ======= ==================== + +What: /sys/bus/usb/devices/usbX/supports_autosuspend +Description: + Returns 1 if the device doesn't support autosuspend. + Otherwise, returns 0. + +What: /sys/bus/usb/devices/usbX/urbnum +Description: + Number of URBs submitted for the whole device. + +What: /sys/bus/usb/devices/usbX/version +Description: + String containing the USB device version, as encoded + at the BCD descriptor. + +What: /sys/bus/usb/devices/usbX/power/autosuspend +Description: + Time in milliseconds for the device to autosuspend. If the + value is negative, then autosuspend is prevented. + + (read/write) + +What: /sys/bus/usb/devices/usbX/power/active_duration +Description: + The total time the device has not been suspended. + +What: /sys/bus/usb/devices/usbX/power/connected_duration +Description: + The total time (in msec) that the device has been connected. + +What: /sys/bus/usb/devices/usbX/power/level +Description: + +What: /sys/bus/usb/devices/usbX/ep_/bEndpointAddress +Description: + The address of the endpoint described by this descriptor, + in hexadecimal. The endpoint direction on this bitmapped field + is also shown at: + + /sys/bus/usb/devices/usbX/ep_/direction + + See USB specs for its meaning. + +What: /sys/bus/usb/devices/usbX/ep_/bInterval +Description: + The interval of the endpoint as described on its descriptor, + in hexadecimal. The actual interval depends on the version + of the USB. Also shown in time units at + /sys/bus/usb/devices/usbX/ep_/interval. + +What: /sys/bus/usb/devices/usbX/ep_/bLength +Description: + Number of bytes of the endpoint descriptor, in hexadecimal. + +What: /sys/bus/usb/devices/usbX/ep_/bmAttributes +Description: + Attributes which apply to the endpoint as described on its + descriptor, in hexadecimal. The endpoint type on this + bitmapped field is also shown at: + + /sys/bus/usb/devices/usbX/ep_/type + + See USB specs for its meaning. + +What: /sys/bus/usb/devices/usbX/ep_/direction +Description: + Direction of the endpoint. Can be: + + - both (on control endpoints) + - in + - out + +What: /sys/bus/usb/devices/usbX/ep_/interval +Description: + Interval for polling endpoint for data transfers, in + milisseconds or microseconds. + +What: /sys/bus/usb/devices/usbX/ep_/type +Description: + Descriptor type. Can be: + + - Control + - Isoc + - Bulk + - Interrupt + - unknown + +What: /sys/bus/usb/devices/usbX/ep_/wMaxPacketSize +Description: + Maximum packet size this endpoint is capable of + sending or receiving, in hexadecimal. -- 2.31.1