tree: f18dd9dd01dad7f93c436a1c2f3d6287304d0499 [path history] [tgz]
  1. meta/
  2. BUILD.bazel
  3. composite_sample.bind
  4. composite_sample.cc
  5. composite_sample.h
  6. README.md
src/composite_sample/README.md

Composite Device Sample

This sample project contains a Fuchsia driver for a composite device node. The driver binds with multiple parent device nodes described using ACPI.

Building

To build the composite_sample driver and related components, run the following command:

tools/bazel build --config=fuchsia_x64 //src/composite_device:pkg

Running

Use the following commands to load the driver component on a target device:

  1. Load the composite_sample driver component:

    tools/bazel run --config=fuchsia_x64 //src/composite_sample:pkg.component
    
  2. Open the device log viewer:

    tools/ffx log --filter composite_sample
    

You should see the driver component print the topological path of each parent device node after the driver has successfully bound:

[composite-sample,driver][I]: [composite_sample.cc:69] Topological path  path=sys/platform/platform-passthrough/acpi/acpi-_SB_/acpi-GFBY/acpi-GFBY-passthrough
[composite-sample,driver][I]: [composite_sample.cc:69] Topological path  path=sys/platform/platform-passthrough/acpi/acpi-_SB_/acpi-GFRT/acpi-GFRT-passthrough