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