Intel® Quark™ Microcontroller Software Interface  1.4.0
Intel® Quark™ Microcontroller BSP
vreg.h
1 /*
2  * {% copyright %}
3  */
4 
5 #ifndef __VREG_H__
6 #define __VREG_H__
7 
8 #include "qm_common.h"
9 #include "qm_soc_regs.h"
10 
11 typedef enum {
12  VREG_MODE_SWITCHING = 0,
13  VREG_MODE_LINEAR,
14  VREG_MODE_SHUTDOWN,
15  VREG_MODE_NUM,
16 } vreg_mode_t;
17 
18 /**
19  * Voltage Regulators Control.
20  *
21  * @defgroup groupVREG Quark SE Voltage Regulators
22  * @{
23  */
24 
25 /**
26  * Set AON Voltage Regulator mode.
27  *
28  * The AON Voltage Regulator is not a
29  * switching regulator and only acts as
30  * a linear regulator.
31  * VREG_SWITCHING_MODE is not a value mode
32  * for the AON Voltage Regulator.
33  *
34  * @param[in] mode Voltage Regulator mode.
35  *
36  * @return Standard errno return type for QMSI.
37  * @retval 0 on success.
38  * @retval Negative @ref errno for possible error codes.
39  */
40 int vreg_aon_set_mode(const vreg_mode_t mode);
41 
42 /**
43  * Set Platform 3P3 Voltage Regulator mode.
44  *
45  * @param[in] mode Voltage Regulator mode.
46  *
47  * @return Standard errno return type for QMSI.
48  * @retval 0 on success.
49  * @retval Negative @ref errno for possible error codes.
50  */
51 int vreg_plat3p3_set_mode(const vreg_mode_t mode);
52 
53 /**
54  * Set Platform 1P8 Voltage Regulator mode.
55  *
56  * @param[in] mode Voltage Regulator mode.
57  *
58  * @return Standard errno return type for QMSI.
59  * @retval 0 on success.
60  * @retval Negative @ref errno for possible error codes.
61  */
62 int vreg_plat1p8_set_mode(const vreg_mode_t mode);
63 
64 /**
65  * Set Host Voltage Regulator mode.
66  *
67  * @param[in] mode Voltage Regulator mode.
68  *
69  * @return Standard errno return type for QMSI.
70  * @retval 0 on success.
71  * @retval Negative @ref errno for possible error codes.
72  */
73 int vreg_host_set_mode(const vreg_mode_t mode);
74 
75 /**
76  * @}
77  */
78 
79 #endif /* __VREG_H__ */
int vreg_plat3p3_set_mode(const vreg_mode_t mode)
Set Platform 3P3 Voltage Regulator mode.
Definition: vreg.c:53
int vreg_host_set_mode(const vreg_mode_t mode)
Set Host Voltage Regulator mode.
Definition: vreg.c:65
int vreg_plat1p8_set_mode(const vreg_mode_t mode)
Set Platform 1P8 Voltage Regulator mode.
Definition: vreg.c:59
int vreg_aon_set_mode(const vreg_mode_t mode)
Set AON Voltage Regulator mode.
Definition: vreg.c:45