| // Copyright 2022 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| library fuchsia.driver.compat; |
| |
| using zx; |
| |
| type Metadata = resource struct { |
| type uint32; |
| data zx.handle:VMO; |
| }; |
| |
| /// This API communicates with the DFv1 parent device. |
| protocol Device { |
| /// Get this device's topological path that it is exporting in /dev. |
| GetTopologicalPath() -> (struct { |
| path string:MAX; |
| }); |
| |
| /// Get all of the metadata associated with this device. |
| GetMetadata() -> (resource struct { |
| metadata vector<Metadata>:MAX; |
| }) error zx.status; |
| }; |
| |
| /// This represents a service that the compatibility driver will offer to |
| /// its children, so that DFv1 drivers can communicate with each other. |
| /// This is a service because a driver will create one instance per device |
| /// the driver creates. Each child of the driver gets a single instance of |
| /// this service. |
| service Service { |
| device client_end:Device; |
| }; |