You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
drivers: sensor: tmp1075: add support for fractional threshold values
Previously, the TMP1075 driver only used the integer part (val1) of the
sensor_value when setting TLOW and THIGH thresholds. This limited the
precision of temperature threshold configuration and could be insufficient
in applications requiring fine-grained control.
This patch adds proper handling for the fractional part (val2) by encoding
it into bits [7:4] of the 12-bit temperature register according to the
TMP1075 datasheet. The decoding logic in get_threshold_attribute() is also
updated to recover the fractional value accurately.
Signed-off-by: Hank Wang <wanghanchi2000@gmail.com>
0 commit comments