init_input_dev(&ts->dev); 
input_dev->name = "H3600 TouchScreen"; input_dev->phys = ts->phys; input_dev->id.bustype = BUS_RS232; input_dev->id.vendor = SERIO_H3600; input_dev->id.product = 0x0666;  /* FIXME !!! We can ask the hardware */ input_dev->id.version = 0x0100; input_dev->cdev.dev = &serio->dev; input_dev->private = ts;  input_dev->event = h3600ts_event;  input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_LED) | BIT(EV_PWR); input_dev->ledbit[0] = BIT(LED_SLEEP); input_set_abs_params(input_dev, ABS_X, 60, 985, 0, 0); input_set_abs_params(input_dev, ABS_Y, 35, 1024, 0, 0);  set_bit(KEY_RECORD, input_dev->keybit); set_bit(KEY_Q, input_dev->keybit); set_bit(KEY_PROG1, input_dev->keybit); set_bit(KEY_PROG2, input_dev->keybit); set_bit(KEY_PROG3, input_dev->keybit); set_bit(KEY_UP, input_dev->keybit); set_bit(KEY_RIGHT, input_dev->keybit); set_bit(KEY_LEFT, input_dev->keybit); set_bit(KEY_DOWN, input_dev->keybit); set_bit(KEY_ENTER, input_dev->keybit); set_bit(KEY_SUSPEND, input_dev->keybit); set_bit(BTN_TOUCH, input_dev->keybit); 
static int h3600ts_connect(struct serio *serio, struct serio_driver *drv){	struct h3600_dev *ts;	int err;	if (!(ts = kmalloc(sizeof(struct h3600_dev), GFP_KERNEL)))		return -ENOMEM;	memset(ts, 0, sizeof(struct h3600_dev));	init_input_dev(&ts->dev);	/* Device specific stuff */	set_GPIO_IRQ_edge(GPIO_BITSY_ACTION_BUTTON, GPIO_BOTH_EDGES);	set_GPIO_IRQ_edge(GPIO_BITSY_NPOWER_BUTTON, GPIO_RISING_EDGE);	if (request_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, action_button_handler,			SA_SHIRQ | SA_INTERRUPT | SA_SAMPLE_RANDOM,			"h3600_action", &ts->dev)) {		printk(KERN_ERR "h3600ts.c: Could not allocate Action Button IRQ!\n");		kfree(ts);		return -EBUSY;	}	if (request_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, npower_button_handler,			SA_SHIRQ | SA_INTERRUPT | SA_SAMPLE_RANDOM,			"h3600_suspend", &ts->dev)) {		free_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, &ts->dev);		printk(KERN_ERR "h3600ts.c: Could not allocate Power Button IRQ!\n");		kfree(ts);		return -EBUSY;	}	/* Now we have things going we setup our input device */	ts->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_LED) | BIT(EV_PWR);	ts->dev.ledbit[0] = BIT(LED_SLEEP);	input_set_abs_params(&ts->dev, ABS_X, 60, 985, 0, 0);	input_set_abs_params(&ts->dev, ABS_Y, 35, 1024, 0, 0);	set_bit(KEY_RECORD, ts->dev.keybit);	set_bit(KEY_Q, ts->dev.keybit);	set_bit(KEY_PROG1, ts->dev.keybit);	set_bit(KEY_PROG2, ts->dev.keybit);	set_bit(KEY_PROG3, ts->dev.keybit);	set_bit(KEY_UP, ts->dev.keybit);	set_bit(KEY_RIGHT, ts->dev.keybit);	set_bit(KEY_LEFT, ts->dev.keybit);	set_bit(KEY_DOWN, ts->dev.keybit);	set_bit(KEY_ENTER, ts->dev.keybit);	ts->dev.keybit[LONG(BTN_TOUCH)] |= BIT(BTN_TOUCH);	ts->dev.keybit[LONG(KEY_SUSPEND)] |= BIT(KEY_SUSPEND);	ts->serio = serio;	sprintf(ts->phys, "%s/input0", serio->phys);	ts->dev.event = h3600ts_event;	ts->dev.private = ts;	ts->dev.name = h3600_name;	ts->dev.phys = ts->phys;	ts->dev.id.bustype = BUS_RS232;	ts->dev.id.vendor = SERIO_H3600;	ts->dev.id.product = 0x0666;  /* FIXME !!! We can ask the hardware */	ts->dev.id.version = 0x0100;	serio_set_drvdata(serio, ts);	err = serio_open(serio, drv);	if (err) {		free_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, ts);		free_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, ts);		serio_set_drvdata(serio, NULL);		kfree(ts);		return err;	}	//h3600_flite_control(1, 25);     /* default brightness */#ifdef CONFIG_PM	ts->pm_dev = pm_register(PM_ILLUMINATION_DEV, PM_SYS_LIGHT,				h3600ts_pm_callback);	printk("registered pm callback\n");#endif	input_register_device(&ts->dev);	printk(KERN_INFO "input: %s on %s\n", h3600_name, serio->phys);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/eca1ed196cd5b523c1057204cd3672555ad58dfe/h3600_ts_input.c/clean/drivers/input/touchscreen/h3600_ts_input.c