Skip to content

Commit 9948b7a

Browse files
committed
hw-mgmt: sensor: Fix for unexpected negative vout_min on lm5066i
By default in lm5066i VOUT_UV_WARN_LIMIT registrer == 0. Because of issue in driver calculation formula it trasnsforms to -0.11V instead of 0, which is not reasonable. It can be fixed by writing 0 to *_in2_min sysfs attribute. Bug: 4264364 Signed-off-by: Oleksandr Shamray <[email protected]>
1 parent b6eb67c commit 9948b7a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

usr/usr/bin/hw-management-chassis-events.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,17 @@ if [ "$1" == "add" ]; then
973973
done
974974
;;
975975
esac
976+
# WA for fix negative vout_min value in lm5066i sensor
977+
dev_name=$(cat "$3""$4"/name)
978+
if [ "$dev_name" == "lm5066i" ]; then
979+
if [ -f $environment_path/"$prefix"_in2_min ]; then
980+
val=$(cat $environment_path/"$prefix"_in2_min)
981+
# check if Vout min is negative and fix it
982+
if [[ $val == -* ]]; then
983+
echo 0 > $environment_path/"$prefix"_in2_min
984+
fi
985+
fi
986+
fi
976987
fi
977988
if [ "$2" == "led" ]; then
978989
# Detect if it belongs to line card or to main board.

0 commit comments

Comments
 (0)