Lines Matching refs:hattr

122 		struct hwmon_device_attribute *hattr = to_hwmon_attr(dattr);  in hwmon_free_attrs()  local
124 kfree(hattr); in hwmon_free_attrs()
426 struct hwmon_device_attribute *hattr = to_hwmon_attr(devattr); in hwmon_attr_show() local
430 ret = hattr->ops->read(dev, hattr->type, hattr->attr, hattr->index, in hwmon_attr_show()
435 trace_hwmon_attr_show(hattr->index + hwmon_attr_base(hattr->type), in hwmon_attr_show()
436 hattr->name, val); in hwmon_attr_show()
445 struct hwmon_device_attribute *hattr = to_hwmon_attr(devattr); in hwmon_attr_show_string() local
446 enum hwmon_sensor_types type = hattr->type; in hwmon_attr_show_string()
450 ret = hattr->ops->read_string(dev, hattr->type, hattr->attr, in hwmon_attr_show_string()
451 hattr->index, &s); in hwmon_attr_show_string()
455 trace_hwmon_attr_show_string(hattr->index + hwmon_attr_base(type), in hwmon_attr_show_string()
456 hattr->name, s); in hwmon_attr_show_string()
465 struct hwmon_device_attribute *hattr = to_hwmon_attr(devattr); in hwmon_attr_store() local
473 ret = hattr->ops->write(dev, hattr->type, hattr->attr, hattr->index, in hwmon_attr_store()
478 trace_hwmon_attr_store(hattr->index + hwmon_attr_base(hattr->type), in hwmon_attr_store()
479 hattr->name, val); in hwmon_attr_store()
502 struct hwmon_device_attribute *hattr; in hwmon_genattr() local
519 hattr = kzalloc(sizeof(*hattr), GFP_KERNEL); in hwmon_genattr()
520 if (!hattr) in hwmon_genattr()
526 scnprintf(hattr->name, sizeof(hattr->name), template, in hwmon_genattr()
528 name = hattr->name; in hwmon_genattr()
531 hattr->type = type; in hwmon_genattr()
532 hattr->attr = attr; in hwmon_genattr()
533 hattr->index = index; in hwmon_genattr()
534 hattr->ops = ops; in hwmon_genattr()
536 dattr = &hattr->dev_attr; in hwmon_genattr()