Go to the documentation of this file.
20 #ifndef _LINUX_HWMON_SYSFS_H
21 #define _LINUX_HWMON_SYSFS_H
23 #include <linux/device.h>
29 #define to_sensor_dev_attr(_dev_attr) \
30 container_of(_dev_attr, struct sensor_device_attribute, dev_attr)
32 #define SENSOR_ATTR(_name, _mode, _show, _store, _index) \
33 { .dev_attr = __ATTR(_name, _mode, _show, _store), \
36 #define SENSOR_DEVICE_ATTR(_name, _mode, _show, _store, _index) \
37 struct sensor_device_attribute sensor_dev_attr_##_name \
38 = SENSOR_ATTR(_name, _mode, _show, _store, _index)
45 #define to_sensor_dev_attr_2(_dev_attr) \
46 container_of(_dev_attr, struct sensor_device_attribute_2, dev_attr)
48 #define SENSOR_ATTR_2(_name, _mode, _show, _store, _nr, _index) \
49 { .dev_attr = __ATTR(_name, _mode, _show, _store), \
53 #define SENSOR_DEVICE_ATTR_2(_name,_mode,_show,_store,_nr,_index) \
54 struct sensor_device_attribute_2 sensor_dev_attr_##_name \
55 = SENSOR_ATTR_2(_name, _mode, _show, _store, _nr, _index)