@@ -284,7 +284,13 @@ static int __devinit qt2160_configure_device(struct i2c_client *client,
int error = 0;
/* perform software reset and wait for at least 32ms */
- i2c_smbus_write_byte_data(client, QT2160_CMD_RESET, 0xFF);
+ if (pdata->setrst) {
+ pdata->setrst(pdata->data, 0);
+ udelay(10);
+ pdata->setrst(pdata->data, 1);
+ } else {
+ i2c_smbus_write_byte_data(client, QT2160_CMD_RESET, 0xFF);
+ }
msleep(200);
/* perform dummy write to reset I2C state */
@@ -10,6 +10,7 @@
* @data: private data for lowlevel IO abstraction routines
* @getchange: return 0 when CHANGE pin is active/low; return 1 when CHANGE pin
* is deactivated/high
+ * @setrst: 0 activates RESET pin; 1 deactivates RESET pin
* @slider_length: number of keys to use as slider, max 8 keys, min 2 keys
* @slider_axis: absolute axis type, value 0 is ABS_X
* @keycodes: key codes for keys that are part of the slider are ignored; slider
@@ -26,6 +27,7 @@
struct qt2160_info {
void *data;
int (*getchange) (void *data);
+ void (*setrst) (void *data, int state);
unsigned char slider_length;
unsigned int slider_axis;
unsigned short keycodes[QT2160_MAXKEYS];