Skip to content

Commit

Permalink
- bluetooth support
Browse files Browse the repository at this point in the history
  • Loading branch information
wfeldt committed Sep 27, 2004
1 parent 7eea376 commit febbe15
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 19 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
27/9/2004: v9.20
- report bluetooth devices (#45893)

24/9/2004: v9.19
- return package info for sony notebooks, too (35245)

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.19
9.20
12 changes: 6 additions & 6 deletions doc/hwinfo.8
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ Show libhd version.
.TP
.BI --<hwitem>
Probe for the particular hardware item. Available hardware items are:
.B cdrom, floppy, disk, network, gfxcard, framebuffer, monitor, camera,
.B mouse, joystick, keyboard, chipcard, sound, isdn, modem, storage-ctrl,
.B netcard, printer, tv, dvb, scanner, braille, sys, bios, cpu, partition,
.B usb-ctrl, usb, pci, isapnp, ide, scsi, bridge, hub, memory, smp, pppoe
.B all
.B all, bios, block, bluetooth, braille, bridge, camera, cdrom, chipcard, cpu,
.B disk, dsl, dvb, floppy, framebuffer, gfxcard, hub, ide, isapnp, isdn,
.B joystick, keyboard, memory, modem, monitor, mouse, netcard, network,
.B partition, pci, pcmcia, pcmcia-ctrl, pppoe, printer, scanner, scsi, smp,
.B sound, storage-ctrl, sys, tape, tv, usb, usb-ctrl, vbe, wlan,
and
.B reallyall.
.B zip.
.\"
.\"
.SH FILES
Expand Down
11 changes: 6 additions & 5 deletions hwinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ struct option options[] = {
{ "block", 0, NULL, 1000 + hw_block },
{ "tape", 0, NULL, 1000 + hw_tape },
{ "vbe", 0, NULL, 1000 + hw_vbe },
{ "bluetooth", 0, NULL, 1000 + hw_bluetooth },
{ "all", 0, NULL, 2000 },
{ "reallyall", 0, NULL, 2001 },
{ "smp", 0, NULL, 2002 },
Expand Down Expand Up @@ -1318,11 +1319,11 @@ void help()
" --dump-db n dump hardware data base, 0: external, 1: internal\n"
" --hw_item probe for hw_item\n"
" hw_item is one of:\n"
" cdrom, floppy, disk, network, gfxcard, framebuffer, monitor, camera,\n"
" mouse, joystick, keyboard, chipcard, sound, isdn, modem, storage-ctrl,\n"
" netcard, printer, tv, dvb, scanner, braille, sys, bios, cpu, partition,\n"
" usb-ctrl, usb, pci, isapnp, ide, scsi, bridge, hub, memory, smp, pppoe,\n"
" pcmcia, pcmcia-ctrl, wlan, zip, dsl, all, reallyall\n\n"
" all, bios, block, bluetooth, braille, bridge, camera, cdrom, chipcard, cpu,\n"
" disk, dsl, dvb, floppy, framebuffer, gfxcard, hub, ide, isapnp, isdn,\n"
" joystick, keyboard, memory, modem, monitor, mouse, netcard, network,\n"
" partition, pci, pcmcia, pcmcia-ctrl, pppoe, printer, scanner, scsi, smp,\n"
" sound, storage-ctrl, sys, tape, tv, usb, usb-ctrl, vbe, wlan, zip\n\n"
" Note: debug info is shown only in the log file. (If you specify a\n"
" log file the debug level is implicitly set to a reasonable value.)\n"
);
Expand Down
11 changes: 6 additions & 5 deletions hwscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ struct option options[] = {
{ "block", 0, NULL, 1000 + hw_block },
{ "tape", 0, NULL, 1000 + hw_tape },
{ "vbe", 0, NULL, 1000 + hw_vbe },
{ "bluetooth", 0, NULL, 1000 + hw_bluetooth },
{ "all", 0, NULL, 1000 + hw_all },
{ }
};
Expand Down Expand Up @@ -272,11 +273,11 @@ void help()
" --active=state id change 'active' status\n"
" --hw_item probe for hw_item and update status info\n"
" hw_item is one of:\n"
" cdrom, floppy, disk, network, gfxcard, framebuffer, monitor, camera,\n"
" mouse, joystick, keyboard, chipcard, sound, isdn, modem, storage-ctrl,\n"
" netcard, printer, tv, dvb, scanner, braille, sys, bios, cpu, partition,\n"
" usb-ctrl, usb, pci, isapnp, ide, scsi, bridge, hub, memory, smp, pppoe,\n"
" pcmcia, pcmcia-ctrl, wlan, dsl, zip\n"
" all, bios, block, bluetooth, braille, bridge, camera, cdrom, chipcard, cpu,\n"
" disk, dsl, dvb, floppy, framebuffer, gfxcard, hub, ide, isapnp, isdn,\n"
" joystick, keyboard, memory, modem, monitor, mouse, netcard, network,\n"
" partition, pci, pcmcia, pcmcia-ctrl, pppoe, printer, scanner, scsi, smp,\n"
" sound, storage-ctrl, sys, tape, tv, usb, usb-ctrl, vbe, wlan, zip\n"
);
}

Expand Down
8 changes: 8 additions & 0 deletions src/hd/hd.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,10 @@ void hd_set_probe_feature_hw(hd_data_t *hd_data, hd_hw_item_t item)
hd_set_probe_feature(hd_data, pr_pcmcia);
break;

case hw_bluetooth:
hd_set_probe_feature(hd_data, pr_usb);
break;

case hw_all:
hd_set_probe_feature(hd_data, pr_default);
break;
Expand Down Expand Up @@ -4408,6 +4412,10 @@ void assign_hw_class(hd_data_t *hd_data, hd_t *hd)
base_class = bc_partition;
break;

case hw_bluetooth:
base_class = bc_bluetooth;
break;

case hw_wlan:
case hw_block:
case hw_tape:
Expand Down
5 changes: 3 additions & 2 deletions src/hd/hd.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ typedef enum hw_item {
hw_manual, hw_usb_ctrl, hw_usb, hw_bios, hw_pci, hw_isapnp, hw_bridge,
hw_hub, hw_scsi, hw_ide, hw_memory, hw_dvb, hw_pcmcia, hw_pcmcia_ctrl,
hw_ieee1394, hw_ieee1394_ctrl, hw_hotplug, hw_hotplug_ctrl, hw_zip, hw_pppoe,
hw_wlan, hw_redasd, hw_dsl, hw_block, hw_tape, hw_vbe, /* append new entries here */
hw_wlan, hw_redasd, hw_dsl, hw_block, hw_tape, hw_vbe, hw_bluetooth,
/* append new entries here */
hw_unknown, hw_all /* hw_all must be last */
} hd_hw_item_t;

Expand All @@ -145,7 +146,7 @@ typedef enum base_classes {
bc_monitor = 0x100, bc_internal, bc_modem, bc_isdn, bc_ps2, bc_mouse,
bc_storage_device, bc_network_interface, bc_keyboard, bc_printer,
bc_hub, bc_braille, bc_scanner, bc_joystick, bc_chipcard, bc_camera,
bc_framebuffer, bc_dvb, bc_tv, bc_partition, bc_dsl
bc_framebuffer, bc_dvb, bc_tv, bc_partition, bc_dsl, bc_bluetooth
} hd_base_classes_t;

/* subclass values of bc_monitor */
Expand Down
1 change: 1 addition & 0 deletions src/hd/manual.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ static hash_t hw_items[] = {
{ hw_block, "block device" },
{ hw_tape, "tape" },
{ hw_vbe, "vesa bios" },
{ hw_bluetooth, "bluetooth" },
{ hw_unknown, "unknown" },
{ 0, NULL }
};
Expand Down
7 changes: 7 additions & 0 deletions src/hd/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,13 @@ void set_class_entries(hd_data_t *hd_data, hd_t *hd, usb_t *usb)
hd->base_class.id = bc_hub;
break;

case 0xe0:
if(sub == 1 && prot == 1) {
hd->base_class.id = bc_bluetooth;
hd->sub_class.id = 0;
}
break;

case 0xff:
/* hp psc 2100, 2200, 2150, officejet 6100 */
if(
Expand Down
6 changes: 6 additions & 0 deletions src/ids/src/class
Original file line number Diff line number Diff line change
Expand Up @@ -944,3 +944,9 @@
baseclass.id 0x113
+baseclass.name Partition

baseclass.id 0x114
+baseclass.name DSL Card

baseclass.id 0x115
+baseclass.name Bluetooth Device

15 changes: 15 additions & 0 deletions src/ids/src/network
Original file line number Diff line number Diff line change
Expand Up @@ -806,3 +806,18 @@
+driver.module.modprobe gm
+device.name Myrinet Adapter


# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# bluetooth usb devices
vendor.id usb 0x044e
&device.id usb 0x3001+0x0002
|vendor.id usb 0x04bf
&device.id usb 0x030a
|vendor.id usb 0x057c
&device.id usb 0x3800
|vendor.id usb 0x0bdb
&device.id usb 0x1002
+driver.module.modprobe hci_usb
+baseclass.id 0x115
+subclass.id 0x00

0 comments on commit febbe15

Please sign in to comment.