Lines Matching refs:hattr

184 	struct hwmon_device_attribute *hattr = to_hwmon_attr(devattr);  in hwmon_attr_show()  local
188 ret = hattr->ops->read(dev, hattr->type, hattr->attr, hattr->index, in hwmon_attr_show()
193 trace_hwmon_attr_show(hattr->index + hwmon_attr_base(hattr->type), in hwmon_attr_show()
194 hattr->name, val); in hwmon_attr_show()
203 struct hwmon_device_attribute *hattr = to_hwmon_attr(devattr); in hwmon_attr_show_string() local
204 enum hwmon_sensor_types type = hattr->type; in hwmon_attr_show_string()
208 ret = hattr->ops->read_string(dev, hattr->type, hattr->attr, in hwmon_attr_show_string()
209 hattr->index, &s); in hwmon_attr_show_string()
213 trace_hwmon_attr_show_string(hattr->index + hwmon_attr_base(type), in hwmon_attr_show_string()
214 hattr->name, s); in hwmon_attr_show_string()
223 struct hwmon_device_attribute *hattr = to_hwmon_attr(devattr); in hwmon_attr_store() local
231 ret = hattr->ops->write(dev, hattr->type, hattr->attr, hattr->index, in hwmon_attr_store()
236 trace_hwmon_attr_store(hattr->index + hwmon_attr_base(hattr->type), in hwmon_attr_store()
237 hattr->name, val); in hwmon_attr_store()
261 struct hwmon_device_attribute *hattr; in hwmon_genattr() local
282 hattr = devm_kzalloc(dev, sizeof(*hattr), GFP_KERNEL); in hwmon_genattr()
283 if (!hattr) in hwmon_genattr()
289 scnprintf(hattr->name, sizeof(hattr->name), template, in hwmon_genattr()
291 name = hattr->name; in hwmon_genattr()
294 hattr->type = type; in hwmon_genattr()
295 hattr->attr = attr; in hwmon_genattr()
296 hattr->index = index; in hwmon_genattr()
297 hattr->ops = ops; in hwmon_genattr()
299 dattr = &hattr->dev_attr; in hwmon_genattr()