Lines Matching +full:reg +full:- +full:names

1 // SPDX-License-Identifier: GPL-2.0
32 struct regmap *regmap = tps68470_gpio->tps68470_regmap; in tps68470_gpio_get()
33 unsigned int reg = TPS68470_REG_GPDO; in tps68470_gpio_get() local
37 offset -= TPS68470_N_REGULAR_GPIO; in tps68470_gpio_get()
38 reg = TPS68470_REG_SGPO; in tps68470_gpio_get()
41 ret = regmap_read(regmap, reg, &val); in tps68470_gpio_get()
43 dev_err(tps68470_gpio->gc.parent, "reg 0x%x read failed\n", in tps68470_gpio_get()
54 struct regmap *regmap = tps68470_gpio->tps68470_regmap; in tps68470_gpio_get_direction()
63 dev_err(tps68470_gpio->gc.parent, "reg 0x%x read failed\n", in tps68470_gpio_get_direction()
77 struct regmap *regmap = tps68470_gpio->tps68470_regmap; in tps68470_gpio_set()
78 unsigned int reg = TPS68470_REG_GPDO; in tps68470_gpio_set() local
81 reg = TPS68470_REG_SGPO; in tps68470_gpio_set()
82 offset -= TPS68470_N_REGULAR_GPIO; in tps68470_gpio_set()
85 regmap_update_bits(regmap, reg, BIT(offset), value ? BIT(offset) : 0); in tps68470_gpio_set()
92 struct regmap *regmap = tps68470_gpio->tps68470_regmap; in tps68470_gpio_output()
109 struct regmap *regmap = tps68470_gpio->tps68470_regmap; in tps68470_gpio_input()
113 return -EINVAL; in tps68470_gpio_input()
130 tps68470_gpio = devm_kzalloc(&pdev->dev, sizeof(*tps68470_gpio), in tps68470_gpio_probe()
133 return -ENOMEM; in tps68470_gpio_probe()
135 tps68470_gpio->tps68470_regmap = dev_get_drvdata(pdev->dev.parent); in tps68470_gpio_probe()
136 tps68470_gpio->gc.label = "tps68470-gpio"; in tps68470_gpio_probe()
137 tps68470_gpio->gc.owner = THIS_MODULE; in tps68470_gpio_probe()
138 tps68470_gpio->gc.direction_input = tps68470_gpio_input; in tps68470_gpio_probe()
139 tps68470_gpio->gc.direction_output = tps68470_gpio_output; in tps68470_gpio_probe()
140 tps68470_gpio->gc.get = tps68470_gpio_get; in tps68470_gpio_probe()
141 tps68470_gpio->gc.get_direction = tps68470_gpio_get_direction; in tps68470_gpio_probe()
142 tps68470_gpio->gc.set = tps68470_gpio_set; in tps68470_gpio_probe()
143 tps68470_gpio->gc.can_sleep = true; in tps68470_gpio_probe()
144 tps68470_gpio->gc.names = tps68470_names; in tps68470_gpio_probe()
145 tps68470_gpio->gc.ngpio = TPS68470_N_GPIO; in tps68470_gpio_probe()
146 tps68470_gpio->gc.base = -1; in tps68470_gpio_probe()
147 tps68470_gpio->gc.parent = &pdev->dev; in tps68470_gpio_probe()
149 ret = devm_gpiochip_add_data(&pdev->dev, &tps68470_gpio->gc, in tps68470_gpio_probe()
152 dev_err(&pdev->dev, "Failed to register gpio_chip: %d\n", ret); in tps68470_gpio_probe()
163 .name = "tps68470-gpio",