Lines Matching +full:com +full:- +full:offset

1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2015-2023 Texas Instruments Incorporated - https://www.ti.com/
4 * Andrew Davis <afd@ti.com>
21 unsigned offset) in tps65086_gpio_get_direction() argument
28 unsigned offset) in tps65086_gpio_direction_input() argument
31 return -EINVAL; in tps65086_gpio_direction_input()
35 unsigned offset, int value) in tps65086_gpio_direction_output() argument
40 regmap_update_bits(gpio->tps->regmap, TPS65086_GPOCTRL, in tps65086_gpio_direction_output()
41 BIT(4 + offset), value ? BIT(4 + offset) : 0); in tps65086_gpio_direction_output()
46 static int tps65086_gpio_get(struct gpio_chip *chip, unsigned offset) in tps65086_gpio_get() argument
51 ret = regmap_read(gpio->tps->regmap, TPS65086_GPOCTRL, &val); in tps65086_gpio_get()
55 return val & BIT(4 + offset); in tps65086_gpio_get()
58 static void tps65086_gpio_set(struct gpio_chip *chip, unsigned offset, in tps65086_gpio_set() argument
63 regmap_update_bits(gpio->tps->regmap, TPS65086_GPOCTRL, in tps65086_gpio_set()
64 BIT(4 + offset), value ? BIT(4 + offset) : 0); in tps65086_gpio_set()
68 .label = "tps65086-gpio",
75 .base = -1,
84 gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); in tps65086_gpio_probe()
86 return -ENOMEM; in tps65086_gpio_probe()
88 gpio->tps = dev_get_drvdata(pdev->dev.parent); in tps65086_gpio_probe()
89 gpio->chip = template_chip; in tps65086_gpio_probe()
90 gpio->chip.parent = gpio->tps->dev; in tps65086_gpio_probe()
92 return devm_gpiochip_add_data(&pdev->dev, &gpio->chip, gpio); in tps65086_gpio_probe()
96 { "tps65086-gpio", },
103 .name = "tps65086-gpio",
110 MODULE_AUTHOR("Andrew Davis <afd@ti.com>");