Lines Matching +full:com +full:- +full:offset
1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
6 * Andrew F. Davis <afd@ti.com>
24 unsigned offset) in tps65912_gpio_get_direction() argument
30 ret = regmap_read(gpio->tps->regmap, TPS65912_GPIO1 + offset, &val); in tps65912_gpio_get_direction()
40 static int tps65912_gpio_direction_input(struct gpio_chip *gc, unsigned offset) in tps65912_gpio_direction_input() argument
44 return regmap_update_bits(gpio->tps->regmap, TPS65912_GPIO1 + offset, in tps65912_gpio_direction_input()
49 unsigned offset, int value) in tps65912_gpio_direction_output() argument
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()
61 static int tps65912_gpio_get(struct gpio_chip *gc, unsigned offset) in tps65912_gpio_get() argument
66 ret = regmap_read(gpio->tps->regmap, TPS65912_GPIO1 + offset, &val); in tps65912_gpio_get()
76 static void tps65912_gpio_set(struct gpio_chip *gc, unsigned offset, in tps65912_gpio_set() argument
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()
103 gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); 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>");