Lines Matching refs:soc_dev
40 struct device *soc_device_to_device(struct soc_device *soc_dev) in soc_device_to_device() argument
42 return &soc_dev->dev; in soc_device_to_device()
50 struct soc_device *soc_dev = container_of(dev, struct soc_device, dev); in soc_attribute_mode() local
53 && (soc_dev->attr->machine != NULL)) in soc_attribute_mode()
56 && (soc_dev->attr->family != NULL)) in soc_attribute_mode()
59 && (soc_dev->attr->revision != NULL)) in soc_attribute_mode()
62 && (soc_dev->attr->serial_number != NULL)) in soc_attribute_mode()
65 && (soc_dev->attr->soc_id != NULL)) in soc_attribute_mode()
76 struct soc_device *soc_dev = container_of(dev, struct soc_device, dev); in soc_info_get() local
79 return sprintf(buf, "%s\n", soc_dev->attr->machine); in soc_info_get()
81 return sprintf(buf, "%s\n", soc_dev->attr->family); in soc_info_get()
83 return sprintf(buf, "%s\n", soc_dev->attr->revision); in soc_info_get()
85 return sprintf(buf, "%s\n", soc_dev->attr->serial_number); in soc_info_get()
87 return sprintf(buf, "%s\n", soc_dev->attr->soc_id); in soc_info_get()
114 struct soc_device *soc_dev = container_of(dev, struct soc_device, dev); in soc_release() local
116 kfree(soc_dev); in soc_release()
123 struct soc_device *soc_dev; in soc_device_register() local
133 soc_dev = kzalloc(sizeof(*soc_dev), GFP_KERNEL); in soc_device_register()
134 if (!soc_dev) { in soc_device_register()
143 soc_dev->soc_dev_num = ret; in soc_device_register()
145 soc_dev->attr = soc_dev_attr; in soc_device_register()
146 soc_dev->dev.bus = &soc_bus_type; in soc_device_register()
147 soc_dev->dev.groups = soc_attr_groups; in soc_device_register()
148 soc_dev->dev.release = soc_release; in soc_device_register()
150 dev_set_name(&soc_dev->dev, "soc%d", soc_dev->soc_dev_num); in soc_device_register()
152 ret = device_register(&soc_dev->dev); in soc_device_register()
156 return soc_dev; in soc_device_register()
159 ida_simple_remove(&soc_ida, soc_dev->soc_dev_num); in soc_device_register()
160 put_device(&soc_dev->dev); in soc_device_register()
161 soc_dev = NULL; in soc_device_register()
163 kfree(soc_dev); in soc_device_register()
170 void soc_device_unregister(struct soc_device *soc_dev) in soc_device_unregister() argument
172 ida_simple_remove(&soc_ida, soc_dev->soc_dev_num); in soc_device_unregister()
174 device_unregister(&soc_dev->dev); in soc_device_unregister()
218 struct soc_device *soc_dev = container_of(dev, struct soc_device, dev); in soc_device_match_one() local
220 return soc_device_match_attr(soc_dev->attr, arg); in soc_device_match_one()