Lines Matching +full:gpio +full:- +full:dir
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * CLPS711X GPIO driver
10 #include <linux/gpio/driver.h>
15 struct device_node *np = pdev->dev.of_node; in clps711x_gpio_probe()
16 void __iomem *dat, *dir; in clps711x_gpio_probe() local
21 return -ENODEV; in clps711x_gpio_probe()
23 id = of_alias_get_id(np, "gpio"); in clps711x_gpio_probe()
25 return -ENODEV; in clps711x_gpio_probe()
27 gc = devm_kzalloc(&pdev->dev, sizeof(*gc), GFP_KERNEL); in clps711x_gpio_probe()
29 return -ENOMEM; in clps711x_gpio_probe()
35 dir = devm_platform_ioremap_resource(pdev, 1); in clps711x_gpio_probe()
36 if (IS_ERR(dir)) in clps711x_gpio_probe()
37 return PTR_ERR(dir); in clps711x_gpio_probe()
42 err = bgpio_init(gc, &pdev->dev, 1, dat, NULL, NULL, in clps711x_gpio_probe()
43 NULL, dir, 0); in clps711x_gpio_probe()
46 err = bgpio_init(gc, &pdev->dev, 1, dat, NULL, NULL, in clps711x_gpio_probe()
47 dir, NULL, 0); in clps711x_gpio_probe()
57 gc->ngpio = 3; in clps711x_gpio_probe()
63 gc->base = -1; in clps711x_gpio_probe()
64 gc->owner = THIS_MODULE; in clps711x_gpio_probe()
67 return devm_gpiochip_add_data(&pdev->dev, gc, NULL); in clps711x_gpio_probe()
71 { .compatible = "cirrus,ep7209-gpio" },
78 .name = "clps711x-gpio",
87 MODULE_DESCRIPTION("CLPS711X GPIO driver");
88 MODULE_ALIAS("platform:clps711x-gpio");