Lines Matching refs:ofdev
339 static int grgpio_probe(struct platform_device *ofdev) in grgpio_probe() argument
341 struct device_node *np = ofdev->dev.of_node; in grgpio_probe()
353 priv = devm_kzalloc(&ofdev->dev, sizeof(*priv), GFP_KERNEL); in grgpio_probe()
357 res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); in grgpio_probe()
358 regs = devm_ioremap_resource(&ofdev->dev, res); in grgpio_probe()
363 err = bgpio_init(bgc, &ofdev->dev, 4, regs + GRGPIO_DATA, in grgpio_probe()
367 dev_err(&ofdev->dev, "bgpio_init() failed\n"); in grgpio_probe()
373 priv->dev = &ofdev->dev; in grgpio_probe()
385 dev_dbg(&ofdev->dev, in grgpio_probe()
398 dev_err(&ofdev->dev, in grgpio_probe()
408 dev_err(&ofdev->dev, "Could not add irq domain\n"); in grgpio_probe()
422 ret = platform_get_irq(ofdev, lirq->index); in grgpio_probe()
436 platform_set_drvdata(ofdev, priv); in grgpio_probe()
440 dev_err(&ofdev->dev, "Could not add gpiochip\n"); in grgpio_probe()
446 dev_info(&ofdev->dev, "regs=0x%p, base=%d, ngpio=%d, irqs=%s\n", in grgpio_probe()
452 static int grgpio_remove(struct platform_device *ofdev) in grgpio_remove() argument
454 struct grgpio_priv *priv = platform_get_drvdata(ofdev); in grgpio_remove()