示例#1
0
static void asuspec_smi(void){
	if (ec_chip->i2c_data[2] == ASUSPEC_SMI_HANDSHAKING){
		ASUSPEC_NOTICE("ASUSPEC_SMI_HANDSHAKING\n");
		if(ec_chip->status == 0){
			asuspec_chip_init(ec_chip->client);
		}
		ec_chip->ec_in_s3 = 0;
	} else if (ec_chip->i2c_data[2] == ASUSPEC_SMI_RESET){
		ASUSPEC_NOTICE("ASUSPEC_SMI_RESET\n");
		queue_delayed_work(asuspec_wq, &ec_chip->asuspec_init_work, 0);
	} else if (ec_chip->i2c_data[2] == ASUSPEC_SMI_WAKE){
		ASUSPEC_NOTICE("ASUSPEC_SMI_WAKE\n");
	}
}
示例#2
0
static void asuspec_smi(void){
	if (ec_chip->i2c_data[2] == ASUSPEC_SMI_HANDSHAKING){
		ASUSPEC_NOTICE("ASUSPEC_SMI_HANDSHAKING\n");
		if(ec_chip->status == 0){
			asuspec_chip_init(ec_chip->client);
		}
		ec_chip->ec_in_s3 = 0;
	} else if (ec_chip->i2c_data[2] == ASUSPEC_SMI_RESET){
		ASUSPEC_NOTICE("ASUSPEC_SMI_RESET\n");
		queue_delayed_work(asuspec_wq, &ec_chip->asuspec_init_work, 0);
	} else if (ec_chip->i2c_data[2] == ASUSPEC_SMI_WAKE){
		ASUSPEC_NOTICE("ASUSPEC_SMI_WAKE\n");
	} else if (ec_chip->i2c_data[2] == APOWER_SMI_S5){
		ASUSPEC_NOTICE("APOWER_POWEROFF\n");
		asuspec_switch_apower_state(APOWER_POWEROFF);
	} else if (ec_chip->i2c_data[2] == APOWER_SMI_NOTIFY_SHUTDOWN){
		ASUSPEC_NOTICE("APOWER_NOTIFY_SHUTDOWN\n");
		asuspec_switch_apower_state(APOWER_NOTIFY_SHUTDOWN);
	} else if (ec_chip->i2c_data[2] == APOWER_SMI_RESUME){
		ASUSPEC_NOTICE("APOWER_SMI_RESUME\n");
		asuspec_switch_apower_state(APOWER_RESUME);
	}
}
示例#3
0
static void asuspec_init_work_function(struct work_struct *dat)
{
	asuspec_send_ec_req();
	msleep(200);
	asuspec_chip_init(ec_chip->client);
}