class Device
Defined at line 41 of file ../../src/devices/misc/drivers/compat/device.h
Device is an implementation of a DFv1 device.
Public Methods
void set_fragments (std::vector<std::string> names)
Defined at line 115 of file ../../src/devices/misc/drivers/compat/device.h
Driver * driver ()
Defined at line 116 of file ../../src/devices/misc/drivers/compat/device.h
async_dispatcher_t * dispatcher ()
Defined at line 118 of file ../../src/devices/misc/drivers/compat/device.h
fpromise::scope & scope ()
Defined at line 119 of file ../../src/devices/misc/drivers/compat/device.h
fdf::Logger & logger ()
Defined at line 120 of file ../../src/devices/misc/drivers/compat/device.h
async::Executor & executor ()
Defined at line 121 of file ../../src/devices/misc/drivers/compat/device.h
DeviceServer & device_server ()
Defined at line 122 of file ../../src/devices/misc/drivers/compat/device.h
devfs_fidl::DeviceServer & devfs_server ()
Defined at line 123 of file ../../src/devices/misc/drivers/compat/device.h
void set_logger (std::shared_ptr<fdf::Logger> logger)
Defined at line 125 of file ../../src/devices/misc/drivers/compat/device.h
const std::vector<std::string> & fragments ()
Defined at line 127 of file ../../src/devices/misc/drivers/compat/device.h
std::optional<Device *> & parent ()
Public for testing.
Defined at line 130 of file ../../src/devices/misc/drivers/compat/device.h
void Device (device_tdevice,const zx_protocol_device_t *ops,Driver *driver,std::optional<Device *>parent,std::shared_ptr<fdf::Logger>logger,async_dispatcher_t *dispatcher)
Defined at line 159 of file ../../src/devices/misc/drivers/compat/device.cc
void ~Device ()
Defined at line 179 of file ../../src/devices/misc/drivers/compat/device.cc
zx_device_t * ZxDevice ()
Defined at line 205 of file ../../src/devices/misc/drivers/compat/device.cc
void Bind (fidl::WireSharedClient<fuchsia_driver_framework::Node> node)
Binds a device to a DFv2 node.
Defined at line 207 of file ../../src/devices/misc/drivers/compat/device.cc
void Unbind ()
Unbinds a device from a DFv2 node.
Defined at line 209 of file ../../src/devices/misc/drivers/compat/device.cc
fpromise::promise<void> HandleStopSignal ()
Call Unbind or Suspend based on the power state.
Defined at line 218 of file ../../src/devices/misc/drivers/compat/device.cc
fpromise::promise<void> UnbindOp ()
Call the Unbind op for the device.
Defined at line 228 of file ../../src/devices/misc/drivers/compat/device.cc
fpromise::promise<void> SuspendOp ()
Call the Suspend op for the device.
Defined at line 248 of file ../../src/devices/misc/drivers/compat/device.cc
fpromise::promise<void> RemoveChildren ()
Removes all of the child devices.
Defined at line 629 of file ../../src/devices/misc/drivers/compat/device.cc
fpromise::promise<void> SuspendChildren ()
Suspends all of the child devices.
Defined at line 648 of file ../../src/devices/misc/drivers/compat/device.cc
const char * Name ()
Defined at line 293 of file ../../src/devices/misc/drivers/compat/device.cc
bool HasChildren ()
Defined at line 295 of file ../../src/devices/misc/drivers/compat/device.cc
zx_status_t Add (device_add_args_t * zx_args, zx_device_t ** out)
Functions to implement the DFv1 device API.
Defined at line 303 of file ../../src/devices/misc/drivers/compat/device.cc
fpromise::promise<void> Remove ()
Remove this device. This call will make sure that DFv1 unbind and release
are called in the correct order. This promise will finish once the device
has been completely removed.
Defined at line 667 of file ../../src/devices/misc/drivers/compat/device.cc
zx_status_t GetProtocol (uint32_t proto_id, void * out)
Defined at line 750 of file ../../src/devices/misc/drivers/compat/device.cc
zx_status_t GetFragmentProtocol (const char *fragment,uint32_tproto_id,void *out)
Defined at line 785 of file ../../src/devices/misc/drivers/compat/device.cc
zx_status_t AddMetadata (uint32_ttype,const void *data,size_tsize)
Defined at line 794 of file ../../src/devices/misc/drivers/compat/device.cc
zx_status_t GetMetadata (uint32_ttype,void *buf,size_tbuflen,size_t *actual)
Defined at line 798 of file ../../src/devices/misc/drivers/compat/device.cc
zx_status_t RegisterServiceMember (component::AnyHandlerhandler,const char *service_name,const char *instance_name,const char *member_name)
Defined at line 802 of file ../../src/devices/misc/drivers/compat/device.cc
void InitReply (zx_status_t status)
Defined at line 821 of file ../../src/devices/misc/drivers/compat/device.cc
zx_status_t ConnectFragmentFidl (const char *fragment_name,const char *service_name,const char *protocol_name,zx::channelrequest,boolzircon_transport)
Defined at line 891 of file ../../src/devices/misc/drivers/compat/device.cc
zx_status_t AddCompositeNodeSpec (const char * name, const composite_node_spec_t * spec)
Defined at line 923 of file ../../src/devices/misc/drivers/compat/device.cc
zx_status_t ConnectFragmentRuntime (const char *fragment_name,const char *service_name,const char *protocol_name,fdf::Channelrequest)
Connects to the runtime service using the v2 protocol discovery with tokens.
Defined at line 963 of file ../../src/devices/misc/drivers/compat/device.cc
zx_status_t ConnectNsProtocol (const char * protocol_name, zx::channel request)
Defined at line 979 of file ../../src/devices/misc/drivers/compat/device.cc
fpromise::promise<void, zx_status_t> WaitForInitToComplete ()
Defined at line 877 of file ../../src/devices/misc/drivers/compat/device.cc
zx_status_t CreateNode ()
Defined at line 432 of file ../../src/devices/misc/drivers/compat/device.cc
void CompleteUnbind ()
Defined at line 270 of file ../../src/devices/misc/drivers/compat/device.cc
void CompleteSuspend ()
Defined at line 288 of file ../../src/devices/misc/drivers/compat/device.cc
zx_status_t PublishInspect (zx::vmo inspect_vmo)
Defined at line 985 of file ../../src/devices/misc/drivers/compat/device.cc
void AddDelayedChildReleaseOp (std::unique_ptr<DelayedReleaseOp> op)
Stores the child's release op, to be called after dispatcher shutdown.
Defined at line 1005 of file ../../src/devices/misc/drivers/compat/device.cc