| // 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", BanjoLayout = "ddk-protocol"] |
| protocol PowerImpl { |
| /// Get status of a power domain |
| GetPowerDomainStatus(uint32 index) -> (zx.status s, |
| fuchsia.hardware.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); |
| }; |