Lines Matching +full:gpo +full:- +full:config +full:- +full:2

1 // SPDX-License-Identifier: GPL-2.0-or-later
7 * This driver is based on the gpio-tps65912 implementation.
26 struct tps65218 *tps65218 = tps65218_gpio->tps65218; in tps65218_gpio_get()
30 ret = regmap_read(tps65218->regmap, TPS65218_REG_ENABLE2, &val); in tps65218_gpio_get()
41 struct tps65218 *tps65218 = tps65218_gpio->tps65218; in tps65218_gpio_set()
64 return -EPERM; in tps65218_gpio_input()
70 struct tps65218 *tps65218 = tps65218_gpio->tps65218; in tps65218_gpio_request()
74 dev_err(gc->parent, "can't work as open source\n"); in tps65218_gpio_request()
75 return -EINVAL; in tps65218_gpio_request()
81 dev_err(gc->parent, "GPO1 works only as open drain\n"); in tps65218_gpio_request()
82 return -EINVAL; in tps65218_gpio_request()
110 case 2: in tps65218_gpio_request()
112 dev_err(gc->parent, "GPO3 works only as open drain\n"); in tps65218_gpio_request()
113 return -EINVAL; in tps65218_gpio_request()
132 return -EINVAL; in tps65218_gpio_request()
139 unsigned long config) in tps65218_gpio_set_config() argument
142 struct tps65218 *tps65218 = tps65218_gpio->tps65218; in tps65218_gpio_set_config()
143 enum pin_config_param param = pinconf_to_config_param(config); in tps65218_gpio_set_config()
147 case 2: in tps65218_gpio_set_config()
151 return -ENOTSUPP; in tps65218_gpio_set_config()
153 /* GPO2 is push-pull by default, can be set as open drain. */ in tps65218_gpio_set_config()
165 return -ENOTSUPP; in tps65218_gpio_set_config()
169 return -ENOTSUPP; in tps65218_gpio_set_config()
173 .label = "gpio-tps65218",
183 .base = -1,
188 struct tps65218 *tps65218 = dev_get_drvdata(pdev->dev.parent); in tps65218_gpio_probe()
191 tps65218_gpio = devm_kzalloc(&pdev->dev, sizeof(*tps65218_gpio), in tps65218_gpio_probe()
194 return -ENOMEM; in tps65218_gpio_probe()
196 tps65218_gpio->tps65218 = tps65218; in tps65218_gpio_probe()
197 tps65218_gpio->gpio_chip = template_chip; in tps65218_gpio_probe()
198 tps65218_gpio->gpio_chip.parent = &pdev->dev; in tps65218_gpio_probe()
200 return devm_gpiochip_add_data(&pdev->dev, &tps65218_gpio->gpio_chip, in tps65218_gpio_probe()
205 { .compatible = "ti,tps65218-gpio" },
211 { "tps65218-gpio", },
218 .name = "tps65218-gpio",
228 MODULE_DESCRIPTION("GPO interface for TPS65218 PMICs");