blob: c8dd759f598186212ed8ce2eb8baef232ceee640 [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 ddk.protocol.powerimpl;
using zx;
using ddk.protocol.power;
[Layout = "ddk-protocol"]
protocol PowerImpl {
/// Get status of a power domain
GetPowerDomainStatus(uint32 index) -> (zx.status s,
ddk.protocol.power.PowerDomainStatus status);
/// Enable a power domain
EnablePowerDomain(uint32 index) -> (zx.status s);
/// Disable a power domain
DisablePowerDomain(uint32 index) -> (zx.status s);
/// Get Supported Voltage Range. min and max are in uV.
GetSupportedVoltageRange(uint32 index) -> (zx.status s, uint32 min, uint32 max);
/// Request for a particular voltage. "voltage" and actual_voltage are in microvolts(uV)
RequestVoltage(uint32 index, uint32 voltage) -> (zx.status s, uint32 actual_voltage);
/// Get current voltage in uV.
GetCurrentVoltage(uint32 index) -> (zx.status s, uint32 current_voltage);
/// Write to ctrl register of PMIC
WritePmicCtrlReg(uint32 index, uint32 reg_addr, uint32 value) -> (zx.status s);
/// Read ctrl register of PMIC
ReadPmicCtrlReg(uint32 index, uint32 reg_addr) -> (zx.status s, uint32 value);
};