static int __devexit sec_keyboard_remove(struct platform_device *pdev)
{
	struct sec_keyboard_drvdata *data = platform_get_drvdata(pdev);
	input_unregister_device(data->input_dev);
	serio_unregister_driver(&data->serio_driver);
	return 0;
}
示例#2
0
static void __exit iforce_exit(void)
{
#ifdef CONFIG_JOYSTICK_IFORCE_USB
	usb_deregister(&iforce_usb_driver);
#endif
#ifdef CONFIG_JOYSTICK_IFORCE_232
	serio_unregister_driver(&iforce_serio_drv);
#endif
}
static int __devexit dock_keyboard_remove(struct platform_device *pdev)
{
	struct dock_keyboard_platform_data *pdata = pdev->dev.platform_data;
	struct dock_keyboard_data *data = platform_get_drvdata(pdev);

	pr_debug("kbd: remove\n");

	serio_unregister_driver(&sec_dock_kbd_driver.serio_drv);

#ifdef CONFIG_HAS_EARLYSUSPEND
	unregister_early_suspend(&data->early_suspend);
#endif
	if (pdata->register_cb)
		pdata->register_cb(NULL, NULL);
	input_unregister_device(data->input_dev);
	input_free_device(data->input_dev);
	input_set_drvdata(data->input_dev, NULL);
	kfree(data);

	return 0;
}
static void __exit h3600ts_exit(void)
{
	serio_unregister_driver(&h3600ts_drv);
}
static void __exit inexio_exit(void)
{
	serio_unregister_driver(&inexio_drv);
}
示例#6
0
static void __exit tsc_exit(void)
{
	serio_unregister_driver(&tsc_drv);
}
static void __exit vsxxxaa_exit(void)
{
	serio_unregister_driver(&vsxxxaa_drv);
}
示例#8
0
static void __exit sunkbd_exit(void)
{
    serio_unregister_driver(&sunkbd_drv);
}
示例#9
0
static void __exit fujitsu_exit(void)
{
	serio_unregister_driver(&fujitsu_drv);
}
示例#10
0
static void __exit magellan_exit(void)
{
	serio_unregister_driver(&magellan_drv);
}
示例#11
0
static void __exit spaceball_exit(void)
{
	serio_unregister_driver(&spaceball_drv);
}
示例#12
0
static void __exit dynapro_exit(void)
{
	serio_unregister_driver(&dynapro_drv);
}
示例#13
0
static void __exit elo_exit(void)
{
    serio_unregister_driver(&elo_drv);
}
static void __exit taos_exit(void)
{
	serio_unregister_driver(&taos_drv);
}
示例#15
0
static void __exit gunze_exit(void)
{
	serio_unregister_driver(&gunze_drv);
}
示例#16
0
static int __devinit sec_keyboard_probe(struct platform_device *pdev)
{
	struct sec_keyboard_platform_data *pdata = pdev->dev.platform_data;
	struct sec_keyboard_drvdata *ddata;
	struct input_dev *input;
	int i, error;

	if (pdata == NULL) {
		printk(KERN_ERR "%s: no pdata\n", __func__);
		return -ENODEV;
	}

	ddata = kzalloc(sizeof(struct sec_keyboard_drvdata), GFP_KERNEL);
	if (NULL == ddata) {
		error = -ENOMEM;
		goto err_free_mem;
	}

	input = input_allocate_device();
	if (NULL == input) {
		printk(KERN_ERR "[Keyboard] failed to allocate input device.\n");
		error = -ENOMEM;
		goto err_free_mem;
	}

	ddata->input_dev = input;
	ddata->acc_power = pdata->acc_power;
	ddata->check_uart_path = pdata->check_uart_path;
	ddata->acc_int_gpio = pdata->accessory_irq_gpio;
	ddata->led_on = false;
	ddata->dockconnected = false;
	ddata->pre_connected = false;
	ddata->univ_kbd_dock = false;
	ddata->remap_key = 0;
	ddata->kl = UNKOWN_KEYLAYOUT;
	ddata->callbacks.check_keyboard_dock = check_keyboard_dock;
	if (pdata->register_cb)
		pdata->register_cb(&ddata->callbacks);
	ddata->noti_univ_kbd_dock = pdata->noti_univ_kbd_dock;

	memcpy(ddata->keycode, sec_keycodes, sizeof(sec_keycodes));

	INIT_DELAYED_WORK(&ddata->remap_dwork, sec_keyboard_remapkey);
	INIT_DELAYED_WORK(&ddata->power_dwork, sec_keyboard_power);
	INIT_DELAYED_WORK(&ddata->ack_dwork, sec_keyboard_ack);

	platform_set_drvdata(pdev, ddata);
	input_set_drvdata(input, ddata);

	input->name = pdev->name;
	input->dev.parent = &pdev->dev;
	input->id.bustype = BUS_RS232;
	input->event = sec_keyboard_event;

	__set_bit(EV_KEY, input->evbit);
	__set_bit(EV_LED, input->evbit);
	__set_bit(LED_CAPSL, input->ledbit);
	/* framework doesn't use repeat event */
	/* __set_bit(EV_REP, input->evbit); */

	for (i = 0; i < KEYBOARD_SIZE; i++) {
		if (KEY_RESERVED != ddata->keycode[i])
			input_set_capability(input, EV_KEY, ddata->keycode[i]);
	}

	/* for the UK keyboard */
	input_set_capability(input, EV_KEY, KEY_NUMERIC_POUND);

	/* for the remaped keys */
	input_set_capability(input, EV_KEY, KEY_NEXTSONG);
	input_set_capability(input, EV_KEY, KEY_PREVIOUSSONG);

	/* for the wakeup key */
	input_set_capability(input, EV_KEY, KEY_WAKEUP);

	error = input_register_device(input);
	if (error < 0) {
		printk(KERN_ERR "[Keyboard] failed to register input device.\n");
		error = -ENOMEM;
		goto err_input_allocate_device;
	}

	ddata->serio_driver.driver.name = pdev->name;
	ddata->serio_driver.id_table = sec_serio_ids;
	ddata->serio_driver.interrupt = sec_keyboard_interrupt,
	ddata->serio_driver.connect = sec_keyboard_connect,
	ddata->serio_driver.disconnect = sec_keyboard_disconnect,

	error = serio_register_driver(&ddata->serio_driver);
	if (error < 0) {
		printk(KERN_ERR "[Keyboard] failed to register serio\n");
		error = -ENOMEM;
		goto err_reg_serio;
	}

#ifdef CONFIG_HAS_EARLYSUSPEND
	ddata->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 1;
	ddata->early_suspend.suspend = keyboard_early_suspend;
	ddata->early_suspend.resume = keyboard_late_resume;
	register_early_suspend(&ddata->early_suspend);
#endif	/* CONFIG_HAS_EARLYSUSPEND */

	ddata->keyboard_dev = device_create(sec_class, NULL, 0,
		ddata, "sec_keyboard");
	if (IS_ERR(ddata->keyboard_dev)) {
		printk(KERN_ERR "[Keyboard] failed to create device for the sysfs\n");
		error = -ENODEV;
		goto err_sysfs_create_group;
	}

	error = sysfs_create_group(&ddata->keyboard_dev->kobj, &attr_group);
	if (error) {
		printk(KERN_ERR "[Keyboard] failed to create sysfs group\n");
		goto err_sysfs_create_group;
	}

	return 0;

err_sysfs_create_group:
#ifdef CONFIG_HAS_EARLYSUSPEND
	unregister_early_suspend(&ddata->early_suspend);
#endif
	serio_unregister_driver(&ddata->serio_driver);
err_reg_serio:
err_input_allocate_device:
	input_free_device(input);
	del_timer_sync(&ddata->remap_dwork.timer);
	del_timer_sync(&ddata->power_dwork.timer);
	del_timer_sync(&ddata->ack_dwork.timer);
err_free_mem:
	kfree(ddata);
	return error;

}
static void __exit pm_exit(void)
{
	serio_unregister_driver(&pm_drv);
}
static void __exit touchit213_exit(void)
{
	serio_unregister_driver(&touchit213_drv);
}
示例#19
0
static void __exit mtouch_exit(void)
{
	serio_unregister_driver(&mtouch_drv);
}