kernel: enable moto vibrator feature
authorxuwei9 <xuwei9@lenovo.com>
Thu, 13 Dec 2018 08:51:40 +0000 (16:51 +0800)
committerxiest1 <xiest1@lenovo.com>
Tue, 5 Nov 2019 09:30:28 +0000 (17:30 +0800)
Enable moto vibrator
feature

Change-Id: Ia68768574e9a81531ee051884522769eb3eae899
Signed-off-by: xuwei9 <xuwei9@mt.com>
Reviewed-on: https://gerrit.mot.com/1282533
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key

drivers/misc/aw8695_haptic/aw8695.c
drivers/misc/aw8695_haptic/aw8695.h

index d2353f4e183aa0be85f4f1d6e52b94af7b4f8ea5..dc2706e3dac146b136c72e85cfc199b94892692f 100755 (executable)
@@ -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;
index 6a457094d5686293cbd11429d3ba06f4a79c273b..47cebfb04cb8dcb97030a51fb188e7f24f887937 100755 (executable)
 #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