blob: 09ee036dc8baa691df952a5bfa5f188525c7b41b [file] [log] [blame]
// Copyright 2019 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.device.power.test;
using zx;
using fuchsia.device;
struct TestStatusInfo {
/// Driver will respond to suspend hook with this status.
zx.status suspend_status;
/// Driver will respond to resume hook with this status.
zx.status resume_status;
/// This is the out_power_state we want as a reply.
uint8 out_power_state;
/// This is the out_perf_state we want as a reply.
uint8 out_performance_state;
};
protocol TestDevice {
/// Add Test Device with some powerargs
AddDeviceWithPowerArgs(vector<fuchsia.device.DevicePowerStateInfo> info,
vector<fuchsia.device.DevicePerformanceStateInfo> perf_state_info, bool make_visible) -> () error zx.status;
/// Get current power state of the device
GetCurrentDevicePowerState() -> (fuchsia.device.DevicePowerState cur_state) error zx.status;
/// Get the suspend reason of the last suspend call
GetCurrentSuspendReason() -> (uint8 cur_suspend_reason) error zx.status;
/// Get current auto suspend status and deepest_sleep_state
GetCurrentDeviceAutoSuspendConfig() -> (bool enabled,
fuchsia.device.DevicePowerState deepest_sleep_state) error zx.status;
SetTestStatusInfo(TestStatusInfo test_info) -> () error zx.status;
};