Lines Matching refs:ofdev
342 static int grgpio_probe(struct platform_device *ofdev) in grgpio_probe() argument
344 struct device_node *np = ofdev->dev.of_node; in grgpio_probe()
356 priv = devm_kzalloc(&ofdev->dev, sizeof(*priv), GFP_KERNEL); in grgpio_probe()
360 res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); in grgpio_probe()
361 regs = devm_ioremap_resource(&ofdev->dev, res); in grgpio_probe()
366 err = bgpio_init(bgc, &ofdev->dev, 4, regs + GRGPIO_DATA, in grgpio_probe()
370 dev_err(&ofdev->dev, "bgpio_init() failed\n"); in grgpio_probe()
376 priv->dev = &ofdev->dev; in grgpio_probe()
388 dev_dbg(&ofdev->dev, in grgpio_probe()
401 dev_err(&ofdev->dev, in grgpio_probe()
411 dev_err(&ofdev->dev, "Could not add irq domain\n"); in grgpio_probe()
425 ret = platform_get_irq(ofdev, lirq->index); in grgpio_probe()
439 platform_set_drvdata(ofdev, priv); in grgpio_probe()
443 dev_err(&ofdev->dev, "Could not add gpiochip\n"); in grgpio_probe()
449 dev_info(&ofdev->dev, "regs=0x%p, base=%d, ngpio=%d, irqs=%s\n", in grgpio_probe()
455 static int grgpio_remove(struct platform_device *ofdev) in grgpio_remove() argument
457 struct grgpio_priv *priv = platform_get_drvdata(ofdev); in grgpio_remove()