int ct36x_ts_suspend(struct i2c_client *client, pm_message_t mesg) { struct ct36x_ts_info *ts; unsigned char iter; if (CT36X_TS_CORE_DEBUG) printk(">>>>> %s() called <<<<< \n", __FUNCTION__); ts = (struct ct36x_ts_info *)i2c_get_clientdata(client); if ( ts->state == CT36X_STATE_NORMAL ) { disable_irq(ts->irq); cancel_work_sync(&ts->event_work); ct36x_chip_go_sleep(client, ts->data.buf); ts->state = CT36X_STATE_SLEEP; } for ( iter = 0; iter < CT36X_TS_POINT_NUM; iter++ ) { input_mt_slot(ts->input,iter); input_mt_report_slot_state(ts->input, MT_TOOL_FINGER, false); } input_sync(ts->input); return 0; }
static int ct363_suspend(struct ct36x_data *ts) { int ret = 0; ret = ct36x_chip_go_sleep(ts); if(ret < 0) dev_warn(ts->dev, "CT363 chip: failed to go to sleep\n"); return ret; }
void ct36x_ts_shutdown(struct i2c_client *client) { struct ct36x_ts_info *ts; if (CT36X_TS_CORE_DEBUG) printk(">>>>> %s() called <<<<< \n", __FUNCTION__); ts = (struct ct36x_ts_info *)i2c_get_clientdata(client); ct36x_chip_go_sleep(client, ts->data.buf); }
int ct36x_ts_suspend(struct i2c_client *client, pm_message_t mesg) { struct ct36x_ts_info *ts; if (CT36X_TS_CORE_DEBUG) printk(">>>>> %s() called <<<<< \n", __FUNCTION__); ts = (struct ct36x_ts_info *)i2c_get_clientdata(client); if ( ts->state == CT36X_STATE_NORMAL ) { disable_irq(ts->irq); cancel_work_sync(&ts->event_work); ct36x_chip_go_sleep(client, ts->data.buf); ts->state = CT36X_STATE_SLEEP; } return 0; }