platform/x86: thinkpad_acpi: Add support to detect hardware damage detection capability.
PATCH v3 1/2 platform/x86: thinkpad_acpi: Add support to detect hardware damage detection capability.
Thinkpads are adding the ability to detect and report hardware damage status. Add new sysfs interface to identify whether hardware damage is detected or not.
Initial support is available for the USB-C replaceable connector.
---
Changes since v1:
-Split patch between hwdd_status and hwdd_detail -Incorporated review comments
Changes since v2:
-Control visibility of the sysfs attribute based upon ucdd_supported
--- .../admin-guide/laptops/thinkpad-acpi.rst | 21 ++++ drivers/platform/x86/lenovo/thinkpad_acpi.c | 106 ++++++++++++++++++ 2 files changed, 127 insertions(+)
Documentation/admin-guide/laptops/thinkpad-acpi.rst +21 -0
@@ -54,6 +54,7 @@ detailed description): - Setting keyboard language - WWAN Antenna type - Auxmac + - Hardware damage detection capability A compatibility table by model and feature is maintained on the web site, http://ibm-acpi.sf.net/. I appreciate any success or failure
@@ -1576,6 +1577,26 @@ percentage level, above which charging will stop. The exact semantics of the attributes may be found in Documentation/ABI/testing/sysfs-class-power. +Hardware damage detection capability +----------------- + +sysfs attributes: hwdd_status + +Thinkpads are adding the ability to detect and report hardware damage. +Add new sysfs interface to identify the damaged device status. +Initial support is available for the USB-C replaceable connector. + +The command to check device damaged status is:: + + cat /sys/devices/platform/thinkpad_acpi/hwdd_status + +This value displays status of device damaged +- 0 = Not Damaged +- 1 = Damaged + +The property is read-only. If feature is not supported then sysfs +attribute is not created. + Multiple Commands, Module Parameters ------------------------------------
drivers/platform/x86/lenovo/thinkpad_acpi.c +106 -0
124 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH v3 2/2 platform/x86: thinkpad_acpi: Add sysfs to display details of damaged device.
Add new sysfs interface to identify the impacted component with location of device.
---
Changes since v2:
-Control visibility of the sysfs attribute based upon ucdd_supported
--- .../admin-guide/laptops/thinkpad-acpi.rst | 13 +- drivers/platform/x86/lenovo/thinkpad_acpi.c | 114 +++++++++++++++++- 2 files changed, 122 insertions(+), 5 deletions(-)
Documentation/admin-guide/laptops/thinkpad-acpi.rst +12 -1
@@ -1580,7 +1580,7 @@ Documentation/ABI/testing/sysfs-class-power. Hardware damage detection capability ----------------- -sysfs attributes: hwdd_status +sysfs attributes: hwdd_status, hwdd_detail Thinkpads are adding the ability to detect and report hardware damage. Add new sysfs interface to identify the damaged device status.
@@ -1594,6 +1594,17 @@ This value displays status of device damaged - 0 = Not Damaged - 1 = Damaged +The command to check location of damaged device is:: + + cat /sys/devices/platform/thinkpad_acpi/hwdd_detail + +This value displays location of damaged device having 1 line per damaged "item". +For example: +if no damage is detected: + No damage detected +if damage detected: + TYPE-C: Base, Right side, Center port + The property is read-only. If feature is not supported then sysfs attribute is not created.
drivers/platform/x86/lenovo/thinkpad_acpi.c +110 -4
138 lines not on this page · raw message
Signature · 1 line
2.43.0