Skip to content

Commit

Permalink
hwmon: Update documentation to clarify rules for the 'name' attribute
Browse files Browse the repository at this point in the history
Clarify that the name attribute must report a valid name, and the rules
for valid names. Also clarify that the name parameter must be provided
for all supported API functions.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Guenter Roeck committed Jan 25, 2017
1 parent 8353863 commit f172841
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Documentation/hwmon/hwmon-kernel-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ the call to devm_hwmon_device_register_with_groups or
hwmon_device_register_with_info and if the automatic (device managed)
removal would be too late.

All supported hwmon device registration functions only accept valid device
names. Device names including invalid characters (whitespace, '*', or '-')
will be rejected. The 'name' parameter is mandatory.

Using devm_hwmon_device_register_with_info()
--------------------------------------------

Expand Down
5 changes: 3 additions & 2 deletions Documentation/hwmon/sysfs-interface
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ given driver if the chip has the feature.

name The chip name.
This should be a short, lowercase string, not containing
spaces nor dashes, representing the chip name. This is
the only mandatory attribute.
whitespace, dashes, or the wildcard character '*'.
This attribute represents the chip name. It is the only
mandatory attribute.
I2C devices get this attribute created automatically.
RO

Expand Down

0 comments on commit f172841

Please sign in to comment.