Commit Graph

8 Commits

Author SHA1 Message Date
Yongsheng Yang 5e28d5e4b8 Documentation/hwmon: Fix description of devm_hwmon_device_unregister()
Use devm_hwmon_device_register_with_info to replace
hwmon_device_register_with_info in description of
devm_hwmon_device_unregister.

Signed-off-by: Yongsheng Yang <iyysheng@gmail.com>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Link: https://lore.kernel.org/r/20230609075510.1305-1-iyysheng@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-10 07:38:22 -07:00
Guenter Roeck aededf875a Documentation/hwmon: Remove description of deprecated registration functions
Remove description of deprecated registration functions from the hardware
monitoring kernel API documentation to help ensure that no attempts are
made to use them in new drivers.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:33 -07:00
Krzysztof Kozlowski d8cc9415a4 hwmon: constify pointers to hwmon_channel_info
HWmon core receives an array of pointers to hwmon_channel_info and it
does not modify it, thus it can be array of const pointers for safety.
This allows drivers to make them also const.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-07 08:45:17 -07:00
Randy Dunlap 12087a365f Documentation: hwmon: correct spelling
Correct spelling problems for Documentation/hwmon/ as reported
by codespell.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org
Link: https://lore.kernel.org/r/20230129231053.20863-4-rdunlap@infradead.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:11 -08:00
Joaquín Ignacio Aramendía 95a56de6ed docs: hwmon: Use file modes explicitly
As stated in the mainling list[1] and by checkpatch output, the file modes
for is_visible_func should be returned explicitly. Change that in the
documentation to avoid confusion.

[1]https://lore.kernel.org/linux-hwmon/506a6e7f-4566-2dcf-37f3-0f41f4ce983b@roeck-us.net/

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
Link: https://lore.kernel.org/r/20221212141245.52935-1-samsagax@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Guenter Roeck ddaefa209c hwmon: Make chip parameter for with_info API mandatory
Various attempts were made recently to "convert" the old
hwmon_device_register() API to devm_hwmon_device_register_with_info()
by just changing the function name without actually converting the
driver. Prevent this from happening by making the 'chip' parameter of
devm_hwmon_device_register_with_info() mandatory.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-05-22 11:32:31 -07:00
Michael Walle 1ad6c3b7ef hwmon: introduce hwmon_sanitize_name()
More and more drivers will check for bad characters in the hwmon name
and all are using the same code snippet. Consolidate that code by adding
a new hwmon_sanitize_name() function.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20220405092452.4033674-2-michael@walle.cc
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-05-17 05:52:59 -07:00
Mauro Carvalho Chehab 7ebd8b66dd docs: hwmon: Add an index file and rename docs to *.rst
Now that all files were converted to ReST format, rename them
and add an index.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-04-17 10:37:23 -07:00