Lines Matching refs:pdev
256 struct platform_device *pdev = dev_id; in cdns_wdt_irq_handler() local
258 dev_info(&pdev->dev, in cdns_wdt_irq_handler()
315 static int cdns_wdt_probe(struct platform_device *pdev) in cdns_wdt_probe() argument
323 wdt = devm_kzalloc(&pdev->dev, sizeof(*wdt), GFP_KERNEL); in cdns_wdt_probe()
334 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); in cdns_wdt_probe()
335 wdt->regs = devm_ioremap_resource(&pdev->dev, res); in cdns_wdt_probe()
340 wdt->rst = of_property_read_bool(pdev->dev.of_node, "reset-on-timeout"); in cdns_wdt_probe()
341 irq = platform_get_irq(pdev, 0); in cdns_wdt_probe()
343 ret = devm_request_irq(&pdev->dev, irq, cdns_wdt_irq_handler, 0, in cdns_wdt_probe()
344 pdev->name, pdev); in cdns_wdt_probe()
346 dev_err(&pdev->dev, in cdns_wdt_probe()
354 cdns_wdt_device->parent = &pdev->dev; in cdns_wdt_probe()
356 ret = watchdog_init_timeout(cdns_wdt_device, wdt_timeout, &pdev->dev); in cdns_wdt_probe()
358 dev_err(&pdev->dev, "unable to set timeout value\n"); in cdns_wdt_probe()
365 wdt->clk = devm_clk_get(&pdev->dev, NULL); in cdns_wdt_probe()
367 dev_err(&pdev->dev, "input clock not found\n"); in cdns_wdt_probe()
374 dev_err(&pdev->dev, "unable to enable clock\n"); in cdns_wdt_probe()
392 dev_err(&pdev->dev, "cannot register reboot notifier err=%d)\n", in cdns_wdt_probe()
399 dev_err(&pdev->dev, "Failed to register wdt device\n"); in cdns_wdt_probe()
402 platform_set_drvdata(pdev, wdt); in cdns_wdt_probe()
404 dev_dbg(&pdev->dev, "Xilinx Watchdog Timer at %p with timeout %ds%s\n", in cdns_wdt_probe()
424 static int cdns_wdt_remove(struct platform_device *pdev) in cdns_wdt_remove() argument
426 struct cdns_wdt *wdt = platform_get_drvdata(pdev); in cdns_wdt_remove()
442 static void cdns_wdt_shutdown(struct platform_device *pdev) in cdns_wdt_shutdown() argument
444 struct cdns_wdt *wdt = platform_get_drvdata(pdev); in cdns_wdt_shutdown()
458 struct platform_device *pdev = container_of(dev, in cdns_wdt_suspend() local
460 struct cdns_wdt *wdt = platform_get_drvdata(pdev); in cdns_wdt_suspend()
477 struct platform_device *pdev = container_of(dev, in cdns_wdt_resume() local
479 struct cdns_wdt *wdt = platform_get_drvdata(pdev); in cdns_wdt_resume()