diff mbox

[v2,5/5] regulator: tps65218: do not disable DCDC3 during poweroff on broken PMICs

Message ID 1466756892-17015-5-git-send-email-j-keerthy@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

J, KEERTHY June 24, 2016, 8:28 a.m. UTC
From: Tero Kristo <t-kristo@ti.com>

Some versions of tps65218 do not seem to support poweroff modes properly
if DCDC3 regulator is shut-down. Thus, keep it enabled even during
poweroff if the version info matches the broken silicon revision.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
---
 drivers/regulator/tps65218-regulator.c | 8 ++++++++
 include/linux/mfd/tps65218.h           | 5 +++++
 2 files changed, 13 insertions(+)

Comments

Mark Brown June 27, 2016, 4:59 p.m. UTC | #1
On Fri, Jun 24, 2016 at 01:58:11PM +0530, Keerthy wrote:
> From: Tero Kristo <t-kristo@ti.com>
> 
> Some versions of tps65218 do not seem to support poweroff modes properly
> if DCDC3 regulator is shut-down. Thus, keep it enabled even during
> poweroff if the version info matches the broken silicon revision.

This is fine but depends on the MFD bit so needs to wait for that to be
reviewed.
Keerthy June 28, 2016, 9:28 a.m. UTC | #2
On Monday 27 June 2016 10:29 PM, Mark Brown wrote:
> On Fri, Jun 24, 2016 at 01:58:11PM +0530, Keerthy wrote:
>> From: Tero Kristo <t-kristo@ti.com>
>>
>> Some versions of tps65218 do not seem to support poweroff modes properly
>> if DCDC3 regulator is shut-down. Thus, keep it enabled even during
>> poweroff if the version info matches the broken silicon revision.
>
> This is fine but depends on the MFD bit so needs to wait for that to be
> reviewed.

Yes. I will wait for Lee Jones to review Patch 4/5 of this series.

Thanks,
Keerthy

>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lee Jones June 28, 2016, 11:12 a.m. UTC | #3
On Mon, 27 Jun 2016, Mark Brown wrote:

> On Fri, Jun 24, 2016 at 01:58:11PM +0530, Keerthy wrote:
> > From: Tero Kristo <t-kristo@ti.com>
> > 
> > Some versions of tps65218 do not seem to support poweroff modes properly
> > if DCDC3 regulator is shut-down. Thus, keep it enabled even during
> > poweroff if the version info matches the broken silicon revision.
> 
> This is fine but depends on the MFD bit so needs to wait for that to be
> reviewed.

I think it's fine for you to take this.
Lee Jones June 28, 2016, 11:13 a.m. UTC | #4
On Tue, 28 Jun 2016, Lee Jones wrote:

> On Mon, 27 Jun 2016, Mark Brown wrote:
> 
> > On Fri, Jun 24, 2016 at 01:58:11PM +0530, Keerthy wrote:
> > > From: Tero Kristo <t-kristo@ti.com>
> > > 
> > > Some versions of tps65218 do not seem to support poweroff modes properly
> > > if DCDC3 regulator is shut-down. Thus, keep it enabled even during
> > > poweroff if the version info matches the broken silicon revision.
> > 
> > This is fine but depends on the MFD bit so needs to wait for that to be
> > reviewed.
> 
> I think it's fine for you to take this.

Tell a lie.  I just saw the struct member added in the other patch.

Do you want to take the set?  If so, I'll just Ack my bit.

For the MFD changes in this patch:
  Acked-by: Lee Jones <lee.jones@linaro.org>
Keerthy June 28, 2016, 11:24 a.m. UTC | #5
On Tuesday 28 June 2016 04:43 PM, Lee Jones wrote:
> On Tue, 28 Jun 2016, Lee Jones wrote:
>
>> On Mon, 27 Jun 2016, Mark Brown wrote:
>>
>>> On Fri, Jun 24, 2016 at 01:58:11PM +0530, Keerthy wrote:
>>>> From: Tero Kristo <t-kristo@ti.com>
>>>>
>>>> Some versions of tps65218 do not seem to support poweroff modes properly
>>>> if DCDC3 regulator is shut-down. Thus, keep it enabled even during
>>>> poweroff if the version info matches the broken silicon revision.
>>>
>>> This is fine but depends on the MFD bit so needs to wait for that to be
>>> reviewed.
>>
>> I think it's fine for you to take this.
>
> Tell a lie.  I just saw the struct member added in the other patch.

Oh yes! I will wait for this series to get in completely. I guess more 
re-basing would be needed on the other patch.

>
> Do you want to take the set?  If so, I'll just Ack my bit.
>
> For the MFD changes in this patch:
>    Acked-by: Lee Jones <lee.jones@linaro.org>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lee Jones June 28, 2016, 11:45 a.m. UTC | #6
On Tue, 28 Jun 2016, Keerthy wrote:

> 
> 
> On Tuesday 28 June 2016 04:43 PM, Lee Jones wrote:
> > On Tue, 28 Jun 2016, Lee Jones wrote:
> > 
> > > On Mon, 27 Jun 2016, Mark Brown wrote:
> > > 
> > > > On Fri, Jun 24, 2016 at 01:58:11PM +0530, Keerthy wrote:
> > > > > From: Tero Kristo <t-kristo@ti.com>
> > > > > 
> > > > > Some versions of tps65218 do not seem to support poweroff modes properly
> > > > > if DCDC3 regulator is shut-down. Thus, keep it enabled even during
> > > > > poweroff if the version info matches the broken silicon revision.
> > > > 
> > > > This is fine but depends on the MFD bit so needs to wait for that to be
> > > > reviewed.
> > > 
> > > I think it's fine for you to take this.
> > 
> > Tell a lie.  I just saw the struct member added in the other patch.
> 
> Oh yes! I will wait for this series to get in completely. I guess more
> re-basing would be needed on the other patch.

Not if they all go in via Mark's tree.

> > Do you want to take the set?  If so, I'll just Ack my bit.
> > 
> > For the MFD changes in this patch:
> >    Acked-by: Lee Jones <lee.jones@linaro.org>
> >
diff mbox

Patch

diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c
index d1e631d..eb0f5b1 100644
--- a/drivers/regulator/tps65218-regulator.c
+++ b/drivers/regulator/tps65218-regulator.c
@@ -180,6 +180,14 @@  static int tps65218_pmic_set_suspend_disable(struct regulator_dev *dev)
 	if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1)
 		return -EINVAL;
 
+	/*
+	 * Certain revisions of TPS65218 will need to have DCDC3 regulator
+	 * enabled always, otherwise an immediate system reboot will occur
+	 * during poweroff.
+	 */
+	if (rid == TPS65218_DCDC_3 && tps->rev == TPS65218_REV_2_1)
+		return 0;
+
 	if (!tps->info[rid]->strobe) {
 		if (rid == TPS65218_DCDC_3)
 			tps->info[rid]->strobe = 3;
diff --git a/include/linux/mfd/tps65218.h b/include/linux/mfd/tps65218.h
index 85e464e..d1db952 100644
--- a/include/linux/mfd/tps65218.h
+++ b/include/linux/mfd/tps65218.h
@@ -63,6 +63,11 @@ 
 #define TPS65218_CHIPID_CHIP_MASK	0xF8
 #define TPS65218_CHIPID_REV_MASK	0x07
 
+#define TPS65218_REV_1_0		0x0
+#define TPS65218_REV_1_1		0x1
+#define TPS65218_REV_2_0		0x2
+#define TPS65218_REV_2_1		0x3
+
 #define TPS65218_INT1_VPRG		BIT(5)
 #define TPS65218_INT1_AC		BIT(4)
 #define TPS65218_INT1_PB		BIT(3)