162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/* Copyright (c) 2018, The Linux Foundation. All rights reserved. */
362306a36Sopenharmony_ci
462306a36Sopenharmony_ci#ifndef __QCOM_RPMH_REGULATOR_H
562306a36Sopenharmony_ci#define __QCOM_RPMH_REGULATOR_H
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci/*
862306a36Sopenharmony_ci * These mode constants may be used to specify modes for various RPMh regulator
962306a36Sopenharmony_ci * device tree properties (e.g. regulator-initial-mode).  Each type of regulator
1062306a36Sopenharmony_ci * supports a subset of the possible modes.
1162306a36Sopenharmony_ci *
1262306a36Sopenharmony_ci * %RPMH_REGULATOR_MODE_RET:	Retention mode in which only an extremely small
1362306a36Sopenharmony_ci *				load current is allowed.  This mode is supported
1462306a36Sopenharmony_ci *				by LDO and SMPS type regulators.
1562306a36Sopenharmony_ci * %RPMH_REGULATOR_MODE_LPM:	Low power mode in which a small load current is
1662306a36Sopenharmony_ci *				allowed.  This mode corresponds to PFM for SMPS
1762306a36Sopenharmony_ci *				and BOB type regulators.  This mode is supported
1862306a36Sopenharmony_ci *				by LDO, HFSMPS, BOB, and PMIC4 FTSMPS type
1962306a36Sopenharmony_ci *				regulators.
2062306a36Sopenharmony_ci * %RPMH_REGULATOR_MODE_AUTO:	Auto mode in which the regulator hardware
2162306a36Sopenharmony_ci *				automatically switches between LPM and HPM based
2262306a36Sopenharmony_ci *				upon the real-time load current.  This mode is
2362306a36Sopenharmony_ci *				supported by HFSMPS, BOB, and PMIC4 FTSMPS type
2462306a36Sopenharmony_ci *				regulators.
2562306a36Sopenharmony_ci * %RPMH_REGULATOR_MODE_HPM:	High power mode in which the full rated current
2662306a36Sopenharmony_ci *				of the regulator is allowed.  This mode
2762306a36Sopenharmony_ci *				corresponds to PWM for SMPS and BOB type
2862306a36Sopenharmony_ci *				regulators.  This mode is supported by all types
2962306a36Sopenharmony_ci *				of regulators.
3062306a36Sopenharmony_ci */
3162306a36Sopenharmony_ci#define RPMH_REGULATOR_MODE_RET		0
3262306a36Sopenharmony_ci#define RPMH_REGULATOR_MODE_LPM		1
3362306a36Sopenharmony_ci#define RPMH_REGULATOR_MODE_AUTO	2
3462306a36Sopenharmony_ci#define RPMH_REGULATOR_MODE_HPM		3
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci#endif
37