Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: tps65910: use regmap accessors

Use regmap accessors directly for register manipulation - removing one
layer of abstraction.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Michał Mirosław and committed by
Lee Jones
a233d4eb f594d01b

+6 -6
+6 -6
drivers/gpio/gpio-tps65910.c
··· 28 28 struct tps65910 *tps65910 = tps65910_gpio->tps65910; 29 29 unsigned int val; 30 30 31 - tps65910_reg_read(tps65910, TPS65910_GPIO0 + offset, &val); 31 + regmap_read(tps65910->regmap, TPS65910_GPIO0 + offset, &val); 32 32 33 33 if (val & GPIO_STS_MASK) 34 34 return 1; ··· 43 43 struct tps65910 *tps65910 = tps65910_gpio->tps65910; 44 44 45 45 if (value) 46 - tps65910_reg_set_bits(tps65910, TPS65910_GPIO0 + offset, 46 + regmap_set_bits(tps65910->regmap, TPS65910_GPIO0 + offset, 47 47 GPIO_SET_MASK); 48 48 else 49 - tps65910_reg_clear_bits(tps65910, TPS65910_GPIO0 + offset, 49 + regmap_clear_bits(tps65910->regmap, TPS65910_GPIO0 + offset, 50 50 GPIO_SET_MASK); 51 51 } 52 52 ··· 59 59 /* Set the initial value */ 60 60 tps65910_gpio_set(gc, offset, value); 61 61 62 - return tps65910_reg_set_bits(tps65910, TPS65910_GPIO0 + offset, 62 + return regmap_set_bits(tps65910->regmap, TPS65910_GPIO0 + offset, 63 63 GPIO_CFG_MASK); 64 64 } 65 65 ··· 68 68 struct tps65910_gpio *tps65910_gpio = gpiochip_get_data(gc); 69 69 struct tps65910 *tps65910 = tps65910_gpio->tps65910; 70 70 71 - return tps65910_reg_clear_bits(tps65910, TPS65910_GPIO0 + offset, 71 + return regmap_clear_bits(tps65910->regmap, TPS65910_GPIO0 + offset, 72 72 GPIO_CFG_MASK); 73 73 } 74 74 ··· 157 157 if (!pdata->en_gpio_sleep[i]) 158 158 continue; 159 159 160 - ret = tps65910_reg_set_bits(tps65910, 160 + ret = regmap_set_bits(tps65910->regmap, 161 161 TPS65910_GPIO0 + i, GPIO_SLEEP_MASK); 162 162 if (ret < 0) 163 163 dev_warn(tps65910->dev,