blob: 2e20b4585656a9a6e15dce91b9dacc7d5839f5d8 [file] [log] [blame] [edit]
This tool allows component authors to write a JSON file and have that turned into a
`fuchsia.hardware.power.PowerElementConfiguration` FIDL table that can be included
in a component's package.
The `lib` folder contains a helper library to make it easier for a component to load
the FIDL table at runtime.
The PowerElementConfiguration table can be used to provide data to
`fuchsia.power.broker/Topology.AddElement`. There is currently a driver library
at `sdk/lib/driver/power/cpp` which will perform this conversion and request a new
power element.
This tool is generally meant for drivers at the moment, but it can easily be extended
to support data that non-drivers would need to construct a power element.
# Usage
Please see the `tests` folder for an e2e use case of a component using the build
rules to construct the file, include the file in the package, and load it at runtime.