* [U-Boot] [PATCH] power: pmic: tps65218: Fix tps65218_voltage_update function
@ 2017-05-24 4:49 ` Keerthy
2017-05-25 13:48 ` Jaehoon Chung
0 siblings, 1 reply; 8+ messages in thread
From: Keerthy @ 2017-05-24 4:49 UTC (permalink / raw)
To: u-boot
Currently while setting the vsel value for dcdc1 and dcdc2
the driver is wrongly masking the entire 8 bits in the process
clearing PFM (bit7) field as well. Hence describe an appropriate
mask for vsel field and modify only those bits in the vsel
mask.
Source: http://www.ti.com/lit/ds/symlink/tps65218.pdf
Signed-off-by: Keerthy <j-keerthy@ti.com>
Fixes: 86db550b38 ("power: Add support for the TPS65218 PMIC")
---
drivers/power/pmic/pmic_tps65218.c | 2 +-
include/power/tps65218.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/power/pmic/pmic_tps65218.c b/drivers/power/pmic/pmic_tps65218.c
index f32fa40..c5e768a 100644
--- a/drivers/power/pmic/pmic_tps65218.c
+++ b/drivers/power/pmic/pmic_tps65218.c
@@ -101,7 +101,7 @@ int tps65218_voltage_update(uchar dc_cntrl_reg, uchar volt_sel)
/* set voltage level */
if (tps65218_reg_write(TPS65218_PROT_LEVEL_2, dc_cntrl_reg, volt_sel,
- TPS65218_MASK_ALL_BITS))
+ TPS65218_DCDC_VSEL_MASK))
return 1;
/* set GO bit to initiate voltage transition */
diff --git a/include/power/tps65218.h b/include/power/tps65218.h
index 4d68faa..e3538e2 100644
--- a/include/power/tps65218.h
+++ b/include/power/tps65218.h
@@ -56,6 +56,8 @@ enum {
#define TPS65218_MASK_ALL_BITS 0xFF
+#define TPS65218_DCDC_VSEL_MASK 0x3F
+
#define TPS65218_DCDC_VOLT_SEL_0950MV 0x0a
#define TPS65218_DCDC_VOLT_SEL_1100MV 0x19
#define TPS65218_DCDC_VOLT_SEL_1200MV 0x23
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] power: pmic: tps65218: Fix tps65218_voltage_update function
2017-05-24 4:49 ` [U-Boot] [PATCH] power: pmic: tps65218: Fix tps65218_voltage_update function Keerthy
@ 2017-05-25 13:48 ` Jaehoon Chung
2017-05-25 13:52 ` Keerthy
2017-05-25 14:34 ` Tom Rini
0 siblings, 2 replies; 8+ messages in thread
From: Jaehoon Chung @ 2017-05-25 13:48 UTC (permalink / raw)
To: u-boot
On 05/24/2017 01:49 PM, Keerthy wrote:
> Currently while setting the vsel value for dcdc1 and dcdc2
> the driver is wrongly masking the entire 8 bits in the process
> clearing PFM (bit7) field as well. Hence describe an appropriate
> mask for vsel field and modify only those bits in the vsel
> mask.
>
> Source: http://www.ti.com/lit/ds/symlink/tps65218.pdf
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> Fixes: 86db550b38 ("power: Add support for the TPS65218 PMIC")
If delegate to me..i will pick this.
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
> drivers/power/pmic/pmic_tps65218.c | 2 +-
> include/power/tps65218.h | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/power/pmic/pmic_tps65218.c b/drivers/power/pmic/pmic_tps65218.c
> index f32fa40..c5e768a 100644
> --- a/drivers/power/pmic/pmic_tps65218.c
> +++ b/drivers/power/pmic/pmic_tps65218.c
> @@ -101,7 +101,7 @@ int tps65218_voltage_update(uchar dc_cntrl_reg, uchar volt_sel)
>
> /* set voltage level */
> if (tps65218_reg_write(TPS65218_PROT_LEVEL_2, dc_cntrl_reg, volt_sel,
> - TPS65218_MASK_ALL_BITS))
> + TPS65218_DCDC_VSEL_MASK))
> return 1;
>
> /* set GO bit to initiate voltage transition */
> diff --git a/include/power/tps65218.h b/include/power/tps65218.h
> index 4d68faa..e3538e2 100644
> --- a/include/power/tps65218.h
> +++ b/include/power/tps65218.h
> @@ -56,6 +56,8 @@ enum {
>
> #define TPS65218_MASK_ALL_BITS 0xFF
>
> +#define TPS65218_DCDC_VSEL_MASK 0x3F
> +
> #define TPS65218_DCDC_VOLT_SEL_0950MV 0x0a
> #define TPS65218_DCDC_VOLT_SEL_1100MV 0x19
> #define TPS65218_DCDC_VOLT_SEL_1200MV 0x23
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] power: pmic: tps65218: Fix tps65218_voltage_update function
2017-05-25 13:48 ` Jaehoon Chung
@ 2017-05-25 13:52 ` Keerthy
2017-05-26 2:03 ` Jaehoon Chung
2017-05-25 14:34 ` Tom Rini
1 sibling, 1 reply; 8+ messages in thread
From: Keerthy @ 2017-05-25 13:52 UTC (permalink / raw)
To: u-boot
On Thursday 25 May 2017 07:18 PM, Jaehoon Chung wrote:
> On 05/24/2017 01:49 PM, Keerthy wrote:
>> Currently while setting the vsel value for dcdc1 and dcdc2
>> the driver is wrongly masking the entire 8 bits in the process
>> clearing PFM (bit7) field as well. Hence describe an appropriate
>> mask for vsel field and modify only those bits in the vsel
>> mask.
>>
>> Source: http://www.ti.com/lit/ds/symlink/tps65218.pdf
>>
>> Signed-off-by: Keerthy <j-keerthy@ti.com>
>> Fixes: 86db550b38 ("power: Add support for the TPS65218 PMIC")
>
> If delegate to me..i will pick this.
>
> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Thanks Jaehoon Chung.
>
>> ---
>> drivers/power/pmic/pmic_tps65218.c | 2 +-
>> include/power/tps65218.h | 2 ++
>> 2 files changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/power/pmic/pmic_tps65218.c b/drivers/power/pmic/pmic_tps65218.c
>> index f32fa40..c5e768a 100644
>> --- a/drivers/power/pmic/pmic_tps65218.c
>> +++ b/drivers/power/pmic/pmic_tps65218.c
>> @@ -101,7 +101,7 @@ int tps65218_voltage_update(uchar dc_cntrl_reg, uchar volt_sel)
>>
>> /* set voltage level */
>> if (tps65218_reg_write(TPS65218_PROT_LEVEL_2, dc_cntrl_reg, volt_sel,
>> - TPS65218_MASK_ALL_BITS))
>> + TPS65218_DCDC_VSEL_MASK))
>> return 1;
>>
>> /* set GO bit to initiate voltage transition */
>> diff --git a/include/power/tps65218.h b/include/power/tps65218.h
>> index 4d68faa..e3538e2 100644
>> --- a/include/power/tps65218.h
>> +++ b/include/power/tps65218.h
>> @@ -56,6 +56,8 @@ enum {
>>
>> #define TPS65218_MASK_ALL_BITS 0xFF
>>
>> +#define TPS65218_DCDC_VSEL_MASK 0x3F
>> +
>> #define TPS65218_DCDC_VOLT_SEL_0950MV 0x0a
>> #define TPS65218_DCDC_VOLT_SEL_1100MV 0x19
>> #define TPS65218_DCDC_VOLT_SEL_1200MV 0x23
>>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] power: pmic: tps65218: Fix tps65218_voltage_update function
2017-05-25 13:48 ` Jaehoon Chung
2017-05-25 13:52 ` Keerthy
@ 2017-05-25 14:34 ` Tom Rini
2017-05-26 1:59 ` Jaehoon Chung
1 sibling, 1 reply; 8+ messages in thread
From: Tom Rini @ 2017-05-25 14:34 UTC (permalink / raw)
To: u-boot
On Thu, May 25, 2017 at 10:48:55PM +0900, Jaehoon Chung wrote:
> On 05/24/2017 01:49 PM, Keerthy wrote:
> > Currently while setting the vsel value for dcdc1 and dcdc2
> > the driver is wrongly masking the entire 8 bits in the process
> > clearing PFM (bit7) field as well. Hence describe an appropriate
> > mask for vsel field and modify only those bits in the vsel
> > mask.
> >
> > Source: http://www.ti.com/lit/ds/symlink/tps65218.pdf
> >
> > Signed-off-by: Keerthy <j-keerthy@ti.com>
> > Fixes: 86db550b38 ("power: Add support for the TPS65218 PMIC")
>
> If delegate to me..i will pick this.
Feel free (always!) to grab things in patchwork that are in your areas,
thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170525/9414a364/attachment.sig>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] power: pmic: tps65218: Fix tps65218_voltage_update function
2017-05-25 14:34 ` Tom Rini
@ 2017-05-26 1:59 ` Jaehoon Chung
0 siblings, 0 replies; 8+ messages in thread
From: Jaehoon Chung @ 2017-05-26 1:59 UTC (permalink / raw)
To: u-boot
On 05/25/2017 11:34 PM, Tom Rini wrote:
> On Thu, May 25, 2017 at 10:48:55PM +0900, Jaehoon Chung wrote:
>> On 05/24/2017 01:49 PM, Keerthy wrote:
>>> Currently while setting the vsel value for dcdc1 and dcdc2
>>> the driver is wrongly masking the entire 8 bits in the process
>>> clearing PFM (bit7) field as well. Hence describe an appropriate
>>> mask for vsel field and modify only those bits in the vsel
>>> mask.
>>>
>>> Source: http://www.ti.com/lit/ds/symlink/tps65218.pdf
>>>
>>> Signed-off-by: Keerthy <j-keerthy@ti.com>
>>> Fixes: 86db550b38 ("power: Add support for the TPS65218 PMIC")
>>
>> If delegate to me..i will pick this.
>
> Feel free (always!) to grab things in patchwork that are in your areas,
> thanks!
Thanks!
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] power: pmic: tps65218: Fix tps65218_voltage_update function
2017-05-25 13:52 ` Keerthy
@ 2017-05-26 2:03 ` Jaehoon Chung
0 siblings, 0 replies; 8+ messages in thread
From: Jaehoon Chung @ 2017-05-26 2:03 UTC (permalink / raw)
To: u-boot
On 05/25/2017 10:52 PM, Keerthy wrote:
>
>
> On Thursday 25 May 2017 07:18 PM, Jaehoon Chung wrote:
>> On 05/24/2017 01:49 PM, Keerthy wrote:
>>> Currently while setting the vsel value for dcdc1 and dcdc2
>>> the driver is wrongly masking the entire 8 bits in the process
>>> clearing PFM (bit7) field as well. Hence describe an appropriate
>>> mask for vsel field and modify only those bits in the vsel
>>> mask.
>>>
>>> Source: http://www.ti.com/lit/ds/symlink/tps65218.pdf
>>>
>>> Signed-off-by: Keerthy <j-keerthy@ti.com>
>>> Fixes: 86db550b38 ("power: Add support for the TPS65218 PMIC")
>>
>> If delegate to me..i will pick this.
>>
>> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
>
> Thanks Jaehoon Chung.
Applied to u-boot-mmc. Thanks
Jaehoon Chung
>
>>
>>> ---
>>> drivers/power/pmic/pmic_tps65218.c | 2 +-
>>> include/power/tps65218.h | 2 ++
>>> 2 files changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/power/pmic/pmic_tps65218.c b/drivers/power/pmic/pmic_tps65218.c
>>> index f32fa40..c5e768a 100644
>>> --- a/drivers/power/pmic/pmic_tps65218.c
>>> +++ b/drivers/power/pmic/pmic_tps65218.c
>>> @@ -101,7 +101,7 @@ int tps65218_voltage_update(uchar dc_cntrl_reg, uchar volt_sel)
>>>
>>> /* set voltage level */
>>> if (tps65218_reg_write(TPS65218_PROT_LEVEL_2, dc_cntrl_reg, volt_sel,
>>> - TPS65218_MASK_ALL_BITS))
>>> + TPS65218_DCDC_VSEL_MASK))
>>> return 1;
>>>
>>> /* set GO bit to initiate voltage transition */
>>> diff --git a/include/power/tps65218.h b/include/power/tps65218.h
>>> index 4d68faa..e3538e2 100644
>>> --- a/include/power/tps65218.h
>>> +++ b/include/power/tps65218.h
>>> @@ -56,6 +56,8 @@ enum {
>>>
>>> #define TPS65218_MASK_ALL_BITS 0xFF
>>>
>>> +#define TPS65218_DCDC_VSEL_MASK 0x3F
>>> +
>>> #define TPS65218_DCDC_VOLT_SEL_0950MV 0x0a
>>> #define TPS65218_DCDC_VOLT_SEL_1100MV 0x19
>>> #define TPS65218_DCDC_VOLT_SEL_1200MV 0x23
>>>
>>
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] power: pmic: tps65218: Fix tps65218_voltage_update function
2017-05-25 10:05 Keerthy
@ 2017-05-26 18:17 ` Tom Rini
0 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2017-05-26 18:17 UTC (permalink / raw)
To: u-boot
On Thu, May 25, 2017 at 03:35:25PM +0530, Keerthy wrote:
> Currently while setting the vsel value for dcdc1 and dcdc2
> the driver is wrongly masking the entire 8 bits in the process
> clearing PFM (bit7) field as well. Hence describe an appropriate
> mask for vsel field and modify only those bits in the vsel
> mask.
>
> Source: http://www.ti.com/lit/ds/symlink/tps65218.pdf
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> Fixes: 86db550b38 ("power: Add support for the TPS65218 PMIC")
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170526/884177d2/attachment.sig>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] power: pmic: tps65218: Fix tps65218_voltage_update function
@ 2017-05-25 10:05 Keerthy
2017-05-26 18:17 ` Tom Rini
0 siblings, 1 reply; 8+ messages in thread
From: Keerthy @ 2017-05-25 10:05 UTC (permalink / raw)
To: u-boot
Currently while setting the vsel value for dcdc1 and dcdc2
the driver is wrongly masking the entire 8 bits in the process
clearing PFM (bit7) field as well. Hence describe an appropriate
mask for vsel field and modify only those bits in the vsel
mask.
Source: http://www.ti.com/lit/ds/symlink/tps65218.pdf
Signed-off-by: Keerthy <j-keerthy@ti.com>
Fixes: 86db550b38 ("power: Add support for the TPS65218 PMIC")
---
drivers/power/pmic/pmic_tps65218.c | 2 +-
include/power/tps65218.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/power/pmic/pmic_tps65218.c b/drivers/power/pmic/pmic_tps65218.c
index f32fa40..c5e768a 100644
--- a/drivers/power/pmic/pmic_tps65218.c
+++ b/drivers/power/pmic/pmic_tps65218.c
@@ -101,7 +101,7 @@ int tps65218_voltage_update(uchar dc_cntrl_reg, uchar volt_sel)
/* set voltage level */
if (tps65218_reg_write(TPS65218_PROT_LEVEL_2, dc_cntrl_reg, volt_sel,
- TPS65218_MASK_ALL_BITS))
+ TPS65218_DCDC_VSEL_MASK))
return 1;
/* set GO bit to initiate voltage transition */
diff --git a/include/power/tps65218.h b/include/power/tps65218.h
index 4d68faa..e3538e2 100644
--- a/include/power/tps65218.h
+++ b/include/power/tps65218.h
@@ -56,6 +56,8 @@ enum {
#define TPS65218_MASK_ALL_BITS 0xFF
+#define TPS65218_DCDC_VSEL_MASK 0x3F
+
#define TPS65218_DCDC_VOLT_SEL_0950MV 0x0a
#define TPS65218_DCDC_VOLT_SEL_1100MV 0x19
#define TPS65218_DCDC_VOLT_SEL_1200MV 0x23
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-05-26 18:17 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20170524044951epcas1p27153bcdc067aa1cae88b25114ecb909a@epcas1p2.samsung.com>
2017-05-24 4:49 ` [U-Boot] [PATCH] power: pmic: tps65218: Fix tps65218_voltage_update function Keerthy
2017-05-25 13:48 ` Jaehoon Chung
2017-05-25 13:52 ` Keerthy
2017-05-26 2:03 ` Jaehoon Chung
2017-05-25 14:34 ` Tom Rini
2017-05-26 1:59 ` Jaehoon Chung
2017-05-25 10:05 Keerthy
2017-05-26 18:17 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.