reset-controller: ti: force the write operation when assert or deassert
authorCrystal Guo <crystal.guo@mediatek.com>
Wed, 30 Sep 2020 02:21:59 +0000 (10:21 +0800)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 3 Dec 2020 07:44:57 +0000 (08:44 +0100)
Force the write operation in case the read already happens
to return the correct value.

Signed-off-by: Crystal Guo <crystal.guo@mediatek.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/reset/reset-ti-syscon.c

index ef97c4dbbb4eee73641c33864f7ba748a4558096..218370faf37b5ea2ea5c041d4179e6e77410b3a3 100644 (file)
@@ -89,7 +89,7 @@ static int ti_syscon_reset_assert(struct reset_controller_dev *rcdev,
        mask = BIT(control->assert_bit);
        value = (control->flags & ASSERT_SET) ? mask : 0x0;
 
-       return regmap_update_bits(data->regmap, control->assert_offset, mask, value);
+       return regmap_write_bits(data->regmap, control->assert_offset, mask, value);
 }
 
 /**
@@ -120,7 +120,7 @@ static int ti_syscon_reset_deassert(struct reset_controller_dev *rcdev,
        mask = BIT(control->deassert_bit);
        value = (control->flags & DEASSERT_SET) ? mask : 0x0;
 
-       return regmap_update_bits(data->regmap, control->deassert_offset, mask, value);
+       return regmap_write_bits(data->regmap, control->deassert_offset, mask, value);
 }
 
 /**