Commit 34514b8b9ce287e2b8e90c77974889d8c53656fe

Authored by Keerthy
Committed by Simon Glass
1 parent 477dfe2ffc

power: regulator: Add ctrl_reg and volt_reg fields for pmic

The ctrl reg contains bit fields to enable and disable regulators,
and volt_reg has the bit fields to configure the voltage values.
The registers are frequently accessed hence make them part
of dm_regulator_uclass_platdata structure.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff

include/power/regulator.h
... ... @@ -153,6 +153,8 @@
153 153 * TODO(sjg@chromium.org): Consider putting the above two into @flags
154 154 * @flags: - flags value (see REGULATOR_FLAG_...)
155 155 * @name** - fdt regulator name - should be taken from the device tree
  156 + * ctrl_reg: - Control register offset used to enable/disable regulator
  157 + * volt_reg: - register offset for writing voltage vsel values
156 158 *
157 159 * Note:
158 160 * * - set automatically on device probe by the uclass's '.pre_probe' method.
... ... @@ -172,6 +174,8 @@
172 174 bool boot_on;
173 175 const char *name;
174 176 int flags;
  177 + u8 ctrl_reg;
  178 + u8 volt_reg;
175 179 };
176 180  
177 181 /* Regulator device operations */