Lines Matching refs:ssp
40 struct ssp_device *ssp = NULL; in pxa_ssp_request() local
44 list_for_each_entry(ssp, &ssp_list, node) { in pxa_ssp_request()
45 if (ssp->port_id == port && ssp->use_count == 0) { in pxa_ssp_request()
46 ssp->use_count++; in pxa_ssp_request()
47 ssp->label = label; in pxa_ssp_request()
54 if (&ssp->node == &ssp_list) in pxa_ssp_request()
57 return ssp; in pxa_ssp_request()
64 struct ssp_device *ssp = NULL; in pxa_ssp_request_of() local
68 list_for_each_entry(ssp, &ssp_list, node) { in pxa_ssp_request_of()
69 if (ssp->of_node == of_node && ssp->use_count == 0) { in pxa_ssp_request_of()
70 ssp->use_count++; in pxa_ssp_request_of()
71 ssp->label = label; in pxa_ssp_request_of()
78 if (&ssp->node == &ssp_list) in pxa_ssp_request_of()
81 return ssp; in pxa_ssp_request_of()
85 void pxa_ssp_free(struct ssp_device *ssp) in pxa_ssp_free() argument
88 if (ssp->use_count) { in pxa_ssp_free()
89 ssp->use_count--; in pxa_ssp_free()
90 ssp->label = NULL; in pxa_ssp_free()
92 dev_err(ssp->dev, "device already free\n"); in pxa_ssp_free()
114 struct ssp_device *ssp; in pxa_ssp_probe() local
117 ssp = devm_kzalloc(dev, sizeof(struct ssp_device), GFP_KERNEL); in pxa_ssp_probe()
118 if (ssp == NULL) in pxa_ssp_probe()
121 ssp->dev = dev; in pxa_ssp_probe()
123 ssp->clk = devm_clk_get(dev, NULL); in pxa_ssp_probe()
124 if (IS_ERR(ssp->clk)) in pxa_ssp_probe()
125 return PTR_ERR(ssp->clk); in pxa_ssp_probe()
140 ssp->phys_base = res->start; in pxa_ssp_probe()
142 ssp->mmio_base = devm_ioremap(dev, res->start, resource_size(res)); in pxa_ssp_probe()
143 if (ssp->mmio_base == NULL) { in pxa_ssp_probe()
148 ssp->irq = platform_get_irq(pdev, 0); in pxa_ssp_probe()
149 if (ssp->irq < 0) in pxa_ssp_probe()
155 ssp->type = (int) id->data; in pxa_ssp_probe()
159 ssp->type = (int) id->driver_data; in pxa_ssp_probe()
164 ssp->port_id = pdev->id + 1; in pxa_ssp_probe()
167 ssp->use_count = 0; in pxa_ssp_probe()
168 ssp->of_node = dev->of_node; in pxa_ssp_probe()
171 list_add(&ssp->node, &ssp_list); in pxa_ssp_probe()
174 platform_set_drvdata(pdev, ssp); in pxa_ssp_probe()
181 struct ssp_device *ssp = platform_get_drvdata(pdev); in pxa_ssp_remove() local
184 list_del(&ssp->node); in pxa_ssp_remove()