Lines Matching defs:node

37 static HalDevice *devinfo_usb_if_add(HalDevice *d, di_node_t node, gchar *devfs_path,
39 static HalDevice *devinfo_usb_scsa2usb_add(HalDevice *d, di_node_t node);
40 static HalDevice *devinfo_usb_printer_add(HalDevice *usbd, di_node_t node);
41 static HalDevice *devinfo_usb_input_add(HalDevice *usbd, di_node_t node);
42 static HalDevice *devinfo_usb_video4linux_add(HalDevice *usbd, di_node_t node);
45 static void set_usb_properties(HalDevice *d, di_node_t node, gchar *devfs_path, char *driver_name);
75 is_usb_node(di_node_t node)
84 rc = di_prop_lookup_strings(DDI_DEV_T_ANY, node, "compatible", &s);
124 devinfo_usb_add(HalDevice *parent, di_node_t node, char *devfs_path, char *device_type)
134 if (is_usb_node(node) == FALSE) {
138 driver_name = di_driver_name (node);
140 if (di_prop_lookup_ints (DDI_DEV_T_ANY, node, "interface", &i) < 0) {
141 /* It is a USB device node. */
145 devinfo_set_default_properties (d, parent, node, devfs_path);
147 PROP_STR(d, node, s, "usb-product-name", "info.product");
148 PROP_STR(d, node, s, "usb-product-name", "usb_device.product");
149 PROP_STR(d, node, s, "usb-vendor-name", "usb_device.vendor");
150 PROP_INT(d, node, i, "usb-vendor-id", "usb_device.vendor_id");
151 PROP_INT(d, node, i, "usb-product-id", "usb_device.product_id");
152 PROP_INT(d, node, i, "usb-revision-id", "usb_device.device_revision_bcd");
153 PROP_STR(d, node, s, "usb-serialno", "usb_device.serial");
154 PROP_INT(d, node, i, "usb-port-count", "usb_device.num_ports");
155 PROP_INT(d, node, i, "usb-num-configs", "usb_device.num_configurations");
156 PROP_INT(d, node, i, "assigned-address", "usb_device.bus_number");
158 if (di_prop_lookup_ints (DDI_DEV_T_ANY, node, "usb-release", &i) > 0) {
163 if (di_prop_lookup_ints (DDI_DEV_T_ANY, node, "low-speed", &i) >= 0) {
165 } else if (di_prop_lookup_ints (DDI_DEV_T_ANY, node, "high-speed", &i) >= 0) {
173 set_usb_properties (d, node, devfs_path, driver_name);
175 /* wait for the ugen node's creation */
187 if (((binding_name = di_binding_name (node)) != NULL) &&
192 if ((nd = devinfo_usb_if_add (d, node, if_devfs_path,
200 /* It is a USB interface node or IA node. */
203 if (di_prop_lookup_ints (DDI_DEV_T_ANY, node, "interface-count", &j) > 0) {
205 * The USB IA node properties are not defined in
206 * HAL spec so far. So IA node udi has "ia" sign
207 * now, different from the IF node udi with "if".
216 d = devinfo_usb_if_add (parent, node, devfs_path, if_devfs_path, *i);
222 nd = devinfo_usb_scsa2usb_add (d, node);
224 nd = devinfo_usb_printer_add (d, node);
229 nd = devinfo_usb_input_add(d, node);
234 nd = devinfo_usb_video4linux_add(d, node);
248 set_usb_properties(HalDevice *d, di_node_t node, gchar *devfs_path, char *driver_name)
259 if (di_prop_lookup_bytes (DDI_DEV_T_ANY, node, "usb-dev-descriptor",
273 if (di_prop_lookup_bytes (DDI_DEV_T_ANY, node, "usb-raw-cfg-descriptors",
291 /* get the node's usb tree level by counting hub numbers */
307 parse_usb_if_descr(di_node_t node, int ifnum)
316 if ((rlen = di_prop_lookup_bytes (DDI_DEV_T_ANY, node,
322 if ((devpath = di_devfs_path (node)) == NULL)
370 devinfo_usb_if_add(HalDevice *parent, di_node_t node, gchar *devfs_path,
380 devinfo_set_default_properties (d, parent, node, if_devfs_path);
387 /* Set usb interface properties to interface node. */
389 if_descrp = parse_usb_if_descr (node, ifnum);
409 /* for the case that the parent is IA node */
424 get_dev_link_path(di_node_t node, char *nodetype, char *re, char **devlink, char **minor_path, char **minor_name)
439 major = di_driver_major(node);
441 while ((minor = di_minor_next(node, minor)) != DI_MINOR_NIL) {
483 devinfo_usb_video4linux_add(HalDevice *usbd, di_node_t node)
496 get_dev_link_path(node, "usb_video",
512 devinfo_set_default_properties(d, usbd, node, minor_path);
528 PROP_STR(d, node, s, "usb-product-name", "info.product");
546 devinfo_usb_input_add(HalDevice *usbd, di_node_t node)
557 get_dev_link_path(node, "ddi_pseudo",
574 devinfo_set_default_properties(d, usbd, node, minor_path);
620 devinfo_usb_scsa2usb_add(HalDevice *usbd, di_node_t node)
632 get_dev_link_path(node, "ddi_ctl:devctl:scsi",
641 devinfo_set_default_properties (d, usbd, node, minor_path);
667 devinfo_usb_printer_add(HalDevice *parent, di_node_t node)
677 get_dev_link_path(node, "ddi_printer", "printers/.+", &devlink, &minor_path, &minor_name);
685 devinfo_set_default_properties (d, parent, node, minor_path);