aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/hwmon.h
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2016-11-20 02:55:45 -0800
committerGuenter Roeck <linux@roeck-us.net>2016-12-09 21:54:15 -0800
commitf680b2845694a197e7bfc9f56b241f9a3f17296e (patch)
treeef625db1d1254b5e8d6e5ff528d2915a69fbdf9c /include/linux/hwmon.h
parenthwmon: (lm90) Mention support for TI TMP451 in Kconfig description (diff)
downloadwireguard-linux-f680b2845694a197e7bfc9f56b241f9a3f17296e.tar.xz
wireguard-linux-f680b2845694a197e7bfc9f56b241f9a3f17296e.zip
hwmon: (core) Clarify when read and write callbacks are mandatory
The callback descrption in hwmon.h was misleading and stated that read and write callbacks would be optional. More accurate is is that the callbacks are mandatory if readable / writeable attributes are present. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'include/linux/hwmon.h')
-rw-r--r--include/linux/hwmon.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/hwmon.h b/include/linux/hwmon.h
index 9d2f8bde7d12..b6a86aa4a9e2 100644
--- a/include/linux/hwmon.h
+++ b/include/linux/hwmon.h
@@ -298,8 +298,7 @@ enum hwmon_pwm_attributes {
* Channel number
* The function returns the file permissions.
* If the return value is 0, no attribute will be created.
- * @read: Read callback. Optional. If not provided, attributes
- * will not be readable.
+ * @read: Read callback. Mandatory if readable attributes are present.
* Parameters are:
* @dev: Pointer to hardware monitoring device
* @type: Sensor type
@@ -308,8 +307,7 @@ enum hwmon_pwm_attributes {
* Channel number
* @val: Pointer to returned value
* The function returns 0 on success or a negative error number.
- * @write: Write callback. Optional. If not provided, attributes
- * will not be writable.
+ * @write: Write callback. Mandatory if writeable attributes are present.
* Parameters are:
* @dev: Pointer to hardware monitoring device
* @type: Sensor type