Lines Matching refs:soc_dev
39 struct device *soc_device_to_device(struct soc_device *soc_dev) in soc_device_to_device() argument
41 return &soc_dev->dev; in soc_device_to_device()
49 struct soc_device *soc_dev = container_of(dev, struct soc_device, dev); in soc_attribute_mode() local
52 && (soc_dev->attr->machine != NULL)) in soc_attribute_mode()
55 && (soc_dev->attr->family != NULL)) in soc_attribute_mode()
58 && (soc_dev->attr->revision != NULL)) in soc_attribute_mode()
61 && (soc_dev->attr->soc_id != NULL)) in soc_attribute_mode()
72 struct soc_device *soc_dev = container_of(dev, struct soc_device, dev); in soc_info_get() local
75 return sprintf(buf, "%s\n", soc_dev->attr->machine); in soc_info_get()
77 return sprintf(buf, "%s\n", soc_dev->attr->family); in soc_info_get()
79 return sprintf(buf, "%s\n", soc_dev->attr->revision); in soc_info_get()
81 return sprintf(buf, "%s\n", soc_dev->attr->soc_id); in soc_info_get()
107 struct soc_device *soc_dev = container_of(dev, struct soc_device, dev); in soc_release() local
109 kfree(soc_dev); in soc_release()
116 struct soc_device *soc_dev; in soc_device_register() local
126 soc_dev = kzalloc(sizeof(*soc_dev), GFP_KERNEL); in soc_device_register()
127 if (!soc_dev) { in soc_device_register()
136 soc_dev->soc_dev_num = ret; in soc_device_register()
138 soc_dev->attr = soc_dev_attr; in soc_device_register()
139 soc_dev->dev.bus = &soc_bus_type; in soc_device_register()
140 soc_dev->dev.groups = soc_attr_groups; in soc_device_register()
141 soc_dev->dev.release = soc_release; in soc_device_register()
143 dev_set_name(&soc_dev->dev, "soc%d", soc_dev->soc_dev_num); in soc_device_register()
145 ret = device_register(&soc_dev->dev); in soc_device_register()
149 return soc_dev; in soc_device_register()
152 ida_simple_remove(&soc_ida, soc_dev->soc_dev_num); in soc_device_register()
153 put_device(&soc_dev->dev); in soc_device_register()
154 soc_dev = NULL; in soc_device_register()
156 kfree(soc_dev); in soc_device_register()
162 void soc_device_unregister(struct soc_device *soc_dev) in soc_device_unregister() argument
164 ida_simple_remove(&soc_ida, soc_dev->soc_dev_num); in soc_device_unregister()
166 device_unregister(&soc_dev->dev); in soc_device_unregister()
209 struct soc_device *soc_dev = container_of(dev, struct soc_device, dev); in soc_device_match_one() local
211 return soc_device_match_attr(soc_dev->attr, arg); in soc_device_match_one()