Lines Matching refs:hub

48 	struct fsi_master_hub *hub = to_fsi_master_hub(master);  in hub_master_read()  local
53 addr += hub->addr + (link * FSI_HUB_LINK_SIZE); in hub_master_read()
54 return fsi_slave_read(hub->upstream->slave, addr, val, size); in hub_master_read()
60 struct fsi_master_hub *hub = to_fsi_master_hub(master); in hub_master_write() local
65 addr += hub->addr + (link * FSI_HUB_LINK_SIZE); in hub_master_write()
66 return fsi_slave_write(hub->upstream->slave, addr, val, size); in hub_master_write()
83 struct fsi_master_hub *hub = to_fsi_master_hub(master); in hub_master_link_enable() local
94 return fsi_device_write(hub->upstream, FSI_MCENP0 + (4 * idx), in hub_master_link_enable()
97 rc = fsi_device_write(hub->upstream, FSI_MSENP0 + (4 * idx), &reg, 4); in hub_master_link_enable()
108 struct fsi_master_hub *hub = to_fsi_master_hub(to_fsi_master(dev)); in hub_master_release() local
110 kfree(hub); in hub_master_release()
124 static int hub_master_init(struct fsi_master_hub *hub) in hub_master_init() argument
126 struct fsi_device *dev = hub->upstream; in hub_master_init()
198 struct fsi_master_hub *hub; in hub_master_probe() local
218 hub = kzalloc(sizeof(*hub), GFP_KERNEL); in hub_master_probe()
219 if (!hub) { in hub_master_probe()
224 hub->addr = FSI_HUB_LINK_OFFSET; in hub_master_probe()
225 hub->size = FSI_HUB_LINK_SIZE * links; in hub_master_probe()
226 hub->upstream = fsi_dev; in hub_master_probe()
228 hub->master.dev.parent = dev; in hub_master_probe()
229 hub->master.dev.release = hub_master_release; in hub_master_probe()
230 hub->master.dev.of_node = of_node_get(dev_of_node(dev)); in hub_master_probe()
232 hub->master.n_links = links; in hub_master_probe()
233 hub->master.read = hub_master_read; in hub_master_probe()
234 hub->master.write = hub_master_write; in hub_master_probe()
235 hub->master.send_break = hub_master_break; in hub_master_probe()
236 hub->master.link_enable = hub_master_link_enable; in hub_master_probe()
238 dev_set_drvdata(dev, hub); in hub_master_probe()
240 hub_master_init(hub); in hub_master_probe()
242 rc = fsi_master_register(&hub->master); in hub_master_probe()
253 get_device(&hub->master.dev); in hub_master_probe()
264 struct fsi_master_hub *hub = dev_get_drvdata(dev); in hub_master_remove() local
266 fsi_master_unregister(&hub->master); in hub_master_remove()
267 fsi_slave_release_range(hub->upstream->slave, hub->addr, hub->size); in hub_master_remove()
268 of_node_put(hub->master.dev.of_node); in hub_master_remove()
274 put_device(&hub->master.dev); in hub_master_remove()