Lines Matching refs:tr
45 struct tr { struct
56 struct tr *tr = serio_get_drvdata(serio); in tr_interrupt() argument
57 struct input_dev *dev = tr->dev; in tr_interrupt()
59 tr->data[tr->idx] = data; in tr_interrupt()
61 if ((tr->data[0] & TR_FORMAT_STATUS_MASK) == TR_FORMAT_STATUS_BYTE) { in tr_interrupt()
62 if (++tr->idx == TR_LENGTH) { in tr_interrupt()
64 (tr->data[1] << 5) | (tr->data[2] >> 1)); in tr_interrupt()
66 (tr->data[3] << 5) | (tr->data[4] >> 1)); in tr_interrupt()
68 tr->data[0] & TR_FORMAT_TOUCH_BIT); in tr_interrupt()
70 tr->idx = 0; in tr_interrupt()
83 struct tr *tr = serio_get_drvdata(serio); in tr_disconnect() local
85 input_get_device(tr->dev); in tr_disconnect()
86 input_unregister_device(tr->dev); in tr_disconnect()
89 input_put_device(tr->dev); in tr_disconnect()
90 kfree(tr); in tr_disconnect()
101 struct tr *tr; in tr_connect() local
105 tr = kzalloc(sizeof(*tr), GFP_KERNEL); in tr_connect()
107 if (!tr || !input_dev) { in tr_connect()
112 tr->serio = serio; in tr_connect()
113 tr->dev = input_dev; in tr_connect()
114 snprintf(tr->phys, sizeof(tr->phys), "%s/input0", serio->phys); in tr_connect()
117 input_dev->phys = tr->phys; in tr_connect()
125 input_set_abs_params(tr->dev, ABS_X, TR_MIN_XC, TR_MAX_XC, 0, 0); in tr_connect()
126 input_set_abs_params(tr->dev, ABS_Y, TR_MIN_YC, TR_MAX_YC, 0, 0); in tr_connect()
128 serio_set_drvdata(serio, tr); in tr_connect()
134 err = input_register_device(tr->dev); in tr_connect()
143 kfree(tr); in tr_connect()