1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>regulator_set_load</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-regulator-get-mode.html" title="regulator_get_mode"><link rel="next" href="API-regulator-allow-bypass.html" title="regulator_allow_bypass"></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">regulator_set_load</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-regulator-get-mode.html">Prev</a> </td><th width="60%" align="center">Chapter 5. API reference</th><td width="20%" align="right"> <a accesskey="n" href="API-regulator-allow-bypass.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-regulator-set-load"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>regulator_set_load — 2 set regulator load 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">regulator_set_load </b>(</code></td><td>struct regulator * <var class="pdparam">regulator</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">uA_load</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1125164108"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>regulator</code></em></span></dt><dd><p> 4 regulator source 5 </p></dd><dt><span class="term"><em class="parameter"><code>uA_load</code></em></span></dt><dd><p> 6 load current 7 </p></dd></dl></div></div><div class="refsect1"><a name="idp1125166588"></a><h2>Description</h2><p> 8 Notifies the regulator core of a new device load. This is then used by 9 DRMS (if enabled by constraints) to set the most efficient regulator 10 operating mode for the new regulator loading. 11 </p><p> 12 13 Consumer devices notify their supply regulator of the maximum power 14 they will require (can be taken from device datasheet in the power 15 consumption tables) when they change operational status and hence power 16 state. Examples of operational state changes that can affect power 17</p></div><div class="refsect1"><a name="idp1125167796"></a><h2>consumption are </h2><p> 18 - 19 </p><p> 20 21 o Device is opened / closed. 22 o Device I/O is about to begin or has just finished. 23 o Device is idling in between work. 24 </p><p> 25 26 This information is also exported via sysfs to userspace. 27 </p><p> 28 29 DRMS will sum the total requested load on the regulator and change 30 to the most efficient operating mode if platform constraints allow. 31 </p><p> 32 33 On error a negative errno is returned. 34</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-regulator-get-mode.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-regulator-allow-bypass.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">regulator_get_mode</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">regulator_allow_bypass</span></td></tr></table></div></body></html> 35