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
52 if ((attr == &dev_attr_machine.attr) && soc_dev->attr->machine) in soc_attribute_mode()
54 if ((attr == &dev_attr_family.attr) && soc_dev->attr->family) in soc_attribute_mode()
56 if ((attr == &dev_attr_revision.attr) && soc_dev->attr->revision) in soc_attribute_mode()
58 if ((attr == &dev_attr_serial_number.attr) && soc_dev->attr->serial_number) in soc_attribute_mode()
60 if ((attr == &dev_attr_soc_id.attr) && soc_dev->attr->soc_id) in soc_attribute_mode()
70 struct soc_device *soc_dev = container_of(dev, struct soc_device, dev); in soc_info_show() local
74 output = soc_dev->attr->machine; in soc_info_show()
76 output = soc_dev->attr->family; in soc_info_show()
78 output = soc_dev->attr->revision; in soc_info_show()
80 output = soc_dev->attr->serial_number; in soc_info_show()
82 output = soc_dev->attr->soc_id; in soc_info_show()
105 struct soc_device *soc_dev = container_of(dev, struct soc_device, dev); in soc_release() local
107 ida_simple_remove(&soc_ida, soc_dev->soc_dev_num); in soc_release()
108 kfree(soc_dev->dev.groups); in soc_release()
109 kfree(soc_dev); in soc_release()
116 struct soc_device *soc_dev; in soc_device_register() local
127 soc_dev = kzalloc(sizeof(*soc_dev), GFP_KERNEL); in soc_device_register()
128 if (!soc_dev) { in soc_device_register()
145 soc_dev->soc_dev_num = ret; in soc_device_register()
147 soc_dev->attr = soc_dev_attr; in soc_device_register()
148 soc_dev->dev.bus = &soc_bus_type; in soc_device_register()
149 soc_dev->dev.groups = soc_attr_groups; in soc_device_register()
150 soc_dev->dev.release = soc_release; in soc_device_register()
152 dev_set_name(&soc_dev->dev, "soc%d", soc_dev->soc_dev_num); in soc_device_register()
154 ret = device_register(&soc_dev->dev); in soc_device_register()
156 put_device(&soc_dev->dev); in soc_device_register()
160 return soc_dev; in soc_device_register()
165 kfree(soc_dev); in soc_device_register()
172 void soc_device_unregister(struct soc_device *soc_dev) in soc_device_unregister() argument
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()