Ejemplo n.º 1
0
	clear_bit(RMI_HID_STARTED, &hdata->flags);
	cancel_work_sync(&hdata->attn_report_work);
	cancel_work_sync(&hdata->reset_work);
	if (IS_ENABLED(CONFIG_RMI4_DEBUG))
		teardown_debugfs(xport->data);
	
	rmi_unregister_transport_device(xport);

	hdev->ll_driver->close(hdev);
	hid_hw_stop(hdev);
}

static const struct hid_device_id rmi_hid_id[] = {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0))
	{ HID_DEVICE(BUS_I2C, HID_GROUP_ANY, 0x06cb, HID_ANY_ID),
#else
	{ HID_DEVICE(BUS_I2C, 0x06cb, HID_ANY_ID),
#endif
		.driver_data = 0 },
	{ HID_USB_DEVICE(0x06cb, HID_ANY_ID),
		.driver_data = 0 },
	{ }
};
MODULE_DEVICE_TABLE(hid, rmi_hid_id);

static struct hid_driver rmi_hid_driver = {
	.name = "rmi_hid",
	.driver = {
		.owner	= THIS_MODULE,
		.name	= "rmi_hid",
Ejemplo n.º 2
0
/*
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 */

#include <linux/module.h>
#include <linux/slab.h>
#include <linux/kernel.h>
#include <asm/unaligned.h>
#include <asm/byteorder.h>

#include <linux/hid.h>

static const struct hid_device_id hid_table[] = {
	{ HID_DEVICE(HID_BUS_ANY, HID_GROUP_GENERIC, HID_ANY_ID, HID_ANY_ID) },
	{ }
};
MODULE_DEVICE_TABLE(hid, hid_table);

static struct hid_driver hid_generic = {
	.name = "hid-generic",
	.id_table = hid_table,
};
module_hid_driver(hid_generic);

MODULE_AUTHOR("Henrik Rydberg");
MODULE_DESCRIPTION("HID generic driver");
MODULE_LICENSE("GPL");
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 */

#include <linux/module.h>
#include <linux/slab.h>
#include <linux/kernel.h>
#include <asm/unaligned.h>
#include <asm/byteorder.h>

#include <linux/hid.h>

static const struct hid_device_id hid_generic_devices[] = {
	{ HID_DEVICE(HID_BUS_ANY, HID_ANY_ID, HID_ANY_ID) },
	{ }
};
MODULE_DEVICE_TABLE(hid, hid_generic_devices);

static struct hid_driver hid_generic_driver = {
	.name = "hid-generic",
	.id_table = hid_generic_devices,
};

static int __init hid_generic_init2(void)
{
	int ret;

	ret = hid_register_driver(&hid_generic_driver);
	if (ret)