Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1643595 > unrolled thread
| Started by | Alexander Sverdlin <alexander.sverdlin@gmail.com> |
|---|---|
| First post | 2017-05-17 21:40 +0200 |
| Last post | 2017-05-17 22:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [1/5] w83627ehf: Use hwmon_device_register_with_info and sensor groups Alexander Sverdlin <alexander.sverdlin@gmail.com> - 2017-05-17 21:40 +0200
Re: [1/5] w83627ehf: Use hwmon_device_register_with_info and sensor groups Peter Huewe <peterhuewe@gmx.de> - 2017-05-17 22:40 +0200
| From | Alexander Sverdlin <alexander.sverdlin@gmail.com> |
|---|---|
| Date | 2017-05-17 21:40 +0200 |
| Subject | Re: [1/5] w83627ehf: Use hwmon_device_register_with_info and sensor groups |
| Message-ID | <tIcXE-7g7-17@gated-at.bofh.it> |
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.
[toc] | [next] | [standalone]
| From | Peter Huewe <peterhuewe@gmx.de> |
|---|---|
| Date | 2017-05-17 22:40 +0200 |
| Subject | Re: [1/5] w83627ehf: Use hwmon_device_register_with_info and sensor groups |
| Message-ID | <tIdTH-7QG-3@gated-at.bofh.it> |
| In reply to | #1643595 |
Am 17. Mai 2017 21:35:52 MESZ schrieb Alexander Sverdlin <alexander.sverdlin@gmail.com>: >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! Thanks for testing! I will respin as soon as I find time. Thanks Peter > >> --- >> drivers/hwmon/w83627ehf.c | 1536 >+++++++++++++++++++++++---------------------- >> 1 file changed, 778 insertions(+), 758 deletions(-) > >-- >Alexander. -- Sent from my mobile
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web