Lines Matching +full:open +full:- +full:drain

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 struct tps65218 *tps65218 = tps65218_gpio->tps65218; in tps65218_gpio_request()
68 dev_err(gc->parent, "can't work as open source\n"); in tps65218_gpio_request()
69 return -EINVAL; in tps65218_gpio_request()
75 dev_err(gc->parent, "GPO1 works only as open drain\n"); in tps65218_gpio_request()
76 return -EINVAL; in tps65218_gpio_request()
106 dev_err(gc->parent, "GPO3 works only as open drain\n"); in tps65218_gpio_request()
107 return -EINVAL; in tps65218_gpio_request()
126 return -EINVAL; in tps65218_gpio_request()
136 struct tps65218 *tps65218 = tps65218_gpio->tps65218; in tps65218_gpio_set_config()
142 /* GPO1 is hardwired to be open drain */ in tps65218_gpio_set_config()
145 return -ENOTSUPP; in tps65218_gpio_set_config()
147 /* GPO2 is push-pull by default, can be set as open drain. */ in tps65218_gpio_set_config()
159 return -ENOTSUPP; in tps65218_gpio_set_config()
163 return -ENOTSUPP; in tps65218_gpio_set_config()
167 .label = "gpio-tps65218",
176 .base = -1,
181 struct tps65218 *tps65218 = dev_get_drvdata(pdev->dev.parent); in tps65218_gpio_probe()
184 tps65218_gpio = devm_kzalloc(&pdev->dev, sizeof(*tps65218_gpio), in tps65218_gpio_probe()
187 return -ENOMEM; in tps65218_gpio_probe()
189 tps65218_gpio->tps65218 = tps65218; in tps65218_gpio_probe()
190 tps65218_gpio->gpio_chip = template_chip; in tps65218_gpio_probe()
191 tps65218_gpio->gpio_chip.parent = &pdev->dev; in tps65218_gpio_probe()
193 return devm_gpiochip_add_data(&pdev->dev, &tps65218_gpio->gpio_chip, in tps65218_gpio_probe()
198 { .compatible = "ti,tps65218-gpio" },
204 { "tps65218-gpio", },
211 .name = "tps65218-gpio",