Lines Matching refs:device_attribute
104 例如:驅動程序模型定義的 device_attribute 結構體如下:
106 struct device_attribute {
108 ssize_t (*show)(struct device *dev, struct device_attribute *attr,
110 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
114 int device_create_file(struct device *, const struct device_attribute *);
115 void device_remove_file(struct device *, const struct device_attribute *);
120 struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
128 static struct device_attribute dev_attr_foo = {
160 #define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr)
165 struct device_attribute *dev_attr = to_dev_attr(attr);
186 ssize_t (*show)(struct device *dev, struct device_attribute *attr, char *buf);
187 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
237 static ssize_t show_name(struct device *dev, struct device_attribute *attr,
243 static ssize_t store_name(struct device *dev, struct device_attribute *attr,
311 struct device_attribute {
313 ssize_t (*show)(struct device *dev, struct device_attribute *attr,
315 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
325 int device_create_file(struct device *dev, const struct device_attribute * attr);
326 void device_remove_file(struct device *dev, const struct device_attribute * attr);