Skip to content

Commit

Permalink
reset-controller: ti: force the write operation when assert or deassert
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Crystal Guo authored and Philipp Zabel committed Dec 3, 2020
1 parent 0d625a1 commit d06c4de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/reset/reset-ti-syscon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit d06c4de

Please sign in to comment.