taos               63 drivers/i2c/busses/i2c-taos-evm.c 	struct taos_data *taos = serio_get_drvdata(serio);
taos               68 drivers/i2c/busses/i2c-taos-evm.c 	p = taos->buffer;
taos               72 drivers/i2c/busses/i2c-taos-evm.c 	if (addr != taos->addr)
taos               94 drivers/i2c/busses/i2c-taos-evm.c 	dev_dbg(&adapter->dev, "Command buffer: %s\n", taos->buffer);
taos               95 drivers/i2c/busses/i2c-taos-evm.c 	for (p = taos->buffer; *p; p++)
taos               98 drivers/i2c/busses/i2c-taos-evm.c 	taos->addr = addr;
taos              101 drivers/i2c/busses/i2c-taos-evm.c 	taos->pos = 0;
taos              102 drivers/i2c/busses/i2c-taos-evm.c 	taos->state = TAOS_STATE_RECV;
taos              104 drivers/i2c/busses/i2c-taos-evm.c 	wait_event_interruptible_timeout(wq, taos->state == TAOS_STATE_IDLE,
taos              106 drivers/i2c/busses/i2c-taos-evm.c 	if (taos->state != TAOS_STATE_IDLE
taos              107 drivers/i2c/busses/i2c-taos-evm.c 	 || taos->pos != 5) {
taos              109 drivers/i2c/busses/i2c-taos-evm.c 			taos->pos);
taos              112 drivers/i2c/busses/i2c-taos-evm.c 	dev_dbg(&adapter->dev, "Answer buffer: %s\n", taos->buffer);
taos              115 drivers/i2c/busses/i2c-taos-evm.c 	p = taos->buffer + 1;
taos              152 drivers/i2c/busses/i2c-taos-evm.c 	struct taos_data *taos = serio_get_drvdata(serio);
taos              154 drivers/i2c/busses/i2c-taos-evm.c 	switch (taos->state) {
taos              156 drivers/i2c/busses/i2c-taos-evm.c 		taos->buffer[taos->pos++] = data;
taos              158 drivers/i2c/busses/i2c-taos-evm.c 		 || taos->pos == TAOS_BUFFER_SIZE - 1) {
taos              159 drivers/i2c/busses/i2c-taos-evm.c 			taos->buffer[taos->pos] = '\0';
taos              160 drivers/i2c/busses/i2c-taos-evm.c 			taos->state = TAOS_STATE_IDLE;
taos              165 drivers/i2c/busses/i2c-taos-evm.c 		taos->state = TAOS_STATE_IDLE;
taos              169 drivers/i2c/busses/i2c-taos-evm.c 		taos->buffer[taos->pos++] = data;
taos              171 drivers/i2c/busses/i2c-taos-evm.c 			taos->buffer[taos->pos] = '\0';
taos              172 drivers/i2c/busses/i2c-taos-evm.c 			taos->state = TAOS_STATE_IDLE;
taos              201 drivers/i2c/busses/i2c-taos-evm.c 	struct taos_data *taos;
taos              206 drivers/i2c/busses/i2c-taos-evm.c 	taos = kzalloc(sizeof(struct taos_data), GFP_KERNEL);
taos              207 drivers/i2c/busses/i2c-taos-evm.c 	if (!taos) {
taos              211 drivers/i2c/busses/i2c-taos-evm.c 	taos->state = TAOS_STATE_INIT;
taos              212 drivers/i2c/busses/i2c-taos-evm.c 	serio_set_drvdata(serio, taos);
taos              218 drivers/i2c/busses/i2c-taos-evm.c 	adapter = &taos->adapter;
taos              226 drivers/i2c/busses/i2c-taos-evm.c 	wait_event_interruptible_timeout(wq, taos->state == TAOS_STATE_IDLE,
taos              229 drivers/i2c/busses/i2c-taos-evm.c 	if (taos->state != TAOS_STATE_IDLE) {
taos              232 drivers/i2c/busses/i2c-taos-evm.c 			"pos=%d)\n", taos->state, taos->pos);
taos              236 drivers/i2c/busses/i2c-taos-evm.c 	name = taos_adapter_name(taos->buffer);
taos              245 drivers/i2c/busses/i2c-taos-evm.c 	taos->state = TAOS_STATE_EOFF;
taos              248 drivers/i2c/busses/i2c-taos-evm.c 	wait_event_interruptible_timeout(wq, taos->state == TAOS_STATE_IDLE,
taos              250 drivers/i2c/busses/i2c-taos-evm.c 	if (taos->state != TAOS_STATE_IDLE) {
taos              253 drivers/i2c/busses/i2c-taos-evm.c 			"(state=%d)\n", taos->state);
taos              262 drivers/i2c/busses/i2c-taos-evm.c 	taos->client = taos_instantiate_device(adapter);
taos              268 drivers/i2c/busses/i2c-taos-evm.c 	kfree(taos);
taos              275 drivers/i2c/busses/i2c-taos-evm.c 	struct taos_data *taos = serio_get_drvdata(serio);
taos              277 drivers/i2c/busses/i2c-taos-evm.c 	i2c_unregister_device(taos->client);
taos              278 drivers/i2c/busses/i2c-taos-evm.c 	i2c_del_adapter(&taos->adapter);
taos              280 drivers/i2c/busses/i2c-taos-evm.c 	kfree(taos);