Lines Matching refs:pdev
18 static int clps711x_gpio_probe(struct platform_device *pdev) in clps711x_gpio_probe() argument
20 struct device_node *np = pdev->dev.of_node; in clps711x_gpio_probe()
24 int err, id = np ? of_alias_get_id(np, "gpio") : pdev->id; in clps711x_gpio_probe()
29 bgc = devm_kzalloc(&pdev->dev, sizeof(*bgc), GFP_KERNEL); in clps711x_gpio_probe()
33 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); in clps711x_gpio_probe()
34 dat = devm_ioremap_resource(&pdev->dev, res); in clps711x_gpio_probe()
38 res = platform_get_resource(pdev, IORESOURCE_MEM, 1); in clps711x_gpio_probe()
39 dir = devm_ioremap_resource(&pdev->dev, res); in clps711x_gpio_probe()
46 err = bgpio_init(bgc, &pdev->dev, 1, dat, NULL, NULL, in clps711x_gpio_probe()
50 err = bgpio_init(bgc, &pdev->dev, 1, dat, NULL, NULL, in clps711x_gpio_probe()
69 platform_set_drvdata(pdev, bgc); in clps711x_gpio_probe()
74 static int clps711x_gpio_remove(struct platform_device *pdev) in clps711x_gpio_remove() argument
76 struct bgpio_chip *bgc = platform_get_drvdata(pdev); in clps711x_gpio_remove()