(CR):[kane][kernel]:Modify Capsensor interrupt function
authoryanfei <yanfei5@huaqin.com>
Tue, 20 Nov 2018 12:38:34 +0000 (20:38 +0800)
committerxiest1 <xiest1@lenovo.com>
Tue, 5 Nov 2019 09:29:57 +0000 (17:29 +0800)
Modify for Capsensor interrupt function

Change-Id: Iee01e71ccef1cf069e270607b68598a0ac1fea8c
Signed-off-by: yanfei <yanfei5@huaqin.com>
arch/arm64/boot/dts/exynos/wing-sensor.dtsi
drivers/input/misc/sx933x.h
drivers/input/misc/sx933x_sar.c

index 27b4bfc06f1a50f15ca109638c1618c8250374ee..c3df88356d78e27c1c9e3fb7e2af1805409d7c9f 100755 (executable)
@@ -29,7 +29,7 @@
                pinctrl-0 = <&cap_int_status>;
                Semtech,button-flag = <0x0b>;
                Semtech,reg-num = <1>;
-               Semtech,reg-init = < 0x4004 0x7C >;
+               Semtech,reg-init = < 0x4004 0x64 >;
                };
 
 
index be30c21a0b0fa721927ba7907d739362d9f57853..59a9fd4a4370048f78b3c6d38d69f49b651cc85f 100755 (executable)
@@ -648,8 +648,8 @@ static const struct smtc_reg_data sx933x_i2c_reg_setup[] =
 };
 #else
 static const struct smtc_reg_data sx933x_i2c_reg_setup[] =
-{      
-       {0x4004,0x7C},
+{
+       {0x4004,0x64},
        {0x4008,0x00},
        {0x4054,0x400},
        {0x42C0,0x8000000},
@@ -660,35 +660,35 @@ static const struct smtc_reg_data sx933x_i2c_reg_setup[] =
        {0x8018,0x00},
        {0x801C,0x31},
        {0x8020,0x1F001F},
-       {0x8024,0x100088F},
-       {0x8028,0x3FFE86DE},
-       {0x802C,0x100088F},
-       {0x8030,0x3FF782CF},
-       {0x8034,0x100088F},
-       {0x8038,0x3FBF82E9},
-       {0x803C,0x100088F},
-       {0x8040,0x3DFF82C8},
-       {0x8044,0x100088F},
-       {0x8048,0x2FFF82D1},
+       {0x8024,0x300014BF},
+       {0x8028,0x3FFE86E1},
+       {0x802C,0x300014BF},
+       {0x8030,0x3FF782D2},
+       {0x8034,0x300148F},
+       {0x8038,0x3FBF82E7},
+       {0x803C,0x300148F},
+       {0x8040,0x3DFF82C7},
+       {0x8044,0x300014BF},
+       {0x8048,0x2FFF82D4},
        {0x804C,0x88E},
        {0x8050,0x80001EE6},
-       {0x8054,0x10162815},
+       {0x8054,0x10163F15},
        {0x8058,0x60600C31},
        {0x805C,0x54AC4300},
        {0x8060,0x00},
-       {0x8064,0x00},
+       {0x8064,0x8D0000},
        {0x8068,0x00},
-       {0x806C,0x00},
-       {0x8070,0x00},
-       {0x8074,0x10162815},
+       {0x806C,0x21001E},
+       {0x8070,0x20000},
+       {0x8074,0x10162515},
        {0x8078,0x60600C31},
        {0x807C,0x54AC4300},
        {0x8080,0x00},
-       {0x8084,0x00},
+       {0x8084,0x540000},
        {0x8088,0x00},
-       {0x808C,0x00},
-       {0x8090,0x00},
-       {0x8094,0x10166400},
+       {0x808C,0x1E001E},
+       {0x8090,0x20000},
+       {0x8094,0x10026400},
        {0x8098,0x60400031},
        {0x809C,0x54AC4300},
        {0x80A0,0x00},
@@ -696,15 +696,15 @@ static const struct smtc_reg_data sx933x_i2c_reg_setup[] =
        {0x80A8,0x00},
        {0x80AC,0x00},
        {0x80B0,0x00},
-       {0x80B4,0x10125F15},
-       {0x80B8,0x60600B31},
+       {0x80B4,0x18123315},
+       {0x80B8,0x60600C31},
        {0x80BC,0x54AC4300},
        {0x80C0,0x00},
-       {0x80C4,0x00},
+       {0x80C4,0x720000},
        {0x80C8,0x00},
-       {0x80CC,0x00},
-       {0x80D0,0x00},
-       {0x80D4,0x10166400},
+       {0x80CC,0x42004200},
+       {0x80D0,0x10000},
+       {0x80D4,0x10026400},
        {0x80D8,0x60400031},
        {0x80DC,0x54AC4300},
        {0x80E0,0x00},
@@ -731,7 +731,7 @@ static const struct smtc_reg_data sx933x_i2c_reg_setup[] =
        {0x8144,0x00},
        {0x8148,0x00},
        {0x814C,0x00},
-       {0x81A4,0x1C40019},
+       {0x81A4,0x1C40001},
 };
 
 #endif
index e28eeab7fa303e1696a4fe8c239c3c140d26d642..e129aec8c6901527b151769e4c1afc042766a6c7 100755 (executable)
@@ -359,7 +359,6 @@ static void read_dbg_raw(psx93XX_t this)
        sx933x_i2c_write_16bit(this, 0x81A4, uData);
        sx933x_i2c_read_16bit(this, 0x81B0, &uData);
        ref_raw = (s32)uData>>10;
-       LOG_DBG("MANT_MLB = %d REF = %d \n", ant_raw, ref_raw);
 
        //MANT__HB
        uData &= ~(0x7 << 3);
@@ -367,7 +366,6 @@ static void read_dbg_raw(psx93XX_t this)
        sx933x_i2c_write_16bit(this, 0x81A4, uData);
        sx933x_i2c_read_16bit(this, 0x81B0, &uData);
        ant_raw = (s32)uData>>10;
-       LOG_DBG("MANT__HB = %d REF = %d \n", ant_raw, ref_raw);
 
        //DIV_ANT
        uData &= ~(0x7 << 3);
@@ -383,8 +381,6 @@ static void read_dbg_raw(psx93XX_t this)
        sx933x_i2c_read_16bit(this, 0x81B0, &uData);
        ref_raw = (s32)uData>>10;
 
-       LOG_DBG("DIV_ANT = %d DIV_REF = %d \n", ant_raw, ref_raw);
-
 }
 
 static void read_rawData(psx93XX_t this)
@@ -411,8 +407,6 @@ static void read_rawData(psx93XX_t this)
                        sx933x_i2c_read_16bit(this, SX933X_OFFSETPH0_REG + index*2, &uData);
                        offset = (u16)(uData & 0x7FFF);
                        state = psmtcButtons[csx].state;
-                       LOG_DBG("[PH: %d] Useful = %d Average = %d, DIFF = %d Offset = %d state = %d \n",
-                                       csx,useful,average,diff,offset, state);
                }
        }
        read_dbg_raw(this);
@@ -1225,7 +1219,6 @@ static irqreturn_t sx93XX_irq(int irq, void *pvoid)
                this = (psx93XX_t)pvoid;
                if ((!this->get_nirq_low) || this->get_nirq_low())
                {
-                       LOG_INFO("sx93XX_irq - call sx93XX_schedule_work\n");
                        sx93XX_schedule_work(this,0);
                }
                else