So, I got it to recognize the driver in the kernel, but it refuses to
probe. No matter that vendor/product id combination I use for any of
the devices I've tested.
bond.c
[code]
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/usb.h>
#define AUTHOR "bond"
#define DESC "Device Driver for the bond "
#define VENDOR 0x06A3
#define DEVICE 0xF622
MODULE_LICENSE("GPL");
MODULE_AUTHOR(AUTHOR);
MODULE_DESCRIPTION(DESC);
static struct usb_device_id bond_table [] =
{
{ USB_DEVICE(VENDOR, DEVICE) },
{ }
};
MODULE_DEVICE_TABLE(usb, bond_table);
int bond_probe(struct usb_interface *intf, const struct usb_device_id *id)
{
printk(KERN_INFO "bond_PROBE");
return 0;
}
void bond_disconnect(struct usb_interface *intf)
{
printk(KERN_INFO "bond_DISCONNECT");
}
static struct usb_driver bond_driver =
{
name: "bond",
id_table: bond_table,
probe: bond_probe,
disconnect: bond_disconnect,
};
static int __init init_cci(void)
{
int result = usb_register(&bond_driver);
if(result < 0)
{
printk(KERN_INFO "usb_register failed. err #%d", result);
return -1;
}
printk(KERN_INFO "INIT_bond");
return 0;
}
module_init(init_cci);
static void __exit exit_cci(void)
{
printk(KERN_INFO "EXIT_bond");
usb_deregister(&bond_driver);
}
module_exit(exit_cci);
[/code]modinfo bond.ko
lsusb
lsmod
dmesg
dmesg when plugging in device
modprobe bond/bond.ko/bond
Any ideas on this matter would be great. Thank you.
--
http://vger.kernel.org/vger-lists.html
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ