コード例 #1
0
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;
}
コード例 #2
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;
}
コード例 #3
0
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);
}
コード例 #4
0
ファイル: tscore.c プロジェクト: 32743069/amlogic_common_3050
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;
}