mfd: tps65911-comparator: Use regmap accessors
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Sat, 26 Sep 2020 23:59:17 +0000 (01:59 +0200)
committerLee Jones <lee.jones@linaro.org>
Thu, 19 Nov 2020 08:34:22 +0000 (08:34 +0000)
Use regmap accessors directly for register manipulation - removing
one layer of abstraction.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/tps65911-comparator.c

index 2334cd61c98d4bbed9c689dee38126584f38d60c..8f4210075913c7d746e7ca10ec59eab5b8ef2675 100644 (file)
@@ -69,7 +69,7 @@ static int comp_threshold_set(struct tps65910 *tps65910, int id, int voltage)
                return -EINVAL;
 
        val = index << 1;
-       ret = tps65910_reg_write(tps65910, tps_comp.reg, val);
+       ret = regmap_write(tps65910->regmap, tps_comp.reg, val);
 
        return ret;
 }
@@ -80,7 +80,7 @@ static int comp_threshold_get(struct tps65910 *tps65910, int id)
        unsigned int val;
        int ret;
 
-       ret = tps65910_reg_read(tps65910, tps_comp.reg, &val);
+       ret = regmap_read(tps65910->regmap, tps_comp.reg, &val);
        if (ret < 0)
                return ret;