mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Huisong Li <lihuisong@huawei.com>, jdelvare@suse.com
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
	zhanjie9@hisilicon.com, zhenglifeng1@huawei.com,
	liuyonglong@huawei.com
Subject: Re: [RFC] hwmon: (acpi_power_meter) Replace hwmon_device_register
Date: Tue, 25 Feb 2025 05:01:04 -0800	[thread overview]
Message-ID: <8b59c8d0-4710-48ab-ad70-b2eddc74fa9e@roeck-us.net> (raw)
In-Reply-To: <20250225085158.6989-1-lihuisong@huawei.com>

On 2/25/25 00:51, Huisong Li wrote:
> When load this mode, we can see the following log:
> "power_meter ACPI000D:00: hwmon_device_register() is deprecated. Please
>   convert the driver to use hwmon_device_register_with_info()."
> 
> So replace hwmon_device_register with hwmon_device_register_with_info.
> 
> To avoid any changes in the display of some sysfs interfaces, some of
> necessary changes in hwmon.c must be made:
> 1> For 'power1_average_interval_max/min' interface, insert 'average' to the
>     string corresponding to hwmon_power_average_interval_max/max in
>     hwmon_power_attr_templates[]. I guess that is what's missing.
> 2> Add some string attributes in power sensor type because of below items:
>     a) power1_accuracy  --> display like '90.0%'
>     b) power1_cap_hyst  --> display 'unknown' when its value is 0xFFFFFFFF
>     c) power1_average_min/max --> display 'unknown' when its value is
>                                   negative.
> Note: All the attributes modified above in hwmon core are not used by other
> drivers.
> 

That is not a reason to change the ABI, much less so hiding the change
in a driver patch.

Guenter


  reply	other threads:[~2025-02-25 13:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-25  8:51 Huisong Li
2025-02-25 13:01 ` Guenter Roeck [this message]
2025-02-26 10:19   ` lihuisong (C)
2025-02-26 13:26     ` Guenter Roeck
2025-02-27  8:21       ` lihuisong (C)
2025-02-27 12:31         ` Guenter Roeck
2025-02-28  8:26           ` lihuisong (C)
2025-02-28 14:47             ` Guenter Roeck
2025-03-02  7:43               ` lihuisong (C)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8b59c8d0-4710-48ab-ad70-b2eddc74fa9e@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=jdelvare@suse.com \
    --cc=lihuisong@huawei.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuyonglong@huawei.com \
    --cc=zhanjie9@hisilicon.com \
    --cc=zhenglifeng1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®