[PATCH v3 0/5] replace hwmon_device_register for hwmon_device_register_with_info

Oscar Salvador osalvador.vilardaga at gmail.com
Fri Apr 21 16:57:40 UTC 2017


Hi, this is version v3 with some fix-ups:

Versions:

v1 -> v2: 
	* Keep temp attrs as read only
v2 -> v3: 
	* Code fix-ups: struct and string as const and add return within switch
	due to fallthrough 
	* Add Signed-off-by to all commits

This patchseries replaces the deprecated hwmon_device_register function with the
new one hwmon_device_register_with_info.
It also does some cleanup.

Here is the list of patches and what they do:

1/ Adds config structures for all sensors and their possible settings. This patch
   and the next one are just preparing the code for what it comes.

2/ Now everything goes through nouveua_hwmon_ops. There we set up wich functions will
   be called for read/write and for checking if an attribute should be created or not.
   In this patch we just add .is_visible/.read_string operations.
   Here we sill don't interactuate with the old code.

3/ Most of the work is being done here. We remove the old code and replace it with
   the new one related to the new api.
   Here we introduce the .write and .read operations, and create all functions
   regarding these operations.

4/ We add support for special attributes like *_auto_point*.

5/ Cleanup: Change permissions to numeric and add me to the author

Oscar Salvador (5):
  nouveau_hwmon: Add config for all sensors and their settings
  nouveau_hwmon: Add nouveau_hwmon_ops structure with
    .is_visible/.read_string
  nouveau_hwmon: Remove old code, add .write/.read operations
  nouveau_hwmon: Add support for auto_point attributes
  nouveau_hwmon: Change permissions to numeric

 drivers/gpu/drm/nouveau/nouveau_hwmon.c | 955 +++++++++++++++++---------------
 1 file changed, 501 insertions(+), 454 deletions(-)

-- 
2.1.4



More information about the dri-devel mailing list