iio: dac: ad3552r: clear reset status flag
commite17b9f20daupstream. Clear reset status flag, to keep error status register clean after reset (ad3552r manual, rev B table 38). Reset error flag was left to 1, so debugging registers, the "Error Status Register" was dirty (0x01). It is important to clear this bit, so if there is any reset event over normal working mode, it is possible to detect it. Fixes:8f2b54824b("drivers:iio:dac: Add AD3552R driver support") Signed-off-by: Angelo Dureghello <adureghello@baylibre.com> Link: https://patch.msgid.link/20250125-wip-bl-ad3552r-clear-reset-v2-1-aa3a27f3ff8c@baylibre.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
82d94af456
commit
12012d4324
@@ -703,6 +703,12 @@ static int ad3552r_reset(struct ad3552r_desc *dac)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Clear reset error flag, see ad3552r manual, rev B table 38. */
|
||||
ret = ad3552r_write_reg(dac, AD3552R_REG_ADDR_ERR_STATUS,
|
||||
AD3552R_MASK_RESET_STATUS);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return ad3552r_update_reg_field(dac,
|
||||
addr_mask_map[AD3552R_ADDR_ASCENSION][0],
|
||||
addr_mask_map[AD3552R_ADDR_ASCENSION][1],
|
||||
|
||||
Reference in New Issue
Block a user