blob: eb959b9cc6a5f652701bce89ee022873db287949 [file]
// Copyright 2018 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 ddk.driver;
// TODO: Not need this anymore.
[repr="Hidden"]
struct ZxDevice {};
// TODO: Not need this anymore.
[repr="C"]
struct ZxProtocolDevice {};
[repr="C"]
struct ZxDeviceProp {};
[repr="C"]
struct DeviceAddArgs {
/// DEVICE_ADD_ARGS_VERSION
uint64 version;
/// Driver name is copied to internal structure
/// max length is ZX_DEVICE_NAME_MAX
string name;
/// Context pointer for use by the driver
/// and passed to driver in all zx_protocol_device_t callbacks
voidptr ctx;
/// Pointer to device's device protocol operations
ZxProtocolDevice? ops;
/// Optional list of device properties
ZxDeviceProp? props;
/// Number of device properties
uint32 prop_count;
/// Optional custom protocol for this device
uint32 proto_id;
/// Optional custom protocol operations for this device
voidptr proto_ops;
/// Arguments used with DEVICE_ADD_MUST_ISOLATE
/// these will be passed to the create() driver op of
/// the proxy device in the new devhost
string proxy_args;
/// One or more of DEVICE_ADD_*
uint32 flags;
};