2 * HID driver for some bright "special" devices
4 * Copyright (c) 2008 Mauro Carvalho Chehab <mchehab@redhat.com>
6 * Based on hid-dell driver
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the Free
12 * Software Foundation; either version 2 of the License, or (at your option)
16 #include <linux/device.h>
17 #include <linux/hid.h>
18 #include <linux/module.h>
22 static int bright_probe(struct hid_device *hdev, const struct hid_device_id *id)
26 ret = hid_parse(hdev);
28 dev_err(&hdev->dev, "parse failed\n");
32 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
34 dev_err(&hdev->dev, "hw start failed\n");
38 usbhid_set_leds(hdev);
45 static const struct hid_device_id bright_devices[] = {
46 { HID_USB_DEVICE(USB_VENDOR_ID_BRIGHT, USB_DEVICE_ID_BRIGHT_ABNT2) },
49 MODULE_DEVICE_TABLE(hid, bright_devices);
51 static struct hid_driver bright_driver = {
53 .id_table = bright_devices,
54 .probe = bright_probe,
57 static int bright_init(void)
59 return hid_register_driver(&bright_driver);
62 static void bright_exit(void)
64 hid_unregister_driver(&bright_driver);
67 module_init(bright_init);
68 module_exit(bright_exit);
69 MODULE_LICENSE("GPL");
71 HID_COMPAT_LOAD_DRIVER(bright);