€•ø‰Œsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ,/translations/zh_CN/power/regulator/consumer”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/zh_TW/power/regulator/consumer”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/it_IT/power/regulator/consumer”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ja_JP/power/regulator/consumer”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ko_KR/power/regulator/consumer”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/pt_BR/power/regulator/consumer”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/sp_SP/power/regulator/consumer”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒ#Regulator Consumer Driver Interface”h]”hŒ#Regulator Consumer Driver Interface”…”�”}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒF/var/lib/git/docbuild/linux/Documentation/power/regulator/consumer.rst”h´KubhŒ paragraph”“”)�”}”(hŒ’This text describes the regulator interface for consumer device drivers. Please see overview.txt for a description of the terms used in this text.”h]”hŒ’This text describes the regulator interface for consumer device drivers. Please see overview.txt for a description of the terms used in this text.”…”�”}”(hhÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubh¶)�”}”(hhh]”(h»)�”}”(hŒ71. Consumer Regulator Access (static & dynamic drivers)”h]”hŒ71. Consumer Regulator Access (static & dynamic drivers)”…”�”}”(hhÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhhÛh²hh³hÊh´K ubhÌ)�”}”(hŒFA consumer driver can get access to its supply regulator by calling ::”h]”hŒCA consumer driver can get access to its supply regulator by calling”…”�”}”(hhìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hhÛh²hubhŒ literal_block”“”)�”}”(hŒ®ulator = regulator_get(dev, "Vcc");”h]”hŒ®ulator = regulator_get(dev, "Vcc");”…”�”}”hhüsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1húh³hÊh´KhhÛh²hubhÌ)�”}”(hXThe consumer passes in its struct device pointer and power supply ID. The core then finds the correct regulator by consulting a machine specific lookup table. If the lookup is successful then this call will return a pointer to the struct regulator that supplies this consumer.”h]”hXThe consumer passes in its struct device pointer and power supply ID. The core then finds the correct regulator by consulting a machine specific lookup table. If the lookup is successful then this call will return a pointer to the struct regulator that supplies this consumer.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KhhÛh²hubhÌ)�”}”(hŒ;To release the regulator the consumer driver should call ::”h]”hŒ8To release the regulator the consumer driver should call”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KhhÛh²hubhû)�”}”(hŒregulator_put(regulator);”h]”hŒregulator_put(regulator);”…”�”}”hj(sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´KhhÛh²hubhÌ)�”}”(hŒˆConsumers can be supplied by more than one regulator e.g. codec consumer with analog and digital supplies by means of bulk operations ::”h]”hŒ…Consumers can be supplied by more than one regulator e.g. codec consumer with analog and digital supplies by means of bulk operations”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KhhÛh²hubhû)�”}”(hX<struct regulator_bulk_data supplies[2]; supplies[0].supply = "Vcc"; /* digital core */ supplies[1].supply = "Avdd"; /* analog */ ret = regulator_bulk_get(dev, ARRAY_SIZE(supplies), supplies); // convenience helper to call regulator_put() on multiple regulators regulator_bulk_free(ARRAY_SIZE(supplies), supplies);”h]”hX<struct regulator_bulk_data supplies[2]; supplies[0].supply = "Vcc"; /* digital core */ supplies[1].supply = "Avdd"; /* analog */ ret = regulator_bulk_get(dev, ARRAY_SIZE(supplies), supplies); // convenience helper to call regulator_put() on multiple regulators regulator_bulk_free(ARRAY_SIZE(supplies), supplies);”…”�”}”hjDsbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´KhhÛh²hubhÌ)�”}”(hŒ“The regulator access functions regulator_get() and regulator_put() will usually be called in your device drivers probe() and remove() respectively.”h]”hŒ“The regulator access functions regulator_get() and regulator_put() will usually be called in your device drivers probe() and remove() respectively.”…”�”}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K'hhÛh²hubeh}”(h]”Œ0consumer-regulator-access-static-dynamic-drivers”ah ]”h"]”Œ71. consumer regulator access (static & dynamic drivers)”ah$]”h&]”uh1hµhh·h²hh³hÊh´K ubh¶)�”}”(hhh]”(h»)�”}”(hŒ?2. Regulator Output Enable & Disable (static & dynamic drivers)”h]”hŒ?2. Regulator Output Enable & Disable (static & dynamic drivers)”…”�”}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjhh²hh³hÊh´K,ubhÌ)�”}”(hŒ3A consumer can enable its power supply by calling::”h]”hŒ2A consumer can enable its power supply by calling:”…”�”}”(hjyh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K/hjhh²hubhû)�”}”(hŒ int regulator_enable(regulator);”h]”hŒ int regulator_enable(regulator);”…”�”}”hj‡sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´K1hjhh²hubhŒdefinition_list”“”)�”}”(hhh]”hŒdefinition_list_item”“”)�”}”(hŒâNOTE: The supply may already be enabled before regulator_enable() is called. This may happen if the consumer shares the regulator or the regulator has been previously enabled by bootloader or kernel board initialization code. ”h]”(hŒterm”“”)�”}”(hŒNOTE:”h]”hŒNOTE:”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÊh´K6hjœubhŒ definition”“”)�”}”(hhh]”hÌ)�”}”(hŒÛThe supply may already be enabled before regulator_enable() is called. This may happen if the consumer shares the regulator or the regulator has been previously enabled by bootloader or kernel board initialization code.”h]”hŒÛThe supply may already be enabled before regulator_enable() is called. This may happen if the consumer shares the regulator or the regulator has been previously enabled by bootloader or kernel board initialization code.”…”�”}”(hjµh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K4hj²ubah}”(h]”h ]”h"]”h$]”h&]”uh1j°hjœubeh}”(h]”h ]”h"]”h$]”h&]”uh1jšh³hÊh´K6hj—ubah}”(h]”h ]”h"]”h$]”h&]”uh1j•hjhh²hh³hÊh´NubhÌ)�”}”(hŒ?A consumer can determine if a regulator is enabled by calling::”h]”hŒ>A consumer can determine if a regulator is enabled by calling:”…”�”}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K8hjhh²hubhû)�”}”(hŒ$int regulator_is_enabled(regulator);”h]”hŒ$int regulator_is_enabled(regulator);”…”�”}”hjãsbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´K:hjhh²hubhÌ)�”}”(hŒ6This will return > zero when the regulator is enabled.”h]”hŒ6This will return > zero when the regulator is enabled.”…”�”}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khjhh²hubhû)�”}”(hŒnint regulator_bulk_enable(int num_consumers, struct regulator_bulk_data *consumers);”h]”hŒnint regulator_bulk_enable(int num_consumers, struct regulator_bulk_data *consumers);”…”�”}”hj sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´K@hjhh²hubhÌ)�”}”(hŒDA consumer can disable its supply when no longer needed by calling::”h]”hŒCA consumer can disable its supply when no longer needed by calling:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KDhjhh²hubhû)�”}”(hŒ!int regulator_disable(regulator);”h]”hŒ!int regulator_disable(regulator);”…”�”}”hj)sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´KFhjhh²hubhÌ)�”}”(hŒOr a number of them ::”h]”hŒOr a number of them”…”�”}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KHhjhh²hubhû)�”}”(hŒpint regulator_bulk_disable(int num_consumers, struct regulator_bulk_data *consumers);”h]”hŒpint regulator_bulk_disable(int num_consumers, struct regulator_bulk_data *consumers);”…”�”}”hjEsbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´KJhjhh²hubj–)�”}”(hhh]”j›)�”}”(hŒ™NOTE: This may not disable the supply if it's shared with other consumers. The regulator will only be disabled when the enabled reference count is zero. ”h]”(j¡)�”}”(hŒNOTE:”h]”hŒNOTE:”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÊh´KOhjVubj±)�”}”(hhh]”hÌ)�”}”(hŒ’This may not disable the supply if it's shared with other consumers. The regulator will only be disabled when the enabled reference count is zero.”h]”hŒ”This may not disable the supply if it’s shared with other consumers. The regulator will only be disabled when the enabled reference count is zero.”…”�”}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KNhjhubah}”(h]”h ]”h"]”h$]”h&]”uh1j°hjVubeh}”(h]”h ]”h"]”h$]”h&]”uh1jšh³hÊh´KOhjSubah}”(h]”h ]”h"]”h$]”h&]”uh1j•hjhh²hh³hÊh´NubhÌ)�”}”(hŒMFinally, a regulator can be forcefully disabled in the case of an emergency::”h]”hŒLFinally, a regulator can be forcefully disabled in the case of an emergency:”…”�”}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KQhjhh²hubhû)�”}”(hŒ'int regulator_force_disable(regulator);”h]”hŒ'int regulator_force_disable(regulator);”…”�”}”hj™sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´KShjhh²hubhÌ)�”}”(hŒ;This operation is also supported for multiple regulators ::”h]”hŒ8This operation is also supported for multiple regulators”…”�”}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KUhjhh²hubhû)�”}”(hŒ|int regulator_bulk_force_disable(int num_consumers, struct regulator_bulk_data *consumers);”h]”hŒ|int regulator_bulk_force_disable(int num_consumers, struct regulator_bulk_data *consumers);”…”�”}”hjµsbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´KWhjhh²hubj–)�”}”(hhh]”j›)�”}”(hŒmNOTE: this will immediately and forcefully shutdown the regulator output. All consumers will be powered off. ”h]”(j¡)�”}”(hŒNOTE:”h]”hŒNOTE:”…”�”}”(hjÊh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÊh´K\hjÆubj±)�”}”(hhh]”hÌ)�”}”(hŒfthis will immediately and forcefully shutdown the regulator output. All consumers will be powered off.”h]”hŒfthis will immediately and forcefully shutdown the regulator output. All consumers will be powered off.”…”�”}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K[hjØubah}”(h]”h ]”h"]”h$]”h&]”uh1j°hjÆubeh}”(h]”h ]”h"]”h$]”h&]”uh1jšh³hÊh´K\hjÃubah}”(h]”h ]”h"]”h$]”h&]”uh1j•hjhh²hh³hÊh´Nubeh}”(h]”Œ6regulator-output-enable-disable-static-dynamic-drivers”ah ]”h"]”Œ?2. regulator output enable & disable (static & dynamic drivers)”ah$]”h&]”uh1hµhh·h²hh³hÊh´K,ubh¶)�”}”(hhh]”(h»)�”}”(hŒ73. Regulator Voltage Control & Status (dynamic drivers)”h]”hŒ73. Regulator Voltage Control & Status (dynamic drivers)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´K_ubhÌ)�”}”(hŒúSome consumer drivers need to be able to dynamically change their supply voltage to match system operating points. e.g. CPUfreq drivers can scale voltage along with frequency to save power, SD drivers may need to select the correct card voltage, etc.”h]”hŒúSome consumer drivers need to be able to dynamically change their supply voltage to match system operating points. e.g. CPUfreq drivers can scale voltage along with frequency to save power, SD drivers may need to select the correct card voltage, etc.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kahjh²hubhÌ)�”}”(hŒ7Consumers can control their supply voltage by calling::”h]”hŒ6Consumers can control their supply voltage by calling:”…”�”}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kfhjh²hubhû)�”}”(hŒ5int regulator_set_voltage(regulator, min_uV, max_uV);”h]”hŒ5int regulator_set_voltage(regulator, min_uV, max_uV);”…”�”}”hj0sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´Khhjh²hubhÌ)�”}”(hŒVWhere min_uV and max_uV are the minimum and maximum acceptable voltages in microvolts.”h]”hŒVWhere min_uV and max_uV are the minimum and maximum acceptable voltages in microvolts.”…”�”}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kjhjh²hubhÌ)�”}”(hŒñNOTE: this can be called when the regulator is enabled or disabled. If called when enabled, then the voltage changes instantly, otherwise the voltage configuration changes and the voltage is physically set when the regulator is next enabled.”h]”hŒñNOTE: this can be called when the regulator is enabled or disabled. If called when enabled, then the voltage changes instantly, otherwise the voltage configuration changes and the voltage is physically set when the regulator is next enabled.”…”�”}”(hjLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kmhjh²hubhÌ)�”}”(hŒBThe regulators configured voltage output can be found by calling::”h]”hŒAThe regulators configured voltage output can be found by calling:”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Krhjh²hubhû)�”}”(hŒ%int regulator_get_voltage(regulator);”h]”hŒ%int regulator_get_voltage(regulator);”…”�”}”hjhsbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´Kthjh²hubj–)�”}”(hhh]”j›)�”}”(hXNOTE: get_voltage() will return the configured output voltage whether the regulator is enabled or disabled and should NOT be used to determine regulator output state. However this can be used in conjunction with is_enabled() to determine the regulator physical output voltage. ”h]”(j¡)�”}”(hŒNOTE:”h]”hŒNOTE:”…”�”}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÊh´K{hjyubj±)�”}”(hhh]”hÌ)�”}”(hXget_voltage() will return the configured output voltage whether the regulator is enabled or disabled and should NOT be used to determine regulator output state. However this can be used in conjunction with is_enabled() to determine the regulator physical output voltage.”h]”hXget_voltage() will return the configured output voltage whether the regulator is enabled or disabled and should NOT be used to determine regulator output state. However this can be used in conjunction with is_enabled() to determine the regulator physical output voltage.”…”�”}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kwhj‹ubah}”(h]”h ]”h"]”h$]”h&]”uh1j°hjyubeh}”(h]”h ]”h"]”h$]”h&]”uh1jšh³hÊh´K{hjvubah}”(h]”h ]”h"]”h$]”h&]”uh1j•hjh²hh³hÊh´Nubeh}”(h]”Œ0regulator-voltage-control-status-dynamic-drivers”ah ]”h"]”Œ73. regulator voltage control & status (dynamic drivers)”ah$]”h&]”uh1hµhh·h²hh³hÊh´K_ubh¶)�”}”(hhh]”(h»)�”}”(hŒ=4. Regulator Current Limit Control & Status (dynamic drivers)”h]”hŒ=4. Regulator Current Limit Control & Status (dynamic drivers)”…”�”}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj¶h²hh³hÊh´K~ubhÌ)�”}”(hXSome consumer drivers need to be able to dynamically change their supply current limit to match system operating points. e.g. LCD backlight driver can change the current limit to vary the backlight brightness, USB drivers may want to set the limit to 500mA when supplying power.”h]”hXSome consumer drivers need to be able to dynamically change their supply current limit to match system operating points. e.g. LCD backlight driver can change the current limit to vary the backlight brightness, USB drivers may want to set the limit to 500mA when supplying power.”…”�”}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K€hj¶h²hubhÌ)�”}”(hŒ=Consumers can control their supply current limit by calling::”h]”hŒ5. Regulator Operating Mode Control & Status (dynamic drivers)”h]”hŒ>5. Regulator Operating Mode Control & Status (dynamic drivers)”…”�”}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj“h²hh³hÊh´K�ubhÌ)�”}”(hŒçSome consumers can further save system power by changing the operating mode of their supply regulator to be more efficient when the consumers operating state changes. e.g. consumer driver is idle and subsequently draws less current”h]”hŒçSome consumers can further save system power by changing the operating mode of their supply regulator to be more efficient when the consumers operating state changes. e.g. consumer driver is idle and subsequently draws less current”…”�”}”(hj¤h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KŸhj“h²hubhÌ)�”}”(hŒ?Regulator operating mode can be changed indirectly or directly.”h]”hŒ?Regulator operating mode can be changed indirectly or directly.”…”�”}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K£hj“h²hubh¶)�”}”(hhh]”(h»)�”}”(hŒ Indirect operating mode control.”h]”hŒ Indirect operating mode control.”…”�”}”(hjÃh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÀh²hh³hÊh´K¦ubhÌ)�”}”(hŒ[Consumer drivers can request a change in their supply regulator operating mode by calling::”h]”hŒZConsumer drivers can request a change in their supply regulator operating mode by calling:”…”�”}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K§hjÀh²hubhû)�”}”(hŒAint regulator_set_load(struct regulator *regulator, int load_uA);”h]”hŒAint regulator_set_load(struct regulator *regulator, int load_uA);”…”�”}”hjßsbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´KªhjÀh²hubhÌ)�”}”(hŒÅThis will cause the core to recalculate the total load on the regulator (based on all its consumers) and change operating mode (if necessary and permitted) to best match the current operating load.”h]”hŒÅThis will cause the core to recalculate the total load on the regulator (based on all its consumers) and change operating mode (if necessary and permitted) to best match the current operating load.”…”�”}”(hjíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¬hjÀh²hubhÌ)�”}”(hŒŸThe load_uA value can be determined from the consumer's datasheet. e.g. most datasheets have tables showing the maximum current consumed in certain situations.”h]”hŒ¡The load_uA value can be determined from the consumer’s datasheet. e.g. most datasheets have tables showing the maximum current consumed in certain situations.”…”�”}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K°hjÀh²hubhÌ)�”}”(hŒžMost consumers will use indirect operating mode control since they have no knowledge of the regulator or whether the regulator is shared with other consumers.”h]”hŒžMost consumers will use indirect operating mode control since they have no knowledge of the regulator or whether the regulator is shared with other consumers.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K´hjÀh²hubeh}”(h]”Œindirect-operating-mode-control”ah ]”h"]”Œ indirect operating mode control.”ah$]”h&]”uh1hµhj“h²hh³hÊh´K¦ubh¶)�”}”(hhh]”(h»)�”}”(hŒDirect operating mode control.”h]”hŒDirect operating mode control.”…”�”}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´K¹ubhÌ)�”}”(hŒžBespoke or tightly coupled drivers may want to directly control regulator operating mode depending on their operating point. This can be achieved by calling::”h]”hŒ�Bespoke or tightly coupled drivers may want to directly control regulator operating mode depending on their operating point. This can be achieved by calling:”…”�”}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K»hjh²hubhû)�”}”(hŒ…int regulator_set_mode(struct regulator *regulator, unsigned int mode); unsigned int regulator_get_mode(struct regulator *regulator);”h]”hŒ…int regulator_set_mode(struct regulator *regulator, unsigned int mode); unsigned int regulator_get_mode(struct regulator *regulator);”…”�”}”hj>sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´K¿hjh²hubhÌ)�”}”(hŒ‚Direct mode will only be used by consumers that *know* about the regulator and are not sharing the regulator with other consumers.”h]”(hŒ0Direct mode will only be used by consumers that ”…”�”}”(hjLh²hh³Nh´NubhŒemphasis”“”)�”}”(hŒ*know*”h]”hŒknow”…”�”}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jThjLubhŒL about the regulator and are not sharing the regulator with other consumers.”…”�”}”(hjLh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÂhjh²hubeh}”(h]”Œdirect-operating-mode-control”ah ]”h"]”Œdirect operating mode control.”ah$]”h&]”uh1hµhj“h²hh³hÊh´K¹ubeh}”(h]”Œ7regulator-operating-mode-control-status-dynamic-drivers”ah ]”h"]”Œ>5. regulator operating mode control & status (dynamic drivers)”ah$]”h&]”uh1hµhh·h²hh³hÊh´K�ubh¶)�”}”(hhh]”(h»)�”}”(hŒ6. Regulator Events”h]”hŒ6. Regulator Events”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj~h²hh³hÊh´KÇubhÌ)�”}”(hŒ‡Regulators can notify consumers of external events. Events could be received by consumers under regulator stress or failure conditions.”h]”hŒ‡Regulators can notify consumers of external events. Events could be received by consumers under regulator stress or failure conditions.”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÉhj~h²hubhÌ)�”}”(hŒ@Consumers can register interest in regulator events by calling::”h]”hŒ?Consumers can register interest in regulator events by calling:”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÌhj~h²hubhû)�”}”(hŒxint regulator_register_notifier(struct regulator *regulator, struct notifier_block *nb);”h]”hŒxint regulator_register_notifier(struct regulator *regulator, struct notifier_block *nb);”…”�”}”hj«sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´KÎhj~h²hubhÌ)�”}”(hŒ.Consumers can unregister interest by calling::”h]”hŒ-Consumers can unregister interest by calling:”…”�”}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÑhj~h²hubhû)�”}”(hŒ|int regulator_unregister_notifier(struct regulator *regulator, struct notifier_block *nb);”h]”hŒ|int regulator_unregister_notifier(struct regulator *regulator, struct notifier_block *nb);”…”�”}”hjÇsbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´KÓhj~h²hubhÌ)�”}”(hŒYRegulators use the kernel notifier framework to send event to their interested consumers.”h]”hŒYRegulators use the kernel notifier framework to send event to their interested consumers.”…”�”}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÖhj~h²hubeh}”(h]”Œregulator-events”ah ]”h"]”Œ6. regulator events”ah$]”h&]”uh1hµhh·h²hh³hÊh´KÇubh¶)�”}”(hhh]”(h»)�”}”(hŒ#7. Regulator Direct Register Access”h]”hŒ#7. Regulator Direct Register Access”…”�”}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjëh²hh³hÊh´KÚubhÌ)�”}”(hŒÆSome kinds of power management hardware or firmware are designed such that they need to do low-level hardware access to regulators, with no involvement from the kernel. Examples of such devices are:”h]”hŒÆSome kinds of power management hardware or firmware are designed such that they need to do low-level hardware access to regulators, with no involvement from the kernel. Examples of such devices are:”…”�”}”(hjüh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÜhjëh²hubhŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒ�clocksource with a voltage-controlled oscillator and control logic to change the supply voltage over I2C to achieve a desired output clock rate”h]”hÌ)�”}”(hŒ�clocksource with a voltage-controlled oscillator and control logic to change the supply voltage over I2C to achieve a desired output clock rate”h]”hŒ�clocksource with a voltage-controlled oscillator and control logic to change the supply voltage over I2C to achieve a desired output clock rate”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kàhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj h²hh³hÊh´Nubj)�”}”(hŒ…thermal management firmware that can issue an arbitrary I2C transaction to perform system poweroff during overtemperature conditions ”h]”hÌ)�”}”(hŒ„thermal management firmware that can issue an arbitrary I2C transaction to perform system poweroff during overtemperature conditions”h]”hŒ„thermal management firmware that can issue an arbitrary I2C transaction to perform system poweroff during overtemperature conditions”…”�”}”(hj-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kâhj)ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj h²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1j h³hÊh´Kàhjëh²hubhÌ)�”}”(hŒõTo set up such a device/firmware, various parameters like I2C address of the regulator, addresses of various regulator registers etc. need to be configured to it. The regulator framework provides the following helpers for querying these details.”h]”hŒõTo set up such a device/firmware, various parameters like I2C address of the regulator, addresses of various regulator registers etc. need to be configured to it. The regulator framework provides the following helpers for querying these details.”…”�”}”(hjIh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kåhjëh²hubhÌ)�”}”(hŒ“Bus-specific details, like I2C addresses or transfer rates are handled by the regmap framework. To get the regulator's regmap (if supported), use::”h]”hŒ”Bus-specific details, like I2C addresses or transfer rates are handled by the regmap framework. To get the regulator’s regmap (if supported), use:”…”�”}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kêhjëh²hubhû)�”}”(hŒAstruct regmap *regulator_get_regmap(struct regulator *regulator);”h]”hŒAstruct regmap *regulator_get_regmap(struct regulator *regulator);”…”�”}”hjesbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´Kíhjëh²hubhÌ)�”}”(hŒgTo obtain the hardware register offset and bitmask for the regulator's voltage selector register, use::”h]”hŒhTo obtain the hardware register offset and bitmask for the regulator’s voltage selector register, use:”…”�”}”(hjsh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kïhjëh²hubhû)�”}”(hŒÁint regulator_get_hardware_vsel_register(struct regulator *regulator, unsigned *vsel_reg, unsigned *vsel_mask);”h]”hŒÁint regulator_get_hardware_vsel_register(struct regulator *regulator, unsigned *vsel_reg, unsigned *vsel_mask);”…”�”}”hj�sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´Kòhjëh²hubhÌ)�”}”(hŒÄTo convert a regulator framework voltage selector code (used by regulator_list_voltage) to a hardware-specific voltage selector that can be directly written to the voltage selector register, use::”h]”hŒÃTo convert a regulator framework voltage selector code (used by regulator_list_voltage) to a hardware-specific voltage selector that can be directly written to the voltage selector register, use:”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Köhjëh²hubhû)�”}”(hŒrint regulator_list_hardware_vsel(struct regulator *regulator, unsigned selector);”h]”hŒrint regulator_list_hardware_vsel(struct regulator *regulator, unsigned selector);”…”�”}”hj�sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´Kúhjëh²hubhÌ)�”}”(hŒÀTo access the hardware for enabling/disabling the regulator, consumers must use regulator_get_exclusive(), as it can't work if there's more than one consumer. To enable/disable regulator use::”h]”hŒÃTo access the hardware for enabling/disabling the regulator, consumers must use regulator_get_exclusive(), as it can’t work if there’s more than one consumer. To enable/disable regulator use:”…”�”}”(hj«h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kýhjëh²hubhû)�”}”(hŒHint regulator_hardware_enable(struct regulator *regulator, bool enable);”h]”hŒHint regulator_hardware_enable(struct regulator *regulator, bool enable);”…”�”}”hj¹sbah}”(h]”h ]”h"]”h$]”h&]”j j uh1húh³hÊh´Mhjëh²hubeh}”(h]”Œ regulator-direct-register-access”ah ]”h"]”Œ#7. regulator direct register access”ah$]”h&]”uh1hµhh·h²hh³hÊh´KÚubeh}”(h]”Œ#regulator-consumer-driver-interface”ah ]”h"]”Œ#regulator consumer driver interface”ah$]”h&]”uh1hµhhh²hh³hÊh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”júŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jÔjÑjejbjjýj³j°j�j�j{jxjjjsjpjèjåjÌjÉuŒ nametypes”}”(jÔ‰je‰j‰j³‰j�‰j{‰j‰js‰jè‰j̉uh}”(jÑh·jbhÛjýjhj°jj�j¶jxj“jjÀjpjjåj~jÉjëuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.