[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5f295577-ab67-4164-a718-f6fbc8911e67@gmail.com>
Date: Wed, 3 Dec 2025 19:18:54 +0900
From: Nitin <nitjoshi@...il.com>
To: Hans de Goede <hansg@...nel.org>, ilpo.jarvinen@...ux.intel.com
Cc: platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
njoshi1@...ovo.com, Mark Pearson <mpearson-lenovo@...ebb.ca>
Subject: Re: [PATCH] platform/x86: thinkpad_acpi: Add support to detect
hardware damage detection capability.
Hi Hans,
Thank you for reviewing this patch.
On 12/3/25 16:52, Hans de Goede wrote:
> Hi,
>
> Interesting new feature. A few small remarks on the proposed
> sysfs API below.
>
> On 3-Dec-25 4:40 AM, Nitin Joshi wrote:
>> Thinkpads are adding the ability to detect and report hardware damage
>> status. Add new sysfs interface to identify the impacted component
>> with status.
>> Initial support is available for the USB-C replaceable connector.
>>
>> Reviewed-by: Mark Pearson <mpearson-lenovo@...ebb.ca>
>> Signed-off-by: Nitin Joshi<nitjoshi@...il.com>
>> ---
>> .../admin-guide/laptops/thinkpad-acpi.rst | 26 +++
>> drivers/platform/x86/lenovo/thinkpad_acpi.c | 179 ++++++++++++++++++
>> 2 files changed, 205 insertions(+)
>>
>> diff --git a/Documentation/admin-guide/laptops/thinkpad-acpi.rst b/Documentation/admin-guide/laptops/thinkpad-acpi.rst
>> index 4ab0fef7d440..4a3220529489 100644
>> --- a/Documentation/admin-guide/laptops/thinkpad-acpi.rst
>> +++ b/Documentation/admin-guide/laptops/thinkpad-acpi.rst
>> @@ -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,31 @@ 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 impacted component.
>> +Initial support is available for the USB-C replaceable connector.
>> +
>> +The available commands are::
>> +
>> + cat /sys/devices/platform/thinkpad_acpi/hwdd_status
>> +
>> +This value displays device type and location of device with damage status.
>> +For example:
>> +if no damage is detected:
>> + No damage detected
>> +if damage detected:
>> + Damage detected:
>> + Device: TYPE-C
>> + Location: Base, Right side, Center port
>> +
>> +The property is read-only. If feature is not supported then sysfs
>> +class is not created.
> Nitpick: s/class/attribute/ classes are standardized sysfs
> interfaces living under /sys/class/ which this is not.
Ack, I will modify it.
>
> Besides the nitpick I'm wondering if we do not want to make
> this a little bit more friendly / easy for software to parse ?
>
> ATM this seems focused on a human directly reading
> the output but what if we want some sort of automation,
> like e.g. a Linux version of the Lenovo Vantage sw parsing
> this in the future?
>
> Note I've no specific suggestions for how to make this
> easier to parse, this is just an observation.
Thank you for pointing this out. I am open for suggestions and will
re-check regarding its use case in lenovo vantage in future.
>
> Regards,
>
> Hans
>
>
Powered by blists - more mailing lists