1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>struct regulator_desc</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Voltage and current regulator API"><link rel="up" href="api.html" title="Chapter 5. API reference"><link rel="prev" href="API-struct-regulator-ops.html" title="struct regulator_ops"><link rel="next" href="API-struct-regulator-config.html" title="struct regulator_config"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct regulator_desc</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-regulator-ops.html">Prev</a> </td><th width="60%" align="center">Chapter 5. API reference</th><td width="20%" align="right"> <a accesskey="n" href="API-struct-regulator-config.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-regulator-desc"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct regulator_desc — 2 Static regulator descriptor 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4struct regulator_desc { 5 const char * name; 6 const char * supply_name; 7 const char * of_match; 8 const char * regulators_node; 9 int (* of_parse_cb) (struct device_node *,const struct regulator_desc *,struct regulator_config *); 10 int id; 11 bool continuous_voltage_range; 12 unsigned n_voltages; 13 const struct regulator_ops * ops; 14 int irq; 15 enum regulator_type type; 16 struct module * owner; 17 unsigned int min_uV; 18 unsigned int uV_step; 19 unsigned int linear_min_sel; 20 int fixed_uV; 21 unsigned int ramp_delay; 22 const struct regulator_linear_range * linear_ranges; 23 int n_linear_ranges; 24 const unsigned int * volt_table; 25 unsigned int vsel_reg; 26 unsigned int vsel_mask; 27 unsigned int apply_reg; 28 unsigned int apply_bit; 29 unsigned int enable_reg; 30 unsigned int enable_mask; 31 unsigned int enable_val; 32 unsigned int disable_val; 33 bool enable_is_inverted; 34 unsigned int bypass_reg; 35 unsigned int bypass_mask; 36 unsigned int bypass_val_on; 37 unsigned int bypass_val_off; 38 unsigned int enable_time; 39 unsigned int off_on_delay; 40 unsigned int (* of_map_mode) (unsigned int mode); 41}; </pre></div><div class="refsect1"><a name="idp1124865692"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">name</span></dt><dd><p> 42 Identifying name for the regulator. 43 </p></dd><dt><span class="term">supply_name</span></dt><dd><p> 44 Identifying the regulator supply 45 </p></dd><dt><span class="term">of_match</span></dt><dd><p> 46 Name used to identify regulator in DT. 47 </p></dd><dt><span class="term">regulators_node</span></dt><dd><p> 48 Name of node containing regulator definitions in DT. 49 </p></dd><dt><span class="term">of_parse_cb</span></dt><dd><p> 50 Optional callback called only if of_match is present. 51 Will be called for each regulator parsed from DT, during 52 init_data parsing. 53 The regulator_config passed as argument to the callback will 54 be a copy of config passed to regulator_register, valid only 55 for this particular call. Callback may freely change the 56 config but it cannot store it for later usage. 57 Callback should return 0 on success or negative ERRNO 58 indicating failure. 59 </p></dd><dt><span class="term">id</span></dt><dd><p> 60 Numerical identifier for the regulator. 61 </p></dd><dt><span class="term">continuous_voltage_range</span></dt><dd><p> 62 Indicates if the regulator can set any 63 voltage within constrains range. 64 </p></dd><dt><span class="term">n_voltages</span></dt><dd><p> 65 Number of selectors available for ops.<code class="function">list_voltage</code>. 66 </p></dd><dt><span class="term">ops</span></dt><dd><p> 67 Regulator operations table. 68 </p></dd><dt><span class="term">irq</span></dt><dd><p> 69 Interrupt number for the regulator. 70 </p></dd><dt><span class="term">type</span></dt><dd><p> 71 Indicates if the regulator is a voltage or current regulator. 72 </p></dd><dt><span class="term">owner</span></dt><dd><p> 73 Module providing the regulator, used for refcounting. 74 </p></dd><dt><span class="term">min_uV</span></dt><dd><p> 75 Voltage given by the lowest selector (if linear mapping) 76 </p></dd><dt><span class="term">uV_step</span></dt><dd><p> 77 Voltage increase with each selector (if linear mapping) 78 </p></dd><dt><span class="term">linear_min_sel</span></dt><dd><p> 79 Minimal selector for starting linear mapping 80 </p></dd><dt><span class="term">fixed_uV</span></dt><dd><p> 81 Fixed voltage of rails. 82 </p></dd><dt><span class="term">ramp_delay</span></dt><dd><p> 83 Time to settle down after voltage change (unit: uV/us) 84 </p></dd><dt><span class="term">linear_ranges</span></dt><dd><p> 85 A constant table of possible voltage ranges. 86 </p></dd><dt><span class="term">n_linear_ranges</span></dt><dd><p> 87 Number of entries in the <em class="parameter"><code>linear_ranges</code></em> table. 88 </p></dd><dt><span class="term">volt_table</span></dt><dd><p> 89 Voltage mapping table (if table based mapping) 90 </p></dd><dt><span class="term">vsel_reg</span></dt><dd><p> 91 Register for selector when using regulator_regmap_X_voltage_ 92 </p></dd><dt><span class="term">vsel_mask</span></dt><dd><p> 93 Mask for register bitfield used for selector 94 </p></dd><dt><span class="term">apply_reg</span></dt><dd><p> 95 Register for initiate voltage change on the output when 96 using regulator_set_voltage_sel_regmap 97 </p></dd><dt><span class="term">apply_bit</span></dt><dd><p> 98 Register bitfield used for initiate voltage change on the 99 output when using regulator_set_voltage_sel_regmap 100 </p></dd><dt><span class="term">enable_reg</span></dt><dd><p> 101 Register for control when using regmap enable/disable ops 102 </p></dd><dt><span class="term">enable_mask</span></dt><dd><p> 103 Mask for control when using regmap enable/disable ops 104 </p></dd><dt><span class="term">enable_val</span></dt><dd><p> 105 Enabling value for control when using regmap enable/disable ops 106 </p></dd><dt><span class="term">disable_val</span></dt><dd><p> 107 Disabling value for control when using regmap enable/disable ops 108 </p></dd><dt><span class="term">enable_is_inverted</span></dt><dd><p> 109 A flag to indicate set enable_mask bits to disable 110 when using regulator_enable_regmap and friends APIs. 111 </p></dd><dt><span class="term">bypass_reg</span></dt><dd><p> 112 Register for control when using regmap set_bypass 113 </p></dd><dt><span class="term">bypass_mask</span></dt><dd><p> 114 Mask for control when using regmap set_bypass 115 </p></dd><dt><span class="term">bypass_val_on</span></dt><dd><p> 116 Enabling value for control when using regmap set_bypass 117 </p></dd><dt><span class="term">bypass_val_off</span></dt><dd><p> 118 Disabling value for control when using regmap set_bypass 119 </p></dd><dt><span class="term">enable_time</span></dt><dd><p> 120 Time taken for initial enable of regulator (in uS). 121 </p></dd><dt><span class="term">off_on_delay</span></dt><dd><p> 122 guard time (in uS), before re-enabling a regulator 123 </p></dd><dt><span class="term">of_map_mode</span></dt><dd><p> 124 Maps a hardware mode defined in a DeviceTree to a standard mode 125 </p></dd></dl></div></div><div class="refsect1"><a name="idp1124892916"></a><h2>Description</h2><p> 126 </p><p> 127 128 Each regulator registered with the core is described with a 129 structure of this type and a struct regulator_config. This 130 structure contains the non-varying parts of the regulator 131 description. 132</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-regulator-ops.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="api.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-struct-regulator-config.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct regulator_ops</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">struct regulator_config</span></td></tr></table></div></body></html> 133