Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260758
b: refs/heads/master
c: c7b4a5d
h: refs/heads/master
v: v3
  • Loading branch information
Jiejing Zhang authored and Dmitry Torokhov committed Jun 29, 2011
1 parent f9a6f52 commit e8502d0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 631b16e81eab82e2894425a94c3fc14bf21adb26
refs/heads/master: c7b4a5d58bffdf3aa7f923319643af0ebf925515
16 changes: 12 additions & 4 deletions trunk/drivers/input/keyboard/mpr121_touchkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@
* enabled capacitance sensing inputs and its run/suspend mode.
*/
#define ELECTRODE_CONF_ADDR 0x5e
#define ELECTRODE_CONF_QUICK_CHARGE 0x80
#define AUTO_CONFIG_CTRL_ADDR 0x7b
#define AUTO_CONFIG_USL_ADDR 0x7d
#define AUTO_CONFIG_LSL_ADDR 0x7e
#define AUTO_CONFIG_TL_ADDR 0x7f

/* Threshold of touch/release trigger */
#define TOUCH_THRESHOLD 0x0f
#define RELEASE_THRESHOLD 0x0a
#define TOUCH_THRESHOLD 0x08
#define RELEASE_THRESHOLD 0x05
/* Masks for touch and release triggers */
#define TOUCH_STATUS_MASK 0xfff
/* MPR121 has 12 keys */
Expand Down Expand Up @@ -127,7 +128,7 @@ static int __devinit mpr121_phys_init(const struct mpr121_platform_data *pdata,
struct i2c_client *client)
{
const struct mpr121_init_register *reg;
unsigned char usl, lsl, tl;
unsigned char usl, lsl, tl, eleconf;
int i, t, vdd, ret;

/* Set up touch/release threshold for ele0-ele11 */
Expand Down Expand Up @@ -163,8 +164,15 @@ static int __devinit mpr121_phys_init(const struct mpr121_platform_data *pdata,
ret = i2c_smbus_write_byte_data(client, AUTO_CONFIG_USL_ADDR, usl);
ret |= i2c_smbus_write_byte_data(client, AUTO_CONFIG_LSL_ADDR, lsl);
ret |= i2c_smbus_write_byte_data(client, AUTO_CONFIG_TL_ADDR, tl);

/*
* Quick charge bit will let the capacitive charge to ready
* state quickly, or the buttons may not function after system
* boot.
*/
eleconf = mpr121->keycount | ELECTRODE_CONF_QUICK_CHARGE;
ret |= i2c_smbus_write_byte_data(client, ELECTRODE_CONF_ADDR,
mpr121->keycount);
eleconf);
if (ret != 0)
goto err_i2c_write;

Expand Down

0 comments on commit e8502d0

Please sign in to comment.