Lines Matching refs:attr

22 static ssize_t soc_info_show(struct device *dev, struct device_attribute *attr,
27 struct soc_device_attribute *attr; member
48 struct attribute *attr, in soc_attribute_mode() argument
54 if ((attr == &dev_attr_machine.attr) && soc_dev->attr->machine) in soc_attribute_mode()
55 return attr->mode; in soc_attribute_mode()
56 if ((attr == &dev_attr_family.attr) && soc_dev->attr->family) in soc_attribute_mode()
57 return attr->mode; in soc_attribute_mode()
58 if ((attr == &dev_attr_revision.attr) && soc_dev->attr->revision) in soc_attribute_mode()
59 return attr->mode; in soc_attribute_mode()
60 if ((attr == &dev_attr_serial_number.attr) && soc_dev->attr->serial_number) in soc_attribute_mode()
61 return attr->mode; in soc_attribute_mode()
62 if ((attr == &dev_attr_soc_id.attr) && soc_dev->attr->soc_id) in soc_attribute_mode()
63 return attr->mode; in soc_attribute_mode()
69 static ssize_t soc_info_show(struct device *dev, struct device_attribute *attr, in soc_info_show() argument
75 if (attr == &dev_attr_machine) in soc_info_show()
76 output = soc_dev->attr->machine; in soc_info_show()
77 else if (attr == &dev_attr_family) in soc_info_show()
78 output = soc_dev->attr->family; in soc_info_show()
79 else if (attr == &dev_attr_revision) in soc_info_show()
80 output = soc_dev->attr->revision; in soc_info_show()
81 else if (attr == &dev_attr_serial_number) in soc_info_show()
82 output = soc_dev->attr->serial_number; in soc_info_show()
83 else if (attr == &dev_attr_soc_id) in soc_info_show()
84 output = soc_dev->attr->soc_id; in soc_info_show()
92 &dev_attr_machine.attr,
93 &dev_attr_family.attr,
94 &dev_attr_serial_number.attr,
95 &dev_attr_soc_id.attr,
96 &dev_attr_revision.attr,
163 soc_dev->attr = soc_dev_attr; in soc_device_register()
211 static int soc_device_match_attr(const struct soc_device_attribute *attr, in soc_device_match_attr() argument
215 (!attr->machine || !glob_match(match->machine, attr->machine))) in soc_device_match_attr()
219 (!attr->family || !glob_match(match->family, attr->family))) in soc_device_match_attr()
223 (!attr->revision || !glob_match(match->revision, attr->revision))) in soc_device_match_attr()
227 (!attr->soc_id || !glob_match(match->soc_id, attr->soc_id))) in soc_device_match_attr()
237 return soc_device_match_attr(soc_dev->attr, arg); in soc_device_match_one()