@@ -822,3 +822,23 @@ Description:
Each entry is a link to the device which registered the extension.
Access: Read
+
+What: /sys/class/power_supply/<supply_name>/usbif_vendor_id
+Date: March 2025
+Contact: linux-pm@vger.kernel.org
+Description:
+ Reports the vendor id assigned to the battery manufacturer by USB
+ Implementers Forum (USB-IF).
+
+ Access: Read
+ Valid values: 0x0-0xffff
+
+What: /sys/class/power_supply/<supply_name>/usbif_product_id
+Date: March 2025
+Contact: linux-pm@vger.kernel.org
+Description:
+ Reports the product id assigned to the battery by the manufacturer
+ (associated with usbif_vendor_id).
+
+ Access: Read
+ Valid values: 0x0-0xffff
@@ -213,6 +213,17 @@ TIME_TO_FULL
seconds left for battery to be considered full
(i.e. while battery is charging)
+USBIF_VENDOR_ID
+ Vendor ID (VID) assigned to manufacturer or device vendor associated with the
+ battery by USB Implementers Forum (USB-IF). This property is described in
+ "USB Power Delivery Specification Rev3.1 V1.8" Chapter 6.5.5 Battery
+ Capabilities, Section 6.5.5.1 Vendor ID (VID).
+USBIF_PRODUCT_ID
+ Product ID (PID) assigned to the battery, such that if the VID belongs to the
+ manufacturer then the PID will be designated by it. Similarly if the VID
+ belongs to the device vendor then the PID will be designated by it. This
+ property is described in "USB Power Delivery Specification Rev3.1 V1.8"
+ Chapter 6.5.5 Battery Capabilities, Section 6.5.5.2 Product ID (PID).
Battery <-> external power supply interaction
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -211,6 +211,8 @@ static struct power_supply_attr power_supply_attrs[] __ro_after_init = {
POWER_SUPPLY_ATTR(TIME_TO_EMPTY_AVG),
POWER_SUPPLY_ATTR(TIME_TO_FULL_NOW),
POWER_SUPPLY_ATTR(TIME_TO_FULL_AVG),
+ POWER_SUPPLY_ATTR(USBIF_VENDOR_ID),
+ POWER_SUPPLY_ATTR(USBIF_PRODUCT_ID),
POWER_SUPPLY_ENUM_ATTR(TYPE),
POWER_SUPPLY_ENUM_ATTR(USB_TYPE),
POWER_SUPPLY_ENUM_ATTR(SCOPE),
@@ -165,6 +165,8 @@ enum power_supply_property {
POWER_SUPPLY_PROP_TIME_TO_EMPTY_AVG,
POWER_SUPPLY_PROP_TIME_TO_FULL_NOW,
POWER_SUPPLY_PROP_TIME_TO_FULL_AVG,
+ POWER_SUPPLY_PROP_USBIF_VENDOR_ID,
+ POWER_SUPPLY_PROP_USBIF_PRODUCT_ID,
POWER_SUPPLY_PROP_TYPE, /* use power_supply.type instead */
POWER_SUPPLY_PROP_USB_TYPE,
POWER_SUPPLY_PROP_SCOPE,