Lines Matching refs:phampshire
62 static void hampshire_process_data(struct hampshire *phampshire) in hampshire_process_data() argument
64 struct input_dev *dev = phampshire->dev; in hampshire_process_data()
66 if (HAMPSHIRE_FORMAT_LENGTH == ++phampshire->idx) { in hampshire_process_data()
67 input_report_abs(dev, ABS_X, HAMPSHIRE_GET_XC(phampshire->data)); in hampshire_process_data()
68 input_report_abs(dev, ABS_Y, HAMPSHIRE_GET_YC(phampshire->data)); in hampshire_process_data()
70 HAMPSHIRE_GET_TOUCHED(phampshire->data)); in hampshire_process_data()
73 phampshire->idx = 0; in hampshire_process_data()
80 struct hampshire *phampshire = serio_get_drvdata(serio); in hampshire_interrupt() local
82 phampshire->data[phampshire->idx] = data; in hampshire_interrupt()
84 if (HAMPSHIRE_RESPONSE_BEGIN_BYTE & phampshire->data[0]) in hampshire_interrupt()
85 hampshire_process_data(phampshire); in hampshire_interrupt()
88 phampshire->data[0]); in hampshire_interrupt()
95 struct hampshire *phampshire = serio_get_drvdata(serio); in hampshire_disconnect() local
97 input_get_device(phampshire->dev); in hampshire_disconnect()
98 input_unregister_device(phampshire->dev); in hampshire_disconnect()
101 input_put_device(phampshire->dev); in hampshire_disconnect()
102 kfree(phampshire); in hampshire_disconnect()
113 struct hampshire *phampshire; in hampshire_connect() local
117 phampshire = kzalloc(sizeof(struct hampshire), GFP_KERNEL); in hampshire_connect()
119 if (!phampshire || !input_dev) { in hampshire_connect()
124 phampshire->serio = serio; in hampshire_connect()
125 phampshire->dev = input_dev; in hampshire_connect()
126 snprintf(phampshire->phys, sizeof(phampshire->phys), in hampshire_connect()
130 input_dev->phys = phampshire->phys; in hampshire_connect()
138 input_set_abs_params(phampshire->dev, ABS_X, in hampshire_connect()
140 input_set_abs_params(phampshire->dev, ABS_Y, in hampshire_connect()
143 serio_set_drvdata(serio, phampshire); in hampshire_connect()
149 err = input_register_device(phampshire->dev); in hampshire_connect()
158 kfree(phampshire); in hampshire_connect()