Changes between Version 11 and Version 12 of DeviceDrivers
- Timestamp:
- 2011-11-12T22:02:33Z (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeviceDrivers
v11 v12 90 90 == Exposing Driver Services to Clients == 91 91 92 All driver services are provided to clients (applications) via the location service. For each bound function node the device framework creates a service whose name is based on the physical path of that function. 92 All driver services are provided to clients (applications) via the location service. For each bound function node the device framework creates a service whose name is based on the physical path of that function. The services are created in the ''devices'' namespace. This is mapped to the {{{/loc/devices}}} directory via ''locfs''. For example: 93 93 94 Often the driver will want to add the function service to one or more service categories. This can be done using the DDF function: 94 {{{ 95 /# ls /loc/devices 96 \hw\pci0\00:01.0\com1\a 97 \hw\pci0\00:01.0\ctl 98 \hw\pci0\ctl 99 \virt\lo\port0 100 }}} 101 102 Often the driver will want to add the function service to one or more service categories. Service categories imply the protocol spoken by a service (and possibly also the intended use). This can be done using the DDF function: 95 103 {{{ 96 104 int ddf_fun_add_to_category(ddf_fun_t *fun, const char *cat_name) 97 105 }}} 106 107 For example, the input server automatically picks up and opens any device in the categories ''keyboard'' and ''mouse''. 98 108 99 109 == Traditional I/O Device Drivers ==