Lines Matching +full:gpio +full:- +full:f

1 // SPDX-License-Identifier: GPL-2.0
3 * GPIO driver for TI TPS65912x PMICs
5 * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
6 * Andrew F. Davis <afd@ti.com>
8 * Based on the Arizona GPIO driver and the previous TPS65912 driver by
12 #include <linux/gpio/driver.h>
26 struct tps65912_gpio *gpio = gpiochip_get_data(gc); in tps65912_gpio_get_direction() local
30 ret = regmap_read(gpio->tps->regmap, TPS65912_GPIO1 + offset, &val); in tps65912_gpio_get_direction()
42 struct tps65912_gpio *gpio = gpiochip_get_data(gc); in tps65912_gpio_direction_input() local
44 return regmap_update_bits(gpio->tps->regmap, TPS65912_GPIO1 + offset, in tps65912_gpio_direction_input()
51 struct tps65912_gpio *gpio = gpiochip_get_data(gc); in tps65912_gpio_direction_output() local
54 regmap_update_bits(gpio->tps->regmap, TPS65912_GPIO1 + offset, in tps65912_gpio_direction_output()
57 return regmap_update_bits(gpio->tps->regmap, TPS65912_GPIO1 + offset, in tps65912_gpio_direction_output()
63 struct tps65912_gpio *gpio = gpiochip_get_data(gc); in tps65912_gpio_get() local
66 ret = regmap_read(gpio->tps->regmap, TPS65912_GPIO1 + offset, &val); in tps65912_gpio_get()
79 struct tps65912_gpio *gpio = gpiochip_get_data(gc); in tps65912_gpio_set() local
81 regmap_update_bits(gpio->tps->regmap, TPS65912_GPIO1 + offset, in tps65912_gpio_set()
86 .label = "tps65912-gpio",
93 .base = -1,
100 struct tps65912 *tps = dev_get_drvdata(pdev->dev.parent); in tps65912_gpio_probe()
101 struct tps65912_gpio *gpio; in tps65912_gpio_probe() local
103 gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); in tps65912_gpio_probe()
104 if (!gpio) in tps65912_gpio_probe()
105 return -ENOMEM; in tps65912_gpio_probe()
107 gpio->tps = dev_get_drvdata(pdev->dev.parent); in tps65912_gpio_probe()
108 gpio->gpio_chip = template_chip; in tps65912_gpio_probe()
109 gpio->gpio_chip.parent = tps->dev; in tps65912_gpio_probe()
111 return devm_gpiochip_add_data(&pdev->dev, &gpio->gpio_chip, gpio); in tps65912_gpio_probe()
115 { "tps65912-gpio", },
122 .name = "tps65912-gpio",
129 MODULE_AUTHOR("Andrew F. Davis <afd@ti.com>");
130 MODULE_DESCRIPTION("TPS65912 GPIO driver");