From: xuwei9 Date: Thu, 13 Dec 2018 08:51:40 +0000 (+0800) Subject: kernel: enable moto vibrator feature X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dfdcbfff8807cbde7965222c9c48488650cdcc31;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git kernel: enable moto vibrator feature Enable moto vibrator feature Change-Id: Ia68768574e9a81531ee051884522769eb3eae899 Signed-off-by: xuwei9 Reviewed-on: https://gerrit.mot.com/1282533 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- diff --git a/drivers/misc/aw8695_haptic/aw8695.c b/drivers/misc/aw8695_haptic/aw8695.c index d2353f4e183a..dc2706e3dac1 100755 --- a/drivers/misc/aw8695_haptic/aw8695.c +++ b/drivers/misc/aw8695_haptic/aw8695.c @@ -1974,7 +1974,7 @@ static ssize_t aw8695_duration_store(struct device *dev, return count; aw8695->duration = val; - +printk(KERN_ERR "david %s,duration:%d\n",__func__,val); return count; } @@ -2260,7 +2260,7 @@ static ssize_t aw8695_seq_store(struct device *dev, return rc; pr_debug("%s: value=%x\n", __FUNCTION__, val); - + printk(KERN_ERR "david %s seq value:%d\n",__func__,val); mutex_lock(&aw8695->lock); for(i=0; i<4; i++) { aw8695->seq[i] = (val>>((AW8695_WAV_SEQ_SIZE-i-1)*8))&0xFF; diff --git a/drivers/misc/aw8695_haptic/aw8695.h b/drivers/misc/aw8695_haptic/aw8695.h index 6a457094d568..47cebfb04cb8 100755 --- a/drivers/misc/aw8695_haptic/aw8695.h +++ b/drivers/misc/aw8695_haptic/aw8695.h @@ -54,13 +54,13 @@ #define AW8695_VBAT_MAX 4500 /* motor config */ -//#define LRA_0619 -#define LRA_0832 +#define LRA_0619 +//#define LRA_0832 #ifdef LRA_0619 #define AW8695_HAPTIC_F0_PRE 1700 // 170Hz #define AW8695_HAPTIC_F0_CALI_PERCEN 7 // -7%~7% -#define AW8695_HAPTIC_CONT_DRV_LVL 105 // 105*6.1/256=2.50v +#define AW8695_HAPTIC_CONT_DRV_LVL 98 // 105*6.1/256=2.50v #define AW8695_HAPTIC_CONT_DRV_LVL_OV 125 // 125*6.1/256=2.98v #define AW8695_HAPTIC_CONT_TD 0x009a #define AW8695_HAPTIC_CONT_ZC_THR 0x0ff1 @@ -68,7 +68,7 @@ #endif #ifdef LRA_0832 -#define AW8695_HAPTIC_F0_PRE 2350 // 235Hz +#define AW8695_HAPTIC_F0_PRE 2350 // 170Hz #define AW8695_HAPTIC_F0_CALI_PERCEN 7 // -7%~7% #define AW8695_HAPTIC_CONT_DRV_LVL 98 // 98*6.1/256=2.33v #define AW8695_HAPTIC_CONT_DRV_LVL_OV 98 // 98*6.1/256=2.33v