Lines Matching refs:slave
13 struct sdw_slave *slave = dev_to_sdw_dev(dev); in sdw_slave_release() local
15 mutex_destroy(&slave->sdw_dev_lock); in sdw_slave_release()
16 kfree(slave); in sdw_slave_release()
28 struct sdw_slave *slave; in sdw_slave_add() local
32 slave = kzalloc(sizeof(*slave), GFP_KERNEL); in sdw_slave_add()
33 if (!slave) in sdw_slave_add()
37 memcpy(&slave->id, id, sizeof(*id)); in sdw_slave_add()
38 slave->dev.parent = bus->dev; in sdw_slave_add()
39 slave->dev.fwnode = fwnode; in sdw_slave_add()
43 dev_set_name(&slave->dev, "sdw:%01x:%04x:%04x:%02x", in sdw_slave_add()
48 dev_set_name(&slave->dev, "sdw:%01x:%04x:%04x:%02x:%01x", in sdw_slave_add()
53 slave->dev.bus = &sdw_bus_type; in sdw_slave_add()
54 slave->dev.of_node = of_node_get(to_of_node(fwnode)); in sdw_slave_add()
55 slave->dev.type = &sdw_slave_type; in sdw_slave_add()
56 slave->dev.groups = sdw_slave_status_attr_groups; in sdw_slave_add()
57 slave->bus = bus; in sdw_slave_add()
58 slave->status = SDW_SLAVE_UNATTACHED; in sdw_slave_add()
59 init_completion(&slave->enumeration_complete); in sdw_slave_add()
60 init_completion(&slave->initialization_complete); in sdw_slave_add()
61 slave->dev_num = 0; in sdw_slave_add()
62 slave->probed = false; in sdw_slave_add()
63 slave->first_interrupt_done = false; in sdw_slave_add()
64 mutex_init(&slave->sdw_dev_lock); in sdw_slave_add()
67 init_completion(&slave->port_ready[i]); in sdw_slave_add()
70 list_add_tail(&slave->node, &bus->slaves); in sdw_slave_add()
73 ret = device_register(&slave->dev); in sdw_slave_add()
82 list_del(&slave->node); in sdw_slave_add()
84 put_device(&slave->dev); in sdw_slave_add()
88 sdw_slave_debugfs_init(slave); in sdw_slave_add()