1 #include <linux/input.h>
2 #include <linux/module.h>
10 #define MODNAME "hp680_ts_input"
12 #define HP680_TS_ABS_X_MIN 40
13 #define HP680_TS_ABS_X_MAX 950
14 #define HP680_TS_ABS_Y_MIN 80
15 #define HP680_TS_ABS_Y_MAX 910
17 #define PHDR 0xa400012e
18 #define SCPDR 0xa4000136
22 static struct input_dev *hp680_ts_dev;
27 int absx = 0, absy = 0;
57 input_report_key(hp680_ts_dev,
BTN_TOUCH, 1);
58 input_report_abs(hp680_ts_dev,
ABS_X, absx);
59 input_report_abs(hp680_ts_dev,
ABS_Y, absy);
61 input_report_key(hp680_ts_dev,
BTN_TOUCH, 0);
64 input_sync(hp680_ts_dev);
76 static int __init hp680_ts_init(
void)
80 hp680_ts_dev = input_allocate_device();
87 input_set_abs_params(hp680_ts_dev,
ABS_X,
89 input_set_abs_params(hp680_ts_dev,
ABS_Y,
92 hp680_ts_dev->name =
"HP Jornada touchscreen";
93 hp680_ts_dev->phys =
"hp680_ts/input0";
103 err = input_register_device(hp680_ts_dev);
111 fail1: input_free_device(hp680_ts_dev);
115 static void __exit hp680_ts_exit(
void)
119 input_unregister_device(hp680_ts_dev);