mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
aw869x: Set default playing rate for ram and rtp mode
Set 12K for rtp mode playing and 48K for ram playing Change-Id: I1485589cddf2f9dd2a220017b220cf214ed18d82 Signed-off-by: yangjq <yangjq@lenovo.com> Reviewed-on: https://gerrit.mot.com/1208742 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Guobin Zhang <zhanggb@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
775bfee7af
commit
c35d7d09d5
1 changed files with 5 additions and 1 deletions
|
|
@ -755,7 +755,8 @@ static void rtp_work_routine(struct work_struct *work)
|
|||
struct aw869x *aw869x = container_of(work, struct aw869x, rtp_work);
|
||||
|
||||
aw869x_haptic_play_mode(aw869x, AW869X_HAPTIC_RTP_MODE);
|
||||
aw869x_i2c_write_bits(aw869x, AW869X_REG_SYSCTRL,
|
||||
aw869x_i2c_write(aw869x, AW869X_REG_PWMDBG, 0x61); // 12K PWM
|
||||
aw869x_i2c_write_bits(aw869x, AW869X_REG_SYSCTRL,
|
||||
AW869X_BIT_SYSCTRL_WORK_MODE_MASK, AW869X_BIT_SYSCTRL_ACTIVE);
|
||||
msleep(2);
|
||||
#ifdef AW869X_HAPTIC_VBAT_MONITOR
|
||||
|
|
@ -1216,6 +1217,8 @@ static ssize_t aw869x_duration_store(struct device *dev,
|
|||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
pr_info("%s: value=%d\n", __FUNCTION__, val);
|
||||
|
||||
/* setting 0 on duration is NOP for now */
|
||||
if (val <= 0)
|
||||
return count;
|
||||
|
|
@ -1692,6 +1695,7 @@ static void vibrator_work_routine(struct work_struct *work)
|
|||
if(aw869x->state) {
|
||||
//aw869x_haptic_set_repeat_que_seq(aw869x, aw869x->index);
|
||||
aw869x_haptic_play_mode(aw869x, AW869X_HAPTIC_RAM_MODE);
|
||||
aw869x_i2c_write(aw869x, AW869X_REG_PWMDBG, 0x01); // 48K PWM
|
||||
aw869x_haptic_set_repeat_seq(aw869x, 1);
|
||||
aw869x_haptic_start(aw869x);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue