Lines Matching +full:tn48m +full:- +full:gpi
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Delta TN48M CPLD GPIO driver
49 if (!pdev->dev.parent) in tn48m_gpio_probe()
50 return -ENODEV; in tn48m_gpio_probe()
52 gpio_config = device_get_match_data(&pdev->dev); in tn48m_gpio_probe()
54 return -ENODEV; in tn48m_gpio_probe()
56 ret = device_property_read_u32(&pdev->dev, "reg", &base); in tn48m_gpio_probe()
60 regmap = dev_get_regmap(pdev->dev.parent, NULL); in tn48m_gpio_probe()
62 return -ENODEV; in tn48m_gpio_probe()
65 config.parent = &pdev->dev; in tn48m_gpio_probe()
66 config.ngpio = gpio_config->ngpio; in tn48m_gpio_probe()
67 config.ngpio_per_reg = gpio_config->ngpio_per_reg; in tn48m_gpio_probe()
68 switch (gpio_config->type) { in tn48m_gpio_probe()
76 return -EINVAL; in tn48m_gpio_probe()
79 return PTR_ERR_OR_ZERO(devm_gpio_regmap_register(&pdev->dev, &config)); in tn48m_gpio_probe()
83 { .compatible = "delta,tn48m-gpo", .data = &tn48m_gpo_config },
84 { .compatible = "delta,tn48m-gpi", .data = &tn48m_gpi_config },
91 .name = "delta-tn48m-gpio",
99 MODULE_DESCRIPTION("Delta TN48M CPLD GPIO driver");