mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
fixup! (CR) drv8424_mmi: motor slippage recovery
Fixing missed condition for running in no sensors mode Mot-CRs-fixed: (CR) Signed-off-by: Konstantin Makariev <hcv867@motorola.com> Change-Id: I2b7bb40a38c432f301d4b1a3a3742bb0d26cfafb Reviewed-on: https://gerrit.mot.com/2371667 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Qing Chang <qing@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
6b1f9f94b2
commit
6b1eef402a
1 changed files with 10 additions and 3 deletions
|
|
@ -1154,6 +1154,11 @@ static enum hrtimer_restart motor_timeout_timer_action(struct hrtimer *h)
|
|||
int destination = atomic_read(&md->destination);
|
||||
enum hrtimer_restart ret = HRTIMER_NORESTART;
|
||||
|
||||
if (md->sensors_off) {
|
||||
dev_warn(md->dev, "time out in no sensors mode!\n");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (POSITION_RANGE_CHK(original) &&
|
||||
POSITION_RANGE_CHK(destination)) {
|
||||
LOGD("Timeout: position=%s, detection=%s\n",
|
||||
|
|
@ -1180,7 +1185,7 @@ static enum hrtimer_restart motor_timeout_timer_action(struct hrtimer *h)
|
|||
LOGD("Timeout position detection\n");
|
||||
}
|
||||
moto_drv8424_cmd_push(md, CMD_TIMEOUT, INT_50MS);
|
||||
|
||||
exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -2088,8 +2093,10 @@ static ssize_t motor_sensor_data_store(struct device *dev, struct device_attribu
|
|||
*/
|
||||
if (md->sensor_data[0] == UNINITIALIZED) {
|
||||
inited = true;
|
||||
md->time_out = MOTOR_DETECT_EXPIRE;
|
||||
moto_drv8424_cmd_push(md, CMD_TIMER_START, 0);
|
||||
if (!md->sensors_off) {
|
||||
md->time_out = MOTOR_DETECT_EXPIRE;
|
||||
moto_drv8424_cmd_push(md, CMD_TIMER_START, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* store necessary sensor info */
|
||||
|
|
|
|||
Loading…
Reference in a new issue