Lines Matching refs:ofdev
328 static int grgpio_probe(struct platform_device *ofdev) in grgpio_probe() argument
330 struct device_node *np = ofdev->dev.of_node; in grgpio_probe()
340 priv = devm_kzalloc(&ofdev->dev, sizeof(*priv), GFP_KERNEL); in grgpio_probe()
344 regs = devm_platform_ioremap_resource(ofdev, 0); in grgpio_probe()
349 err = bgpio_init(gc, &ofdev->dev, 4, regs + GRGPIO_DATA, in grgpio_probe()
353 dev_err(&ofdev->dev, "bgpio_init() failed\n"); in grgpio_probe()
359 priv->dev = &ofdev->dev; in grgpio_probe()
364 gc->label = devm_kasprintf(&ofdev->dev, GFP_KERNEL, "%pOF", np); in grgpio_probe()
370 dev_dbg(&ofdev->dev, in grgpio_probe()
383 dev_err(&ofdev->dev, in grgpio_probe()
393 dev_err(&ofdev->dev, "Could not add irq domain\n"); in grgpio_probe()
407 ret = platform_get_irq(ofdev, lirq->index); in grgpio_probe()
419 platform_set_drvdata(ofdev, priv); in grgpio_probe()
423 dev_err(&ofdev->dev, "Could not add gpiochip\n"); in grgpio_probe()
429 dev_info(&ofdev->dev, "regs=0x%p, base=%d, ngpio=%d, irqs=%s\n", in grgpio_probe()
435 static int grgpio_remove(struct platform_device *ofdev) in grgpio_remove() argument
437 struct grgpio_priv *priv = platform_get_drvdata(ofdev); in grgpio_remove()