board/freescale/vid: Add correction for ltc3882 read error.
authorPriyanka Jain <priyanka.jain@nxp.com>
Thu, 11 Oct 2018 05:11:23 +0000 (05:11 +0000)
committerYork Sun <york.sun@nxp.com>
Thu, 6 Dec 2018 22:37:19 +0000 (14:37 -0800)
commitdf182a42a45a1db76a4e0a3346947e31f70dc26a
treecfd8ea434a141781a10669c761e8c111ad48ae4e
parent4c9d4a75f12f9ae7a1164f62cee532ef7a48e5f5
board/freescale/vid: Add correction for ltc3882 read error.

Voltage regulator LTC3882 device has 0.5% voltage read error.
So for NXP SoC devices this generally equates to 2mV

Update set_voltage_to_LTC for below:
1.Add coorection of upto 2mV in voltage comparison
  to take care of voltage read error of voltage regulator
2.Add loop max count kept as 100 to avoid infinte loop.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
board/freescale/common/vid.c