From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keerthy Date: Wed, 28 Sep 2016 09:57:26 +0530 Subject: [U-Boot] [PATCH v5 1/6] power: regulator: Add ctrl_reg and volt_reg fields for pmic In-Reply-To: <1475036851-12048-1-git-send-email-j-keerthy@ti.com> References: <1475036851-12048-1-git-send-email-j-keerthy@ti.com> Message-ID: <1475036851-12048-2-git-send-email-j-keerthy@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Reviewed-by: Tom Rini Reviewed-by: Simon Glass --- include/power/regulator.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/power/regulator.h b/include/power/regulator.h index 9bcd728..2117f55 100644 --- a/include/power/regulator.h +++ b/include/power/regulator.h @@ -152,6 +152,8 @@ enum regulator_flag { * TODO(sjg at 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. @@ -171,6 +173,8 @@ struct dm_regulator_uclass_platdata { bool boot_on; const char *name; int flags; + u8 ctrl_reg; + u8 volt_reg; }; /* Regulator device operations */ -- 1.9.1