Lines Matching refs:phampshire

57 static void hampshire_process_data(struct hampshire *phampshire)  in hampshire_process_data()  argument
59 struct input_dev *dev = phampshire->dev; in hampshire_process_data()
61 if (HAMPSHIRE_FORMAT_LENGTH == ++phampshire->idx) { in hampshire_process_data()
62 input_report_abs(dev, ABS_X, HAMPSHIRE_GET_XC(phampshire->data)); in hampshire_process_data()
63 input_report_abs(dev, ABS_Y, HAMPSHIRE_GET_YC(phampshire->data)); in hampshire_process_data()
65 HAMPSHIRE_GET_TOUCHED(phampshire->data)); in hampshire_process_data()
68 phampshire->idx = 0; in hampshire_process_data()
75 struct hampshire *phampshire = serio_get_drvdata(serio); in hampshire_interrupt() local
77 phampshire->data[phampshire->idx] = data; in hampshire_interrupt()
79 if (HAMPSHIRE_RESPONSE_BEGIN_BYTE & phampshire->data[0]) in hampshire_interrupt()
80 hampshire_process_data(phampshire); in hampshire_interrupt()
83 phampshire->data[0]); in hampshire_interrupt()
90 struct hampshire *phampshire = serio_get_drvdata(serio); in hampshire_disconnect() local
92 input_get_device(phampshire->dev); in hampshire_disconnect()
93 input_unregister_device(phampshire->dev); in hampshire_disconnect()
96 input_put_device(phampshire->dev); in hampshire_disconnect()
97 kfree(phampshire); in hampshire_disconnect()
108 struct hampshire *phampshire; in hampshire_connect() local
112 phampshire = kzalloc(sizeof(struct hampshire), GFP_KERNEL); in hampshire_connect()
114 if (!phampshire || !input_dev) { in hampshire_connect()
119 phampshire->serio = serio; in hampshire_connect()
120 phampshire->dev = input_dev; in hampshire_connect()
121 snprintf(phampshire->phys, sizeof(phampshire->phys), in hampshire_connect()
125 input_dev->phys = phampshire->phys; in hampshire_connect()
133 input_set_abs_params(phampshire->dev, ABS_X, in hampshire_connect()
135 input_set_abs_params(phampshire->dev, ABS_Y, in hampshire_connect()
138 serio_set_drvdata(serio, phampshire); in hampshire_connect()
144 err = input_register_device(phampshire->dev); in hampshire_connect()
153 kfree(phampshire); in hampshire_connect()