Lines Matching refs:pcdev
45 struct amba_device *pcdev = to_amba_device(dev); in amba_match() local
49 if (pcdev->driver_override) in amba_match()
50 return !strcmp(pcdev->driver_override, drv->name); in amba_match()
52 return amba_lookup(pcdrv->id_table, pcdev) != NULL; in amba_match()
57 struct amba_device *pcdev = to_amba_device(dev); in amba_uevent() local
60 retval = add_uevent_var(env, "AMBA_ID=%08x", pcdev->periphid); in amba_uevent()
64 retval = add_uevent_var(env, "MODALIAS=amba:d%08X", pcdev->periphid); in amba_uevent()
144 struct amba_device *pcdev = to_amba_device(dev); in amba_pm_runtime_suspend() local
149 clk_disable(pcdev->pclk); in amba_pm_runtime_suspend()
151 clk_disable_unprepare(pcdev->pclk); in amba_pm_runtime_suspend()
159 struct amba_device *pcdev = to_amba_device(dev); in amba_pm_runtime_resume() local
164 ret = clk_enable(pcdev->pclk); in amba_pm_runtime_resume()
166 ret = clk_prepare_enable(pcdev->pclk); in amba_pm_runtime_resume()
209 static int amba_get_enable_pclk(struct amba_device *pcdev) in amba_get_enable_pclk() argument
213 pcdev->pclk = clk_get(&pcdev->dev, "apb_pclk"); in amba_get_enable_pclk()
214 if (IS_ERR(pcdev->pclk)) in amba_get_enable_pclk()
215 return PTR_ERR(pcdev->pclk); in amba_get_enable_pclk()
217 ret = clk_prepare_enable(pcdev->pclk); in amba_get_enable_pclk()
219 clk_put(pcdev->pclk); in amba_get_enable_pclk()
224 static void amba_put_disable_pclk(struct amba_device *pcdev) in amba_put_disable_pclk() argument
226 clk_disable_unprepare(pcdev->pclk); in amba_put_disable_pclk()
227 clk_put(pcdev->pclk); in amba_put_disable_pclk()
236 struct amba_device *pcdev = to_amba_device(dev); in amba_probe() local
238 const struct amba_id *id = amba_lookup(pcdrv->id_table, pcdev); in amba_probe()
250 ret = amba_get_enable_pclk(pcdev); in amba_probe()
260 ret = pcdrv->probe(pcdev, id); in amba_probe()
268 amba_put_disable_pclk(pcdev); in amba_probe()
277 struct amba_device *pcdev = to_amba_device(dev); in amba_remove() local
282 ret = drv->remove(pcdev); in amba_remove()
290 amba_put_disable_pclk(pcdev); in amba_remove()
676 struct amba_device *pcdev = to_amba_device(dev); in amba_find_match() local
679 r = (pcdev->periphid & d->mask) == d->id; in amba_find_match()
687 d->dev = pcdev; in amba_find_match()