1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><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 int min_dropout_uV; 23 const struct regulator_linear_range * linear_ranges; 24 int n_linear_ranges; 25 const unsigned int * volt_table; 26 unsigned int vsel_reg; 27 unsigned int vsel_mask; 28 unsigned int apply_reg; 29 unsigned int apply_bit; 30 unsigned int enable_reg; 31 unsigned int enable_mask; 32 unsigned int enable_val; 33 unsigned int disable_val; 34 bool enable_is_inverted; 35 unsigned int bypass_reg; 36 unsigned int bypass_mask; 37 unsigned int bypass_val_on; 38 unsigned int bypass_val_off; 39 unsigned int enable_time; 40 unsigned int off_on_delay; 41 unsigned int (* of_map_mode) (unsigned int mode); 42}; </pre></div><div class="refsect1"><a name="id-1.7.11.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">name</span></dt><dd><p> 43 Identifying name for the regulator. 44 </p></dd><dt><span class="term">supply_name</span></dt><dd><p> 45 Identifying the regulator supply 46 </p></dd><dt><span class="term">of_match</span></dt><dd><p> 47 Name used to identify regulator in DT. 48 </p></dd><dt><span class="term">regulators_node</span></dt><dd><p> 49 Name of node containing regulator definitions in DT. 50 </p></dd><dt><span class="term">of_parse_cb</span></dt><dd><p> 51 Optional callback called only if of_match is present. 52 Will be called for each regulator parsed from DT, during 53 init_data parsing. 54 The regulator_config passed as argument to the callback will 55 be a copy of config passed to regulator_register, valid only 56 for this particular call. Callback may freely change the 57 config but it cannot store it for later usage. 58 Callback should return 0 on success or negative ERRNO 59 indicating failure. 60 </p></dd><dt><span class="term">id</span></dt><dd><p> 61 Numerical identifier for the regulator. 62 </p></dd><dt><span class="term">continuous_voltage_range</span></dt><dd><p> 63 Indicates if the regulator can set any 64 voltage within constrains range. 65 </p></dd><dt><span class="term">n_voltages</span></dt><dd><p> 66 Number of selectors available for ops.<code class="function">list_voltage</code>. 67 </p></dd><dt><span class="term">ops</span></dt><dd><p> 68 Regulator operations table. 69 </p></dd><dt><span class="term">irq</span></dt><dd><p> 70 Interrupt number for the regulator. 71 </p></dd><dt><span class="term">type</span></dt><dd><p> 72 Indicates if the regulator is a voltage or current regulator. 73 </p></dd><dt><span class="term">owner</span></dt><dd><p> 74 Module providing the regulator, used for refcounting. 75 </p></dd><dt><span class="term">min_uV</span></dt><dd><p> 76 Voltage given by the lowest selector (if linear mapping) 77 </p></dd><dt><span class="term">uV_step</span></dt><dd><p> 78 Voltage increase with each selector (if linear mapping) 79 </p></dd><dt><span class="term">linear_min_sel</span></dt><dd><p> 80 Minimal selector for starting linear mapping 81 </p></dd><dt><span class="term">fixed_uV</span></dt><dd><p> 82 Fixed voltage of rails. 83 </p></dd><dt><span class="term">ramp_delay</span></dt><dd><p> 84 Time to settle down after voltage change (unit: uV/us) 85 </p></dd><dt><span class="term">min_dropout_uV</span></dt><dd><p> 86 The minimum dropout voltage this regulator can handle 87 </p></dd><dt><span class="term">linear_ranges</span></dt><dd><p> 88 A constant table of possible voltage ranges. 89 </p></dd><dt><span class="term">n_linear_ranges</span></dt><dd><p> 90 Number of entries in the <em class="parameter"><code>linear_ranges</code></em> table. 91 </p></dd><dt><span class="term">volt_table</span></dt><dd><p> 92 Voltage mapping table (if table based mapping) 93 </p></dd><dt><span class="term">vsel_reg</span></dt><dd><p> 94 Register for selector when using regulator_regmap_X_voltage_ 95 </p></dd><dt><span class="term">vsel_mask</span></dt><dd><p> 96 Mask for register bitfield used for selector 97 </p></dd><dt><span class="term">apply_reg</span></dt><dd><p> 98 Register for initiate voltage change on the output when 99 using regulator_set_voltage_sel_regmap 100 </p></dd><dt><span class="term">apply_bit</span></dt><dd><p> 101 Register bitfield used for initiate voltage change on the 102 output when using regulator_set_voltage_sel_regmap 103 </p></dd><dt><span class="term">enable_reg</span></dt><dd><p> 104 Register for control when using regmap enable/disable ops 105 </p></dd><dt><span class="term">enable_mask</span></dt><dd><p> 106 Mask for control when using regmap enable/disable ops 107 </p></dd><dt><span class="term">enable_val</span></dt><dd><p> 108 Enabling value for control when using regmap enable/disable ops 109 </p></dd><dt><span class="term">disable_val</span></dt><dd><p> 110 Disabling value for control when using regmap enable/disable ops 111 </p></dd><dt><span class="term">enable_is_inverted</span></dt><dd><p> 112 A flag to indicate set enable_mask bits to disable 113 when using regulator_enable_regmap and friends APIs. 114 </p></dd><dt><span class="term">bypass_reg</span></dt><dd><p> 115 Register for control when using regmap set_bypass 116 </p></dd><dt><span class="term">bypass_mask</span></dt><dd><p> 117 Mask for control when using regmap set_bypass 118 </p></dd><dt><span class="term">bypass_val_on</span></dt><dd><p> 119 Enabling value for control when using regmap set_bypass 120 </p></dd><dt><span class="term">bypass_val_off</span></dt><dd><p> 121 Disabling value for control when using regmap set_bypass 122 </p></dd><dt><span class="term">enable_time</span></dt><dd><p> 123 Time taken for initial enable of regulator (in uS). 124 </p></dd><dt><span class="term">off_on_delay</span></dt><dd><p> 125 guard time (in uS), before re-enabling a regulator 126 </p></dd><dt><span class="term">of_map_mode</span></dt><dd><p> 127 Maps a hardware mode defined in a DeviceTree to a standard mode 128 </p></dd></dl></div></div><div class="refsect1"><a name="id-1.7.11.6"></a><h2>Description</h2><p> 129 </p><p> 130 131 Each regulator registered with the core is described with a 132 structure of this type and a struct regulator_config. This 133 structure contains the non-varying parts of the regulator 134 description. 135</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> 136