From 98cbb7746515df8beb3f9035dbeb5588f62188ed Mon Sep 17 00:00:00 2001 From: yanfei Date: Tue, 20 Nov 2018 20:38:34 +0800 Subject: [PATCH] (CR):[kane][kernel]:Modify Capsensor interrupt function Modify for Capsensor interrupt function Change-Id: Iee01e71ccef1cf069e270607b68598a0ac1fea8c Signed-off-by: yanfei --- arch/arm64/boot/dts/exynos/wing-sensor.dtsi | 2 +- drivers/input/misc/sx933x.h | 56 ++++++++++----------- drivers/input/misc/sx933x_sar.c | 7 --- 3 files changed, 29 insertions(+), 36 deletions(-) diff --git a/arch/arm64/boot/dts/exynos/wing-sensor.dtsi b/arch/arm64/boot/dts/exynos/wing-sensor.dtsi index 27b4bfc06f1a..c3df88356d78 100755 --- a/arch/arm64/boot/dts/exynos/wing-sensor.dtsi +++ b/arch/arm64/boot/dts/exynos/wing-sensor.dtsi @@ -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 >; }; diff --git a/drivers/input/misc/sx933x.h b/drivers/input/misc/sx933x.h index be30c21a0b0f..59a9fd4a4370 100755 --- a/drivers/input/misc/sx933x.h +++ b/drivers/input/misc/sx933x.h @@ -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 diff --git a/drivers/input/misc/sx933x_sar.c b/drivers/input/misc/sx933x_sar.c index e28eeab7fa30..e129aec8c690 100755 --- a/drivers/input/misc/sx933x_sar.c +++ b/drivers/input/misc/sx933x_sar.c @@ -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 -- 2.20.1