fix bug in getting the calibration result
authorPeter Li <a0220410@ti.com>
Mon, 24 Apr 2017 09:59:45 +0000 (17:59 +0800)
committerPeter Li <a0220410@ti.com>
Mon, 24 Apr 2017 09:59:45 +0000 (17:59 +0800)
drv2624.c

index 502ce00aa95ec5e4dbfb04b8cc79171b4a178af5..07fc7c715b6c9278501bf75bba504dfbd1385cee 100755 (executable)
--- a/drv2624.c
+++ b/drv2624.c
@@ -305,7 +305,7 @@ static int drv2624_get_calibration_result(struct drv2624_data *pDRV2624, unsigne
                        goto end;
                pDRV2624->mAutoCalResult.mnCalBemf = nResult;
 
-               nResult = drv2624_reg_read(pDRV2624, DRV2624_REG_CAL_COMP) & BEMFGAIN_MASK;
+               nResult = drv2624_reg_read(pDRV2624, DRV2624_REG_LOOP_CONTROL) & BEMFGAIN_MASK;
                if (nResult < 0)
                        goto end;
                pDRV2624->mAutoCalResult.mnCalGain = nResult;