×

Method and apparatus for associating device drivers via a device tree

  • US 8,196,153 B1
  • Filed: 01/07/2007
  • Issued: 06/05/2012
  • Est. Priority Date: 01/07/2007
  • Status: Active Grant
First Claim
Patent Images

1. A computer-implemented method, comprising:

  • maintaining within a kernel of an operating system a device tree having a hierarchical structure executed in a memory by a processor of a computer, the device tree having a plurality of nodes corresponding to a plurality of devices installed in the computer, including a first node associated with a first device and a second node associated with a second device;

    encoding within the first node an auxiliary driver identifier for identifying a second device driver associated with the second node and data representing one or more parameters used by a first device driver associated with the first device when invoking the second device driver, wherein the auxiliary driver identifier includes an auxiliary device name associated with the second node of the device tree;

    the first device driver retrieving the auxiliary device identifier and the data representing one or more parameters from the device tree and passing the auxiliary device name and the data to the kernel;

    receiving, at the kernel, a request from the first device driver for invoking the second device driver, the request including the auxiliary driver identifier;

    in response to the request, the kernel identifying a driver handle for the second device driver based on the auxiliary driver identifier, includingperforming a lookup operation in a dictionary, the dictionary having a plurality of entries corresponding to a plurality of devices, wherein each entry includes a first field to store a device name of the device and a second field to store a driver handle of a device driver associated with the identified device,locating an entry associated with the second device driver based on at least one of the auxiliary device name and the data representing one or more parameters,retrieving a driver handle of the second device driver from the located entry of the dictionary; and

    returning, by the kernel, the driver handle of the second device driver to the first device driver to enable the first device driver to invoke the second device driver by calling the driver handle of the second device driver, including passing the data representing one or more parameters retrieved from the first node of the device tree, to perform a predetermined operation on the first device, wherein the second device driver, when invoked, does not need to know who invokes the second device driver.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×