Regulator binding
This section only deals with consumer interface binding. Because PMIC binding consists of providing init data
for regulators that this PMIC provides, you should refer to the Feeding init data into the DTsection to understand producer binding.
A consumer node can reference one or more of its supplies/regulators using the following bindings:
<name>-supply: phandle to the regulator node
It is the same principle as PWM consumer binding. Now, <name>
should be meaningful enough, so that the driver can easily refer to it when requesting the regulator. That said, <name>
must match the *id
parameter of the regulator_get()
function:
twl_reg1: regulator@0 { [...] }; twl_reg2: regulator@1 { [...] }; mmc: mmc@0x0 { [...] vmmc-supply = <&twl_reg1>; vmmcaux-supply = <&twl_reg2>; };
The consumer code (which is the MMC driver) that actually requests its supplies could look like this:
struct regulator *main_regulator; struct...