lkml.org 
[lkml]   [2026]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v6 2/3] platform: arm64: lenovo-thinkpad-t14s-ec: Add hwmon support for temperatures
From
On 7/8/26 08:30, Krzysztof Kozlowski wrote:
> On Tue, Jul 07, 2026 at 09:22:27PM +0200, Daniel Lezcano wrote:
>> +static const struct hwmon_ops t14s_ec_hwmon_ops = {
>> + .is_visible = t14s_ec_hwmon_is_visible,
>> + .read = t14s_ec_hwmon_read,
>> + .read_string = t14s_ec_hwmon_read_string,
>> +};
>> +
>> +static const struct hwmon_channel_info *t14s_ec_hwmon_info[] = {
>> + HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ),
>> + HWMON_CHANNEL_INFO(temp,
>> + HWMON_T_INPUT | HWMON_T_LABEL,
>> + HWMON_T_INPUT | HWMON_T_LABEL,
>> + HWMON_T_INPUT | HWMON_T_LABEL,
>> + HWMON_T_INPUT | HWMON_T_LABEL,
>> + HWMON_T_INPUT | HWMON_T_LABEL,
>> + HWMON_T_INPUT | HWMON_T_LABEL),
>> + NULL
>> +};
>> +
>> +static const struct hwmon_chip_info t14s_ec_chip_info = {
>> + .ops = &t14s_ec_hwmon_ops,
>> + .info = t14s_ec_hwmon_info,
>> +};
>> +
>> +static int t14s_ec_hwmon_probe(struct t14s_ec *ec)
>> +{
>> + struct device *dev;
>> + struct t14s_ec_hwmon_sys_thermx sys_thermx[] = {
>> + { .label = "soc", .reg = T14S_EC_SYS_THERM0 },
>> + { .label = "keyboard", .reg = T14S_EC_SYS_THERM1 },
>> + { .label = "base", .reg = T14S_EC_SYS_THERM2 },
>> + { .label = "charging", .reg = T14S_EC_SYS_THERM3 },
>> + { .label = "qtm", .reg = T14S_EC_SYS_THERM6 },
>> + { .label = "ssd", .reg = T14S_EC_SYS_THERM7 },
>> + };
>> +
>> + ec->ec_hwmon.sys_thermx = devm_kmemdup_array(ec->dev, sys_thermx,
>> + ARRAY_SIZE(sys_thermx),
>> + sizeof(sys_thermx[0]), GFP_KERNEL);
>> + if (!ec->ec_hwmon.sys_thermx)
>> + return -ENOMEM;
>> +
>> + dev = devm_hwmon_device_register_with_info(ec->dev, "t14s_ec", ec,
>> + &t14s_ec_chip_info, NULL);
>
> Last time I commented this looks like actual ABI break. You did not respond to
> that, so I assume my finding was right, thus:
> 1. binding is not correct (although driver should be fixed, not binding)
> 2. the code still breaks users

Sorry I misunderstood it was a question expecting an answer but an
affirmation.

By ABI break do you mean:

* new driver with old DT will fail ?
* new DT with old driver will break ?

* If no thermal-cells is specified, new code will fail with -EINVAL
-> is that one a problem ?

* If thermal-cells is specified, but no thermal zone, new code does not fail

* If thermal-cells is specified, old code does not fail

* If thermal-cells is not specified, but a thermal zone is specified,
schema is not respected

Can you clarify ?

Thanks




\
 
 \ /
  Last update: 2026-07-08 09:40    [W:0.084 / U:3.398 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog