Hardware DB (HDDB)
[Implementation internals]

Hardware DB functions. More...

Data Structures

struct  line_s
struct  tmp_entry_t
struct  hddb_search_t
 Hardware DB search struct. More...

Typedefs

typedef struct line_s line_t

Enumerations

enum  prefix_t {
  pref_empty, pref_new, pref_and, pref_or,
  pref_add
}

Functions

static void hddb_init_pci (hd_data_t *hd_data)
static char * get_mi_field (char *str, char *tag, int field_len, unsigned *value, unsigned *has_value)
static modinfo_tparse_modinfo (str_list_t *file)
static driver_info_thd_modinfo_db (hd_data_t *hd_data, modinfo_t *modinfo_db, hd_t *hd, driver_info_t *drv_info)
static void hddb_init_external (hd_data_t *hd_data)
static line_tparse_line (char *str)
static unsigned store_string (hddb2_data_t *x, char *str)
static unsigned store_list (hddb2_data_t *x, hddb_list_t *list)
static unsigned store_value (hddb2_data_t *x, unsigned val)
static unsigned store_entry (hddb2_data_t *x, tmp_entry_t *te)
static void clear_entry (tmp_entry_t *te)
static void add_value (tmp_entry_t *te, hddb_entry_t idx, unsigned val)
static hddb_entry_mask_t add_entry (hddb2_data_t *hddb2, tmp_entry_t *te, hddb_entry_t idx, char *str)
static int compare_ids (hddb2_data_t *hddb, hddb_search_t *hs, hddb_entry_mask_t mask, unsigned key)
static void complete_ids (hddb2_data_t *hddb, hddb_search_t *hs, hddb_entry_mask_t key_mask, hddb_entry_mask_t mask, unsigned val_idx)
static int hddb_search (hd_data_t *hd_data, hddb_search_t *hs, int max_recursions)
static driver_info_thddb_to_device_driver (hd_data_t *hd_data, hddb_search_t *hs)
static driver_info_tkbd_driver (hd_data_t *hd_data, hd_t *hd)
static driver_info_tmonitor_driver (hd_data_t *hd_data, hd_t *hd)
static driver_info_tisdn_driver (hd_data_t *hd_data, hd_t *hd, cdb_isdn_card *cic)
static driver_info_tdsl_driver (hd_data_t *hd_data, hd_t *hd, cdb_isdn_card *cic)
static hd_res_tget_res (hd_t *h, enum resource_types t, unsigned index)
static driver_info_treorder_x11 (driver_info_t *di0, char *info)
static void expand_driver_info (hd_data_t *hd_data, hd_t *hd)
static char * module_cmd (hd_t *hd, char *cmd)
int match_modinfo (hd_data_t *hd_data, modinfo_t *db, modinfo_t *match)
 return prio, 0: no match
void hddb_init (hd_data_t *hd_data)
int parse_id (char *str, unsigned *id, unsigned *range, unsigned *mask)
void hddb_dump_raw (hddb2_data_t *hddb, FILE *f)
void hddb_dump_ent_name (hddb2_data_t *hddb, FILE *f, char pre, hddb_entry_t ent)
void hddb_dump_skey (hddb2_data_t *hddb, FILE *f, prefix_t pre, hddb_entry_mask_t key_mask, unsigned key)
void hddb_dump (hddb2_data_t *hddb, FILE *f)
str_list_thddb_get_packages (hd_data_t *hd_data)
unsigned device_class (hd_data_t *hd_data, unsigned vendor, unsigned device)
unsigned sub_device_class (hd_data_t *hd_data, unsigned vendor, unsigned device, unsigned sub_vendor, unsigned sub_device)
void hddb_add_info (hd_data_t *hd_data, hd_t *hd)
char * hid_tag_name (int tag)
char * hid_tag_name2 (int tag)

Variables

hddb2_data_t hddb_internal
static char * hid_tag_names [] = { "", "pci ", "eisa ", "usb ", "special ", "pcmcia " }
static char * hid_tag_names2 [] = { "", "pci ", "eisa ", "usb ", "int ", "pcmcia " }

Detailed Description

Hardware DB functions.


Typedef Documentation

typedef struct line_s line_t


Enumeration Type Documentation

enum prefix_t

Enumerator:
pref_empty 
pref_new 
pref_and 
pref_or 
pref_add 


Function Documentation

hddb_entry_mask_t add_entry ( hddb2_data_t hddb2,
tmp_entry_t te,
hddb_entry_t  idx,
char *  str 
) [static]

void add_value ( tmp_entry_t te,
hddb_entry_t  idx,
unsigned  val 
) [static]

References he_nomask, tmp_entry_t::len, and tmp_entry_t::val.

Referenced by add_entry().

void clear_entry ( tmp_entry_t te  )  [static]

References he_nomask.

Referenced by hddb_init_external().

int compare_ids ( hddb2_data_t hddb,
hddb_search_t hs,
hddb_entry_mask_t  mask,
unsigned  key 
) [static]

void complete_ids ( hddb2_data_t hddb,
hddb_search_t hs,
hddb_entry_mask_t  key_mask,
hddb_entry_mask_t  mask,
unsigned  val_idx 
) [static]

unsigned device_class ( hd_data_t hd_data,
unsigned  vendor,
unsigned  device 
)

driver_info_t * dsl_driver ( hd_data_t hd_data,
hd_t hd,
cdb_isdn_card cic 
) [static]

void expand_driver_info ( hd_data_t hd_data,
hd_t hd 
) [static]

References driver_info_module_t::active, s_str_list_t::add_str_list(), driver_info_x11_t::all, driver_info_u::any, driver_info_display_t::bandwidth, driver_info_mouse_t::buttons, driver_info_x11_t::c15, driver_info_x11_t::c16, driver_info_x11_t::c24, driver_info_x11_t::c32, driver_info_x11_t::c8, driver_info_x11_t::colors, s_hd_t::compat_device, s_hd_t::compat_vendor, driver_info_module_t::conf, driver_info_x11_t::dacspeed, s_hd_t::device, di_display, di_module, di_mouse, di_x11, driver_info_u::display, s_hd_t::driver_info, s_hd_t::drivers, driver_info_x11_t::extensions, free_mem(), s_str_list_t::free_str_list(), get_cmdline(), driver_info_mouse_t::gpm, hd_module_is_active(), hd_probe_feature(), hd_split(), driver_info_x11_t::hddb0, driver_info_mouse_t::hddb0, driver_info_module_t::hddb0, driver_info_display_t::hddb0, driver_info_x11_t::hddb1, driver_info_module_t::hddb1, driver_info_display_t::height, hd_id_t::id, ID_TAG, ID_VALUE, MAKE_ID, driver_info_display_t::max_hsync, driver_info_display_t::max_vsync, driver_info_display_t::min_hsync, driver_info_display_t::min_vsync, driver_info_module_t::mod_args, driver_info_u::module, module_cmd(), driver_info_u::mouse, driver_info_module_t::names, new_str(), s_str_list_t::next, driver_info_u::next, driver_info_x11_t::options, pr_ignx11, driver_info_x11_t::raw, reorder_x11(), s_hd_t::requires, driver_info_x11_t::script, s_str_list_t::search_str_list(), driver_info_x11_t::server, s_str_list_t::str, str_printf(), TAG_SPECIAL, driver_info_any_t::type, s_hd_t::vendor, driver_info_mouse_t::wheels, driver_info_display_t::width, driver_info_u::x11, driver_info_x11_t::x3d, driver_info_mouse_t::xf86, and driver_info_x11_t::xf86_ver.

Referenced by hddb_add_info().

char * get_mi_field ( char *  str,
char *  tag,
int  field_len,
unsigned *  value,
unsigned *  has_value 
) [static]

Referenced by parse_modinfo().

hd_res_t * get_res ( hd_t h,
enum resource_types  t,
unsigned  index 
) [static]

driver_info_t * hd_modinfo_db ( hd_data_t hd_data,
modinfo_t modinfo_db,
hd_t hd,
driver_info_t drv_info 
) [static]

void hddb_add_info ( hd_data_t hd_data,
hd_t hd 
)

References s_hd_t::base_class, hddb_search_t::base_class, bc_keyboard, bc_monitor, s_hd_t::bus, hddb_search_t::bus, hd_detail_t::ccw, s_hd_t::compat_device, s_hd_t::compat_vendor, ccw_s::cu_model, hddb_search_t::cu_model, hd_detail_ccw_t::data, s_hd_t::detail, hddb_search_t::device, s_hd_t::device, hddb_search_t::driver, s_hd_t::driver_info, dsl_driver(), expand_driver_info(), s_hd_t::tag_s::fixed, free_driver_info(), free_mem(), s_str_list_t::free_str_list(), get_dsl_info(), get_isdn_info(), hd_modinfo_db(), hd_set_hw_class(), hd_split(), hddb_search(), hddb_to_device_driver(), he_baseclass_id, he_baseclass_name, he_bus_id, he_bus_name, he_detail_ccw_data_cu_model, he_device_id, he_device_name, he_driver, he_hwclass, he_progif_id, he_progif_name, he_requires, he_rev_id, he_rev_name, he_serial, he_subclass_id, he_subclass_name, he_subdevice_id, he_subdevice_name, he_subvendor_id, he_subvendor_name, he_vendor_id, he_vendor_name, hddb_search_t::hwclass, hd_id_t::id, s_hd_t::is, isdn_driver(), kbd_driver(), hddb_search_t::key, cdb_isdn_card::lname, MAKE_ID, s_hd_t::model, hd_data_t::modinfo, hd_data_t::modinfo_ext, monitor_driver(), hd_id_t::name, new_str(), s_hd_t::prog_if, hddb_search_t::prog_if, s_hd_t::ref, hddb_search_t::requires, s_hd_t::requires, s_hd_t::revision, hddb_search_t::revision, hddb_search_t::serial, s_hd_t::serial, s_hd_t::sub_class, hddb_search_t::sub_class, hddb_search_t::sub_device, s_hd_t::sub_device, hddb_search_t::sub_vendor, s_hd_t::sub_vendor, s_hd_t::tag, TAG_SPECIAL, hddb_search_t::value, hddb_search_t::vendor, s_hd_t::vendor, and s_hd_t::is_s::with_acpi.

Referenced by hd_display_adapter(), hd_module_list(), hd_scan_int(), int_wlan(), and prop2hd().

void hddb_dump ( hddb2_data_t hddb,
FILE *  f 
)

void hddb_dump_ent_name ( hddb2_data_t hddb,
FILE *  f,
char  pre,
hddb_entry_t  ent 
)

References hddb_entry_strings.

Referenced by hddb_dump_skey().

void hddb_dump_raw ( hddb2_data_t hddb,
FILE *  f 
)

void hddb_dump_skey ( hddb2_data_t hddb,
FILE *  f,
prefix_t  pre,
hddb_entry_mask_t  key_mask,
unsigned  key 
)

str_list_t* hddb_get_packages ( hd_data_t hd_data  ) 

Todo:
implement in hddb.c

void hddb_init ( hd_data_t hd_data  ) 

void hddb_init_external ( hd_data_t hd_data  )  [static]

void hddb_init_pci ( hd_data_t hd_data  )  [static]

int hddb_search ( hd_data_t hd_data,
hddb_search_t hs,
int  max_recursions 
) [static]

driver_info_t * hddb_to_device_driver ( hd_data_t hd_data,
hddb_search_t hs 
) [static]

char* hid_tag_name ( int  tag  ) 

References hid_tag_names.

Referenced by hddb_dump_raw(), and hddb_dump_skey().

char* hid_tag_name2 ( int  tag  ) 

References hid_tag_names2.

Referenced by dump_hid(), and dump_hid2().

driver_info_t * isdn_driver ( hd_data_t hd_data,
hd_t hd,
cdb_isdn_card cic 
) [static]

driver_info_t * kbd_driver ( hd_data_t hd_data,
hd_t hd 
) [static]

int match_modinfo ( hd_data_t hd_data,
modinfo_t db,
modinfo_t match 
)

char * module_cmd ( hd_t hd,
char *  cmd 
) [static]

driver_info_t * monitor_driver ( hd_data_t hd_data,
hd_t hd 
) [static]

int parse_id ( char *  str,
unsigned *  id,
unsigned *  range,
unsigned *  mask 
)

line_t * parse_line ( char *  str  )  [static]

modinfo_t * parse_modinfo ( str_list_t file  )  [static]

driver_info_t * reorder_x11 ( driver_info_t di0,
char *  info 
) [static]

unsigned store_entry ( hddb2_data_t x,
tmp_entry_t te 
) [static]

unsigned store_list ( hddb2_data_t x,
hddb_list_t list 
) [static]

unsigned store_string ( hddb2_data_t x,
char *  str 
) [static]

unsigned store_value ( hddb2_data_t x,
unsigned  val 
) [static]

unsigned sub_device_class ( hd_data_t hd_data,
unsigned  vendor,
unsigned  device,
unsigned  sub_vendor,
unsigned  sub_device 
)


Variable Documentation

char* hid_tag_names[] = { "", "pci ", "eisa ", "usb ", "special ", "pcmcia " } [static]

Referenced by hid_tag_name().

char* hid_tag_names2[] = { "", "pci ", "eisa ", "usb ", "int ", "pcmcia " } [static]

Referenced by hid_tag_name2().