All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] hwmon: (core) Clarify when read and write callbacks are mandatory
@ 2016-11-20 17:36 Guenter Roeck
  2016-11-20 17:36 ` [PATCH 2/7] hwmon: (core) Add support for string attributes to new API Guenter Roeck
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Guenter Roeck @ 2016-11-20 17:36 UTC (permalink / raw)
  To: Hardware Monitoring; +Cc: Jean Delvare, Guenter Roeck

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>
---
 include/linux/hwmon.h | 6 ++----
 1 file 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
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-11-20 17:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-20 17:36 [PATCH 1/7] hwmon: (core) Clarify when read and write callbacks are mandatory Guenter Roeck
2016-11-20 17:36 ` [PATCH 2/7] hwmon: (core) Add support for string attributes to new API Guenter Roeck
2016-11-20 17:36 ` [PATCH 3/7] hwmon: (core) Clarify use of chip attributes Guenter Roeck
2016-11-20 17:36 ` [PATCH 4/7] hwmon: (core) Deprecate hwmon_device_register() Guenter Roeck
2016-11-20 17:36 ` [PATCH 5/7] hwmon: (core) Make is_visible callback truly mandatory Guenter Roeck
2016-11-20 17:36 ` [PATCH 6/7] hwmon: (core) Explain why at least two attribute groups are allocated Guenter Roeck
2016-11-20 17:36 ` [PATCH 7/7] hwmon: (core) Rename groups parameter in API to extra_groups Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.