Permalink
Browse files

updated device table. Still tweaking. figured out how to get MODULE_A…

…LIAS generated
  • Loading branch information...
1 parent 08815a4 commit 4e0dbcdc1e64db45ab9f0cb66808bcd26dd564fc Far McKon committed with haveahennessy Jul 11, 2011
Showing with 16 additions and 14 deletions.
  1. +3 −2 drivers/bmi/pims/bugduino/Makefile
  2. +13 −12 drivers/bmi/pims/bugduino/bmi_bugduino.c
View
5 drivers/bmi/pims/bugduino/Makefile
@@ -11,6 +11,7 @@
# BMI PIMS
#
-obj-$(CONFIG_BMI_BUGDUINO) += bmi_bugduino_core.o
-bmi_bugduino_core-objs := bmi_bugduino.o
+obj-$(CONFIG_BMI_BUGDUINO) += bmi_bugduino.o
+#bmi_bugduino-objs := bmi_bugduino.o
+
View
25 drivers/bmi/pims/bugduino/bmi_bugduino.c
@@ -59,18 +59,16 @@ static struct bmi_bugduino bmi_bugduino_collection[4];
static int major;
static struct bmi_device_id duino_table[] = {
- {
- .match_flags = BMI_DEVICE_ID_MATCH_VENDOR | BMI_DEVICE_ID_MATCH_PRODUCT,
- .vendor = BMI_VENDOR_BUG_LABS,
- .product = BMI_PRODUCT_BUGDUINO,
- .revision = BMI_ANY,
- },
- {
- .match_flags = BMI_DEVICE_ID_MATCH_VENDOR | BMI_DEVICE_ID_MATCH_PRODUCT,
- .vendor = BMI_VENDOR_SEED_STUDIO,
- .product = BMI_PRODUCT_BUGDUINO,
- .revision = BMI_ANY,
- }, { 0,},
+ //TRICKY: this can have a BUG_LABS or A SEED_STUDIO vendor as a valid id, just match device.
+ {
+ .match_flags = BMI_DEVICE_ID_MATCH_VENDOR | BMI_DEVICE_ID_MATCH_PRODUCT,
+ .vendor = BMI_VENDOR_BUG_LABS,
+ //.match_flags = BMI_DEVICE_ID_MATCH_PRODUCT,
+ //.vendor = BMI_VENDOR_BUG_LABS,
+ .product = BMI_PRODUCT_BUGDUINO,
+ .revision = BMI_ANY,
+ },
+ { 0,},
};
static struct bmi_driver duino_driver = {
@@ -80,6 +78,8 @@ static struct bmi_driver duino_driver = {
.remove = bugduino_remove,
};
+MODULE_DEVICE_TABLE(bmi, duino_table);
+
static struct file_operations duino_fops = {
.owner = THIS_MODULE,
.ioctl = bugduino_ioctl,
@@ -410,6 +410,7 @@ int bugduino_ioctl( struct inode* inode, struct file* file,
switch( command ){
case BMI_BUGDUINO_RESET:
{
+ printk( KERN_ERR "bmi_bugduino.c: doing bugduino reset.\n" );
bmi_slot_gpio_set_value( slot, BUGDUINO_GPIO_RESET_PIN,
( ( arg == 0x00 ) ? ( BUGDUINO_RESET_OFF ) : ( BUGDUINO_RESET_ON ) ) );
}

0 comments on commit 4e0dbcd

Please sign in to comment.