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