qcom: qnovo: Fix PCURx reporting error
PCURx[MSB:LSB] is a 14-bit signed raw data, but treated as two full bytes
during reg reading, as a result bit 14 and 15 are filled with 0s. When
the raw data is negative, the mistreated reading gives positive result.
Hence the eventual PCURx after applying the gain and offset corrections
is incorrect.
Fix it by extending sign bit when negative.
Change-Id: Ia35406809355bd5e2d6cfeb890dd870430e38f66
Signed-off-by:
Harry Yang <harryy@codeaurora.org>
Loading
Please register or sign in to comment