sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget,/translations/zh_CN/power/regulator/overviewmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/zh_TW/power/regulator/overviewmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/it_IT/power/regulator/overviewmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ja_JP/power/regulator/overviewmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ko_KR/power/regulator/overviewmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/sp_SP/power/regulator/overviewmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h-Linux voltage and current regulator frameworkh]h-Linux voltage and current regulator framework}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhF/var/lib/git/docbuild/linux/Documentation/power/regulator/overview.rsthKubh)}(hhh](h)}(hAbouth]hAbout}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hlThis framework is designed to provide a standard kernel interface to control voltage and current regulators.h]hlThis framework is designed to provide a standard kernel interface to control voltage and current regulators.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXThe intention is to allow systems to dynamically control regulator power output in order to save power and prolong battery life. This applies to both voltage regulators (where voltage output is controllable) and current sinks (where current limit is controllable).h]hXThe intention is to allow systems to dynamically control regulator power output in order to save power and prolong battery life. This applies to both voltage regulators (where voltage output is controllable) and current sinks (where current limit is controllable).}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubhenumerated_list)}(hhh]h list_item)}(h$2008 Wolfson Microelectronics PLC. h]h)}(h#2008 Wolfson Microelectronics PLC.h]h#2008 Wolfson Microelectronics PLC.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubah}(h]h ]h"]h$]h&]enumtype upperalphaprefix(suffix)startKuh1hhhhhhhhKubh)}(h+Author: Liam Girdwood h](hAuthor: Liam Girdwood <}(hjhhhNhNubh reference)}(hlrg@slimlogic.co.ukh]hlrg@slimlogic.co.uk}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:lrg@slimlogic.co.ukuh1jhjubh>}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]aboutah ]h"]aboutah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Nomenclatureh]h Nomenclature}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hhhhhKubh)}(h!Some terms used in this document:h]h!Some terms used in this document:}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj>hhubh block_quote)}(hXW- Regulator - Electronic device that supplies power to other devices. Most regulators can enable and disable their output while some can control their output voltage and or current. Input Voltage -> Regulator -> Output Voltage - PMIC - Power Management IC. An IC that contains numerous regulators and often contains other subsystems. - Consumer - Electronic device that is supplied power by a regulator. Consumers can be classified into two types:- Static: consumer does not change its supply voltage or current limit. It only needs to enable or disable its power supply. Its supply voltage is set by the hardware, bootloader, firmware or kernel board initialisation code. Dynamic: consumer needs to change its supply voltage or current limit to meet operation demands. - Power Domain - Electronic circuit that is supplied its input power by the output power of a regulator, switch or by another power domain. The supply regulator may be behind a switch(s). i.e.:: Regulator -+-> Switch-1 -+-> Switch-2 --> [Consumer A] | | | +-> [Consumer B], [Consumer C] | +-> [Consumer D], [Consumer E] That is one regulator and three power domains: - Domain 1: Switch-1, Consumers D & E. - Domain 2: Switch-2, Consumers B & C. - Domain 3: Consumer A. and this represents a "supplies" relationship: Domain-1 --> Domain-2 --> Domain-3. A power domain may have regulators that are supplied power by other regulators. i.e.:: Regulator-1 -+-> Regulator-2 -+-> [Consumer A] | +-> [Consumer B] This gives us two regulators and two power domains: - Domain 1: Regulator-2, Consumer B. - Domain 2: Consumer A. and a "supplies" relationship: Domain-1 --> Domain-2 - Constraints - Constraints are used to define power levels for performance and hardware protection. Constraints exist at three levels: Regulator Level: This is defined by the regulator hardware operating parameters and is specified in the regulator datasheet. i.e. - voltage output is in the range 800mV -> 3500mV. - regulator current output limit is 20mA @ 5V but is 10mA @ 10V. Power Domain Level: This is defined in software by kernel level board initialisation code. It is used to constrain a power domain to a particular power range. i.e. - Domain-1 voltage is 3300mV - Domain-2 voltage is 1400mV -> 1600mV - Domain-3 current limit is 0mA -> 20mA. Consumer Level: This is defined by consumer drivers dynamically setting voltage or current limit levels. e.g. a consumer backlight driver asks for a current increase from 5mA to 10mA to increase LCD illumination. This passes to through the levels as follows :- Consumer: need to increase LCD brightness. Lookup and request next current mA value in brightness table (the consumer driver could be used on several different personalities based upon the same reference device). Power Domain: is the new current limit within the domain operating limits for this domain and system state (e.g. battery power, USB power) Regulator Domains: is the new current limit within the regulator operating parameters for input/output voltage. If the regulator request passes all the constraint tests then the new regulator value is applied. h]h bullet_list)}(hhh](h)}(hXRegulator - Electronic device that supplies power to other devices. Most regulators can enable and disable their output while some can control their output voltage and or current. Input Voltage -> Regulator -> Output Voltage h]hdefinition_list)}(hhh]hdefinition_list_item)}(hRegulator - Electronic device that supplies power to other devices. Most regulators can enable and disable their output while some can control their output voltage and or current. Input Voltage -> Regulator -> Output Voltage h](hterm)}(h Regulatorh]h Regulator}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jwhhhK hjsubh definition)}(hhh]jd)}(hhh]h)}(hElectronic device that supplies power to other devices. Most regulators can enable and disable their output while some can control their output voltage and or current. Input Voltage -> Regulator -> Output Voltage h](h)}(hElectronic device that supplies power to other devices. Most regulators can enable and disable their output while some can control their output voltage and or current.h]hElectronic device that supplies power to other devices. Most regulators can enable and disable their output while some can control their output voltage and or current.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h,Input Voltage -> Regulator -> Output Voltageh]h,Input Voltage -> Regulator -> Output Voltage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]bullet-uh1jchhhKhjubah}(h]h ]h"]h$]h&]uh1jhjsubeh}(h]h ]h"]h$]h&]uh1jqhhhK hjnubah}(h]h ]h"]h$]h&]uh1jlhjhubah}(h]h ]h"]h$]h&]uh1hhjeubh)}(hPMIC - Power Management IC. An IC that contains numerous regulators and often contains other subsystems. h]jm)}(hhh]jr)}(hlPMIC - Power Management IC. An IC that contains numerous regulators and often contains other subsystems. h](jx)}(hPMICh]hPMIC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jwhhhK%hjubj)}(hhh]jd)}(hhh]h)}(hcPower Management IC. An IC that contains numerous regulators and often contains other subsystems. h]h)}(haPower Management IC. An IC that contains numerous regulators and often contains other subsystems.h]haPower Management IC. An IC that contains numerous regulators and often contains other subsystems.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]jjuh1jchhhK#hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jqhhhK%hjubah}(h]h ]h"]h$]h&]uh1jlhjubah}(h]h ]h"]h$]h&]uh1hhjeubh)}(hX+Consumer - Electronic device that is supplied power by a regulator. Consumers can be classified into two types:- Static: consumer does not change its supply voltage or current limit. It only needs to enable or disable its power supply. Its supply voltage is set by the hardware, bootloader, firmware or kernel board initialisation code. Dynamic: consumer needs to change its supply voltage or current limit to meet operation demands. h]jm)}(hhh]jr)}(hXConsumer - Electronic device that is supplied power by a regulator. Consumers can be classified into two types:- Static: consumer does not change its supply voltage or current limit. It only needs to enable or disable its power supply. Its supply voltage is set by the hardware, bootloader, firmware or kernel board initialisation code. Dynamic: consumer needs to change its supply voltage or current limit to meet operation demands. h](jx)}(hConsumerh]hConsumer}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jwhhhK2hj1ubj)}(hhh]jd)}(hhh]h)}(hXElectronic device that is supplied power by a regulator. Consumers can be classified into two types:- Static: consumer does not change its supply voltage or current limit. It only needs to enable or disable its power supply. Its supply voltage is set by the hardware, bootloader, firmware or kernel board initialisation code. Dynamic: consumer needs to change its supply voltage or current limit to meet operation demands. h](h)}(heElectronic device that is supplied power by a regulator. Consumers can be classified into two types:-h]heElectronic device that is supplied power by a regulator. Consumers can be classified into two types:-}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjIubh)}(hStatic: consumer does not change its supply voltage or current limit. It only needs to enable or disable its power supply. Its supply voltage is set by the hardware, bootloader, firmware or kernel board initialisation code.h]hStatic: consumer does not change its supply voltage or current limit. It only needs to enable or disable its power supply. Its supply voltage is set by the hardware, bootloader, firmware or kernel board initialisation code.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjIubh)}(h`Dynamic: consumer needs to change its supply voltage or current limit to meet operation demands.h]h`Dynamic: consumer needs to change its supply voltage or current limit to meet operation demands.}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjIubeh}(h]h ]h"]h$]h&]uh1hhjFubah}(h]h ]h"]h$]h&]jjuh1jchhhK(hjCubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jqhhhK2hj.ubah}(h]h ]h"]h$]h&]uh1jlhj*ubah}(h]h ]h"]h$]h&]uh1hhjeubh)}(hXUPower Domain - Electronic circuit that is supplied its input power by the output power of a regulator, switch or by another power domain. The supply regulator may be behind a switch(s). i.e.:: Regulator -+-> Switch-1 -+-> Switch-2 --> [Consumer A] | | | +-> [Consumer B], [Consumer C] | +-> [Consumer D], [Consumer E] That is one regulator and three power domains: - Domain 1: Switch-1, Consumers D & E. - Domain 2: Switch-2, Consumers B & C. - Domain 3: Consumer A. and this represents a "supplies" relationship: Domain-1 --> Domain-2 --> Domain-3. A power domain may have regulators that are supplied power by other regulators. i.e.:: Regulator-1 -+-> Regulator-2 -+-> [Consumer A] | +-> [Consumer B] This gives us two regulators and two power domains: - Domain 1: Regulator-2, Consumer B. - Domain 2: Consumer A. and a "supplies" relationship: Domain-1 --> Domain-2 h]jm)}(hhh]jr)}(hXPower Domain - Electronic circuit that is supplied its input power by the output power of a regulator, switch or by another power domain. The supply regulator may be behind a switch(s). i.e.:: Regulator -+-> Switch-1 -+-> Switch-2 --> [Consumer A] | | | +-> [Consumer B], [Consumer C] | +-> [Consumer D], [Consumer E] That is one regulator and three power domains: - Domain 1: Switch-1, Consumers D & E. - Domain 2: Switch-2, Consumers B & C. - Domain 3: Consumer A. and this represents a "supplies" relationship: Domain-1 --> Domain-2 --> Domain-3. A power domain may have regulators that are supplied power by other regulators. i.e.:: Regulator-1 -+-> Regulator-2 -+-> [Consumer A] | +-> [Consumer B] This gives us two regulators and two power domains: - Domain 1: Regulator-2, Consumer B. - Domain 2: Consumer A. and a "supplies" relationship: Domain-1 --> Domain-2 h](jx)}(h Power Domainh]h Power Domain}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jwhhhKZhjubj)}(hhh]jd)}(hhh]h)}(hXElectronic circuit that is supplied its input power by the output power of a regulator, switch or by another power domain. The supply regulator may be behind a switch(s). i.e.:: Regulator -+-> Switch-1 -+-> Switch-2 --> [Consumer A] | | | +-> [Consumer B], [Consumer C] | +-> [Consumer D], [Consumer E] That is one regulator and three power domains: - Domain 1: Switch-1, Consumers D & E. - Domain 2: Switch-2, Consumers B & C. - Domain 3: Consumer A. and this represents a "supplies" relationship: Domain-1 --> Domain-2 --> Domain-3. A power domain may have regulators that are supplied power by other regulators. i.e.:: Regulator-1 -+-> Regulator-2 -+-> [Consumer A] | +-> [Consumer B] This gives us two regulators and two power domains: - Domain 1: Regulator-2, Consumer B. - Domain 2: Consumer A. and a "supplies" relationship: Domain-1 --> Domain-2 h](h)}(hzElectronic circuit that is supplied its input power by the output power of a regulator, switch or by another power domain.h]hzElectronic circuit that is supplied its input power by the output power of a regulator, switch or by another power domain.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjubh)}(h6The supply regulator may be behind a switch(s). i.e.::h]h5The supply regulator may be behind a switch(s). i.e.:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjubh literal_block)}(hRegulator -+-> Switch-1 -+-> Switch-2 --> [Consumer A] | | | +-> [Consumer B], [Consumer C] | +-> [Consumer D], [Consumer E]h]hRegulator -+-> Switch-1 -+-> Switch-2 --> [Consumer A] | | | +-> [Consumer B], [Consumer C] | +-> [Consumer D], [Consumer E]}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhK;hjubh)}(h.That is one regulator and three power domains:h]h.That is one regulator and three power domains:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKAhjubjd)}(hhh](h)}(h$Domain 1: Switch-1, Consumers D & E.h]h)}(hjh]h$Domain 1: Switch-1, Consumers D & E.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKChjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h$Domain 2: Switch-2, Consumers B & C.h]h)}(hjh]h$Domain 2: Switch-2, Consumers B & C.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hDomain 3: Consumer A. h]h)}(hDomain 3: Consumer A.h]hDomain 3: Consumer A.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKEhj+ubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]jjuh1jchhhKChjubh)}(h.and this represents a "supplies" relationship:h]h2and this represents a “supplies” relationship:}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhjubh)}(h#Domain-1 --> Domain-2 --> Domain-3.h]h#Domain-1 --> Domain-2 --> Domain-3.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhjubh)}(hVA power domain may have regulators that are supplied power by other regulators. i.e.::h]hUA power domain may have regulators that are supplied power by other regulators. i.e.:}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjubj)}(h[Regulator-1 -+-> Regulator-2 -+-> [Consumer A] | +-> [Consumer B]h]h[Regulator-1 -+-> Regulator-2 -+-> [Consumer A] | +-> [Consumer B]}hjssbah}(h]h ]h"]h$]h&]jjuh1jhhhKNhjubh)}(h3This gives us two regulators and two power domains:h]h3This gives us two regulators and two power domains:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjubjd)}(hhh](h)}(h"Domain 1: Regulator-2, Consumer B.h]h)}(hjh]h"Domain 1: Regulator-2, Consumer B.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hDomain 2: Consumer A. h]h)}(hDomain 2: Consumer A.h]hDomain 2: Consumer A.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]jjuh1jchhhKThjubh)}(hand a "supplies" relationship:h]h"and a “supplies” relationship:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKWhjubh)}(hDomain-1 --> Domain-2h]hDomain-1 --> Domain-2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKYhjubeh}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]jjuh1jchhhK5hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jqhhhKZhjubah}(h]h ]h"]h$]h&]uh1jlhjubah}(h]h ]h"]h$]h&]uh1hhjeubh)}(hXConstraints - Constraints are used to define power levels for performance and hardware protection. Constraints exist at three levels: Regulator Level: This is defined by the regulator hardware operating parameters and is specified in the regulator datasheet. i.e. - voltage output is in the range 800mV -> 3500mV. - regulator current output limit is 20mA @ 5V but is 10mA @ 10V. Power Domain Level: This is defined in software by kernel level board initialisation code. It is used to constrain a power domain to a particular power range. i.e. - Domain-1 voltage is 3300mV - Domain-2 voltage is 1400mV -> 1600mV - Domain-3 current limit is 0mA -> 20mA. Consumer Level: This is defined by consumer drivers dynamically setting voltage or current limit levels. e.g. a consumer backlight driver asks for a current increase from 5mA to 10mA to increase LCD illumination. This passes to through the levels as follows :- Consumer: need to increase LCD brightness. Lookup and request next current mA value in brightness table (the consumer driver could be used on several different personalities based upon the same reference device). Power Domain: is the new current limit within the domain operating limits for this domain and system state (e.g. battery power, USB power) Regulator Domains: is the new current limit within the regulator operating parameters for input/output voltage. If the regulator request passes all the constraint tests then the new regulator value is applied. h]jm)}(hhh]jr)}(hXConstraints - Constraints are used to define power levels for performance and hardware protection. Constraints exist at three levels: Regulator Level: This is defined by the regulator hardware operating parameters and is specified in the regulator datasheet. i.e. - voltage output is in the range 800mV -> 3500mV. - regulator current output limit is 20mA @ 5V but is 10mA @ 10V. Power Domain Level: This is defined in software by kernel level board initialisation code. It is used to constrain a power domain to a particular power range. i.e. - Domain-1 voltage is 3300mV - Domain-2 voltage is 1400mV -> 1600mV - Domain-3 current limit is 0mA -> 20mA. Consumer Level: This is defined by consumer drivers dynamically setting voltage or current limit levels. e.g. a consumer backlight driver asks for a current increase from 5mA to 10mA to increase LCD illumination. This passes to through the levels as follows :- Consumer: need to increase LCD brightness. Lookup and request next current mA value in brightness table (the consumer driver could be used on several different personalities based upon the same reference device). Power Domain: is the new current limit within the domain operating limits for this domain and system state (e.g. battery power, USB power) Regulator Domains: is the new current limit within the regulator operating parameters for input/output voltage. If the regulator request passes all the constraint tests then the new regulator value is applied. h](jx)}(h Constraintsh]h Constraints}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jwhhhKhjubj)}(hhh]jd)}(hhh]h)}(hXConstraints are used to define power levels for performance and hardware protection. Constraints exist at three levels: Regulator Level: This is defined by the regulator hardware operating parameters and is specified in the regulator datasheet. i.e. - voltage output is in the range 800mV -> 3500mV. - regulator current output limit is 20mA @ 5V but is 10mA @ 10V. Power Domain Level: This is defined in software by kernel level board initialisation code. It is used to constrain a power domain to a particular power range. i.e. - Domain-1 voltage is 3300mV - Domain-2 voltage is 1400mV -> 1600mV - Domain-3 current limit is 0mA -> 20mA. Consumer Level: This is defined by consumer drivers dynamically setting voltage or current limit levels. e.g. a consumer backlight driver asks for a current increase from 5mA to 10mA to increase LCD illumination. This passes to through the levels as follows :- Consumer: need to increase LCD brightness. Lookup and request next current mA value in brightness table (the consumer driver could be used on several different personalities based upon the same reference device). Power Domain: is the new current limit within the domain operating limits for this domain and system state (e.g. battery power, USB power) Regulator Domains: is the new current limit within the regulator operating parameters for input/output voltage. If the regulator request passes all the constraint tests then the new regulator value is applied. h](h)}(hwConstraints are used to define power levels for performance and hardware protection. Constraints exist at three levels:h]hwConstraints are used to define power levels for performance and hardware protection. Constraints exist at three levels:}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hj&ubh)}(hRegulator Level: This is defined by the regulator hardware operating parameters and is specified in the regulator datasheet. i.e.h]hRegulator Level: This is defined by the regulator hardware operating parameters and is specified in the regulator datasheet. i.e.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hj&ubj^)}(hu- voltage output is in the range 800mV -> 3500mV. - regulator current output limit is 20mA @ 5V but is 10mA @ 10V. h]jd)}(hhh](h)}(h/voltage output is in the range 800mV -> 3500mV.h]h)}(hjOh]h/voltage output is in the range 800mV -> 3500mV.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhjMubah}(h]h ]h"]h$]h&]uh1hhjJubh)}(h?regulator current output limit is 20mA @ 5V but is 10mA @ 10V. h]h)}(h>regulator current output limit is 20mA @ 5V but is 10mA @ 10V.h]h>regulator current output limit is 20mA @ 5V but is 10mA @ 10V.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehjdubah}(h]h ]h"]h$]h&]uh1hhjJubeh}(h]h ]h"]h$]h&]jjuh1jchhhKdhjFubah}(h]h ]h"]h$]h&]uh1j]hhhKdhj&ubh)}(hPower Domain Level: This is defined in software by kernel level board initialisation code. It is used to constrain a power domain to a particular power range. i.e.h]hPower Domain Level: This is defined in software by kernel level board initialisation code. It is used to constrain a power domain to a particular power range. i.e.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhj&ubj^)}(hm- Domain-1 voltage is 3300mV - Domain-2 voltage is 1400mV -> 1600mV - Domain-3 current limit is 0mA -> 20mA. h]jd)}(hhh](h)}(hDomain-1 voltage is 3300mVh]h)}(hjh]hDomain-1 voltage is 3300mV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h$Domain-2 voltage is 1400mV -> 1600mVh]h)}(hjh]h$Domain-2 voltage is 1400mV -> 1600mV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h'Domain-3 current limit is 0mA -> 20mA. h]h)}(h&Domain-3 current limit is 0mA -> 20mA.h]h&Domain-3 current limit is 0mA -> 20mA.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]jjuh1jchhhKlhjubah}(h]h ]h"]h$]h&]uh1j]hhhKlhj&ubh)}(hhConsumer Level: This is defined by consumer drivers dynamically setting voltage or current limit levels.h]hhConsumer Level: This is defined by consumer drivers dynamically setting voltage or current limit levels.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphj&ubh)}(he.g. a consumer backlight driver asks for a current increase from 5mA to 10mA to increase LCD illumination. This passes to through the levels as follows :-h]he.g. a consumer backlight driver asks for a current increase from 5mA to 10mA to increase LCD illumination. This passes to through the levels as follows :-}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshj&ubh)}(hConsumer: need to increase LCD brightness. Lookup and request next current mA value in brightness table (the consumer driver could be used on several different personalities based upon the same reference device).h]hConsumer: need to increase LCD brightness. Lookup and request next current mA value in brightness table (the consumer driver could be used on several different personalities based upon the same reference device).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhj&ubh)}(hPower Domain: is the new current limit within the domain operating limits for this domain and system state (e.g. battery power, USB power)h]hPower Domain: is the new current limit within the domain operating limits for this domain and system state (e.g. battery power, USB power)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hj&ubh)}(hoRegulator Domains: is the new current limit within the regulator operating parameters for input/output voltage.h]hoRegulator Domains: is the new current limit within the regulator operating parameters for input/output voltage.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj&ubh)}(haIf the regulator request passes all the constraint tests then the new regulator value is applied.h]haIf the regulator request passes all the constraint tests then the new regulator value is applied.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj&ubeh}(h]h ]h"]h$]h&]uh1hhj#ubah}(h]h ]h"]h$]h&]jjuh1jchhhK]hj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jqhhhKhj ubah}(h]h ]h"]h$]h&]uh1jlhjubah}(h]h ]h"]h$]h&]uh1hhjeubeh}(h]h ]h"]h$]h&]jjuh1jchhhKhj_ubah}(h]h ]h"]h$]h&]uh1j]hhhKhj>hhubeh}(h] nomenclatureah ]h"] nomenclatureah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hDesignh]hDesign}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hhhhhKubh)}(hThe framework is designed and targeted at SoC based devices but may also be relevant to non SoC devices and is split into the following four interfaces:-h]hThe framework is designed and targeted at SoC based devices but may also be relevant to non SoC devices and is split into the following four interfaces:-}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{hhubj^)}(hX1. Consumer driver interface. This uses a similar API to the kernel clock interface in that consumer drivers can get and put a regulator (like they can with clocks atm) and get/set voltage, current limit, mode, enable and disable. This should allow consumers complete control over their supply voltage and current limit. This also compiles out if not in use so drivers can be reused in systems with no regulator based power control. See Documentation/power/regulator/consumer.rst 2. Regulator driver interface. This allows regulator drivers to register their regulators and provide operations to the core. It also has a notifier call chain for propagating regulator events to clients. See Documentation/power/regulator/regulator.rst 3. Machine interface. This interface is for machine specific code and allows the creation of voltage/current domains (with constraints) for each regulator. It can provide regulator constraints that will prevent device damage through overvoltage or overcurrent caused by buggy client drivers. It also allows the creation of a regulator tree whereby some regulators are supplied by others (similar to a clock tree). See Documentation/power/regulator/machine.rst 4. Userspace ABI. The framework also exports a lot of useful voltage/current/opmode data to userspace via sysfs. This could be used to help monitor device power consumption and status. See Documentation/ABI/testing/sysfs-class-regulatorh]h)}(hhh](h)}(hXConsumer driver interface. This uses a similar API to the kernel clock interface in that consumer drivers can get and put a regulator (like they can with clocks atm) and get/set voltage, current limit, mode, enable and disable. This should allow consumers complete control over their supply voltage and current limit. This also compiles out if not in use so drivers can be reused in systems with no regulator based power control. See Documentation/power/regulator/consumer.rst h](h)}(hConsumer driver interface.h]hConsumer driver interface.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hXThis uses a similar API to the kernel clock interface in that consumer drivers can get and put a regulator (like they can with clocks atm) and get/set voltage, current limit, mode, enable and disable. This should allow consumers complete control over their supply voltage and current limit. This also compiles out if not in use so drivers can be reused in systems with no regulator based power control.h]hXThis uses a similar API to the kernel clock interface in that consumer drivers can get and put a regulator (like they can with clocks atm) and get/set voltage, current limit, mode, enable and disable. This should allow consumers complete control over their supply voltage and current limit. This also compiles out if not in use so drivers can be reused in systems with no regulator based power control.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj^)}(h/See Documentation/power/regulator/consumer.rst h]h)}(h.See Documentation/power/regulator/consumer.rsth]h.See Documentation/power/regulator/consumer.rst}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j]hhhKhjubeh}(h]h ]h"]h$]h&]uh1hhjubh)}(hRegulator driver interface. This allows regulator drivers to register their regulators and provide operations to the core. It also has a notifier call chain for propagating regulator events to clients. See Documentation/power/regulator/regulator.rst h](h)}(hRegulator driver interface.h]hRegulator driver interface.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hThis allows regulator drivers to register their regulators and provide operations to the core. It also has a notifier call chain for propagating regulator events to clients.h]hThis allows regulator drivers to register their regulators and provide operations to the core. It also has a notifier call chain for propagating regulator events to clients.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj^)}(h0See Documentation/power/regulator/regulator.rst h]h)}(h/See Documentation/power/regulator/regulator.rsth]h/See Documentation/power/regulator/regulator.rst}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j]hhhKhjubeh}(h]h ]h"]h$]h&]uh1hhjubh)}(hXMachine interface. This interface is for machine specific code and allows the creation of voltage/current domains (with constraints) for each regulator. It can provide regulator constraints that will prevent device damage through overvoltage or overcurrent caused by buggy client drivers. It also allows the creation of a regulator tree whereby some regulators are supplied by others (similar to a clock tree). See Documentation/power/regulator/machine.rst h](h)}(hMachine interface.h]hMachine interface.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hXThis interface is for machine specific code and allows the creation of voltage/current domains (with constraints) for each regulator. It can provide regulator constraints that will prevent device damage through overvoltage or overcurrent caused by buggy client drivers. It also allows the creation of a regulator tree whereby some regulators are supplied by others (similar to a clock tree).h]hXThis interface is for machine specific code and allows the creation of voltage/current domains (with constraints) for each regulator. It can provide regulator constraints that will prevent device damage through overvoltage or overcurrent caused by buggy client drivers. It also allows the creation of a regulator tree whereby some regulators are supplied by others (similar to a clock tree).}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj^)}(h.See Documentation/power/regulator/machine.rst h]h)}(h-See Documentation/power/regulator/machine.rsth]h-See Documentation/power/regulator/machine.rst}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj=ubah}(h]h ]h"]h$]h&]uh1j]hhhKhjubeh}(h]h ]h"]h$]h&]uh1hhjubh)}(hUserspace ABI. The framework also exports a lot of useful voltage/current/opmode data to userspace via sysfs. This could be used to help monitor device power consumption and status. See Documentation/ABI/testing/sysfs-class-regulatorh](h)}(hUserspace ABI.h]hUserspace ABI.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj[ubh)}(hThe framework also exports a lot of useful voltage/current/opmode data to userspace via sysfs. This could be used to help monitor device power consumption and status.h]hThe framework also exports a lot of useful voltage/current/opmode data to userspace via sysfs. This could be used to help monitor device power consumption and status.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj[ubj^)}(h3See Documentation/ABI/testing/sysfs-class-regulatorh]h)}(hj}h]h3See Documentation/ABI/testing/sysfs-class-regulator}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{ubah}(h]h ]h"]h$]h&]uh1j]hhhKhj[ubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j arabicj hj.uh1hhjubah}(h]h ]h"]h$]h&]uh1j]hhhKhj{hhubeh}(h]designah ]h"]designah$]h&]uh1hhhhhhhhKubeh}(h]-linux-voltage-and-current-regulator-frameworkah ]h"]-linux voltage and current regulator frameworkah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjj;j8jxjujju nametypes}(jj;jxjuh}(jhj8hjuj>jj{u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]hsystem_message)}(hhh]h)}(h:Enumerated list start value not ordinal-1: "C" (ordinal 3)h]h>Enumerated list start value not ordinal-1: “C” (ordinal 3)}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1j;hhhhhhhKubatransform_messages] transformerN include_log] decorationNhhub.