]> git.sur5r.net Git - u-boot/commitdiff
power: regulator: Add ctrl_reg and volt_reg fields for pmic
authorKeerthy <j-keerthy@ti.com>
Fri, 30 Sep 2016 03:50:42 +0000 (09:20 +0530)
committerSimon Glass <sjg@chromium.org>
Tue, 11 Oct 2016 16:17:04 +0000 (10:17 -0600)
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>
include/power/regulator.h

index 911956c0b958211cd62b2c3f3d3385bb2f435503..f47ab6740bdd6951056184b755831efe956d6ea6 100644 (file)
@@ -153,6 +153,8 @@ enum regulator_flag {
  * TODO(sjg@chromium.org): Consider putting the above two into @flags
  * @flags:     - flags value (see REGULATOR_FLAG_...)
  * @name**     - fdt regulator name - should be taken from the device tree
+ * ctrl_reg:   - Control register offset used to enable/disable regulator
+ * volt_reg:   - register offset for writing voltage vsel values
  *
  * Note:
  * *  - set automatically on device probe by the uclass's '.pre_probe' method.
@@ -172,6 +174,8 @@ struct dm_regulator_uclass_platdata {
        bool boot_on;
        const char *name;
        int flags;
+       u8 ctrl_reg;
+       u8 volt_reg;
 };
 
 /* Regulator device operations */