diff mbox

[U-Boot,v3,2/6] power: regulator: Add ctrl_reg and volt_reg fields for pmic

Message ID 1474265858-25753-3-git-send-email-j-keerthy@ti.com
State Accepted
Commit 34514b8b9ce287e2b8e90c77974889d8c53656fe
Delegated to: Przemyslaw Marczak
Headers show

Commit Message

Keerthy Sept. 19, 2016, 6:17 a.m. UTC
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>
---
 include/power/regulator.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Tom Rini Sept. 20, 2016, 2:06 a.m. UTC | #1
On Mon, Sep 19, 2016 at 11:47:34AM +0530, Keerthy wrote:

> 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>
Simon Glass Sept. 23, 2016, 4:15 a.m. UTC | #2
On 19 September 2016 at 00:17, Keerthy <j-keerthy@ti.com> wrote:
> 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>
> ---
>  include/power/regulator.h | 4 ++++
>  1 file changed, 4 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
Keerthy Sept. 25, 2016, 12:06 p.m. UTC | #3
On Friday 23 September 2016 09:45 AM, Simon Glass wrote:
> On 19 September 2016 at 00:17, Keerthy <j-keerthy@ti.com> wrote:
>> 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>
>> ---
>>  include/power/regulator.h | 4 ++++
>>  1 file changed, 4 insertions(+)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Thanks i will repost a v4 with comments on the other patch fixed.

>
diff mbox

Patch

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@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 */