diff options
author | codeworkx <daniel.hillenbrand@codeworkx.de> | 2012-06-02 13:09:29 +0200 |
---|---|---|
committer | codeworkx <daniel.hillenbrand@codeworkx.de> | 2012-06-02 13:09:29 +0200 |
commit | c6da2cfeb05178a11c6d062a06f8078150ee492f (patch) | |
tree | f3b4021d252c52d6463a9b3c1bb7245e399b009c /include/linux/hwmon.h | |
parent | c6d7c4dbff353eac7919342ae6b3299a378160a6 (diff) | |
download | kernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.zip kernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.tar.gz kernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.tar.bz2 |
samsung update 1
Diffstat (limited to 'include/linux/hwmon.h')
-rw-r--r-- | include/linux/hwmon.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/linux/hwmon.h b/include/linux/hwmon.h index 6b6ee70..2244580 100644 --- a/include/linux/hwmon.h +++ b/include/linux/hwmon.h @@ -20,6 +20,40 @@ struct device *hwmon_device_register(struct device *dev); void hwmon_device_unregister(struct device *dev); +struct hwmon_property; + +/* + * Register property: add the sysfs entry for the hwmon framework + * so that the hwmon property can be accessed with + * hwmon_get_value()/hwmon_set_value(). + * Unregister property: the reverse. + * + * Note that register/unregister property functions do not touch + * sysfs itself. The user should call sysfs_create/update/merge/... + * themselves. + */ +extern struct hwmon_property *hwmon_register_property(struct device *hwmon, + const struct device_attribute *attr); +extern int hwmon_unregister_property(struct device *hwmon, + struct hwmon_property *); +extern int hwmon_register_properties(struct device *hwmon, + const struct attribute_group *attrs); +extern int hwmon_unregister_properties(struct device *hwmon, + const struct attribute_group *attrs); + +/* Note that hwmon_device_unregister does the same anyway */ +extern void hwmon_unregister_all_properties(struct device *hwmon); + +extern struct device *hwmon_find_device(struct device *dev); +extern struct device *hwmon_find_device_name(char *devname); + +extern struct hwmon_property *hwmon_get_property(struct device *hwmon, + const char *name); +extern int hwmon_get_value(struct device *hwmon, struct hwmon_property * prop, + int *value); +extern int hwmon_set_value(struct device *hwmon, struct hwmon_property * prop, + int value); + /* Scale user input to sensible values */ static inline int SENSORS_LIMIT(long value, long low, long high) { |