From: Alexander Sverdlin <alexander.sverdlin@gmail.com>
To: Peter Huewe <PeterHuewe@gmx.de>, Guenter Roeck <linux@roeck-us.net>
Cc: Jean Delvare <jdelvare@suse.com>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [1/5] w83627ehf: Use hwmon_device_register_with_info and sensor groups
Date: Wed, 17 May 2017 21:34:55 +0200 [thread overview]
Message-ID: <727d1d2f-6b2c-893e-7e4c-f93f83cce160@gmail.com> (raw)
In-Reply-To: <20170323130308.29166-1-peterhuewe@gmx.de>
Hello Peter!
On 23/03/17 14:03, Peter Huewe wrote:
> This patch replaces the old, deprecated call to hwmon_device_register
> with the new hwmon_device_register_with_info and converts the whole
> driver to the new hwmon interface using the hwmon_chip_info methods
> and the attribute_group method.
>
> All standard attributes were converted to the corresponding
> hwmon_chip_info methods.
> For some functions a hwmon channel to device channel conversion had to
> be performed, e.g. hwmon_in_alarm has the info for alert_5 in channel 8.
>
> All non-standard attributes are converted to the attribute_group method,
> by
> - adding them statically to the attribute_group if they are available
> for all variants of devices supported by this driver
> - adding them at probe time to the attribute_group if the availability
> is depending on the actual chip type.
> The appropriate count of entries was reserved.
>
> As a pre-condition a reference to the sio_data structure was moved into
> w83627ehf_data for easier retrieval of the information, since this is
> much easier than trying to access the platform_data.
>
> The driver is now much more "checkpatch clean" than it used to be, but
> still not completely.
> The conversion saves about 20k in the resulting .ko
>
> Tested with a NCT6776F chip.
>
> v2:
> - converted to proper is_visible methods
> - applied minor feedback of v1
>
> Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
I've applied the whole series (5 of 5 patches) on top of hwmon-next
and tested on Intel D525MW, where the module finds "W83627DHG-P chip at 0x290".
The values of all the inputs are exactly the same as back in Linux v4.7.x
(when the used HWMON API wasn't deprecated).
Therefore, feel free to add
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
to the whole series when you re-spin.
Thanks for fixing this!
> ---
> drivers/hwmon/w83627ehf.c | 1536 +++++++++++++++++++++++----------------------
> 1 file changed, 778 insertions(+), 758 deletions(-)
--
Alexander.
next prev parent reply other threads:[~2017-05-17 19:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-23 13:03 [PATCH 1/5] " Peter Huewe
2017-03-23 13:03 ` [PATCH 2/5] w83627ehf: Use octal values for access rights of sysfs files Peter Huewe
2017-03-23 13:03 ` [PATCH 3/5] w83627ehf: Minor readability fixes Peter Huewe
2017-03-23 13:03 ` [PATCH 4/5] w83627ehf: Drop FSFE template and replace with SPDX License information Peter Huewe
2017-03-23 13:03 ` [PATCH 5/5] w83627ehf: Drop support for nct6775/nct6776 Peter Huewe
2017-03-23 13:05 ` [PATCH 1/5] w83627ehf: Use hwmon_device_register_with_info and sensor groups Peter Hüwe
2017-03-23 13:11 ` Guenter Roeck
2017-03-23 18:43 ` Guenter Roeck
2017-03-23 18:55 ` Peter Huewe
2017-03-23 19:07 ` Guenter Roeck
2017-05-17 19:34 ` Alexander Sverdlin [this message]
2017-05-17 19:35 ` [1/5] " Alexander Sverdlin
2017-05-17 20:35 ` Peter Huewe
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=727d1d2f-6b2c-893e-7e4c-f93f83cce160@gmail.com \
--to=alexander.sverdlin@gmail.com \
--cc=PeterHuewe@gmx.de \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
/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®