From patchwork Wed Apr 22 15:35:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter 'p2' De Schrijver X-Patchwork-Id: 19392 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3MFa0gg023076 for ; Wed, 22 Apr 2009 15:36:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751498AbZDVPf6 (ORCPT ); Wed, 22 Apr 2009 11:35:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752647AbZDVPf6 (ORCPT ); Wed, 22 Apr 2009 11:35:58 -0400 Received: from smtp.nokia.com ([192.100.105.134]:59911 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751498AbZDVPf5 (ORCPT ); Wed, 22 Apr 2009 11:35:57 -0400 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx09.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n3MFZGCJ026416 for ; Wed, 22 Apr 2009 10:35:56 -0500 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 22 Apr 2009 18:35:32 +0300 Received: from mgw-int01.ntc.nokia.com ([172.21.143.96]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Wed, 22 Apr 2009 18:35:31 +0300 Received: from localhost.localdomain (esdhcp04238.research.nokia.com [172.21.42.38]) by mgw-int01.ntc.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id n3MFZTn2032262; Wed, 22 Apr 2009 18:35:30 +0300 From: "Peter 'p2' De Schrijver" To: linux-omap@vger.kernel.org Cc: "Peter 'p2' De Schrijver" Subject: [PATCH 1/1] Activate VDD1, VDD2 and VPLL1 at startup Date: Wed, 22 Apr 2009 18:35:29 +0300 Message-Id: <1240414529-16258-1-git-send-email-peter.de-schrijver@nokia.com> X-Mailer: git-send-email 1.5.6.3 X-OriginalArrivalTime: 22 Apr 2009 15:35:31.0304 (UTC) FILETIME=[F85EC680:01C9C35F] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org This patch activates VDD1, VDD2 and VPLL1 when booting. This is necessary because these resources are in warm reset state after a reboot. This means their voltage levels cannot be modified so DVFS and smartreflex don't work. Signed-off-by: Peter 'p2' De Schrijver --- drivers/regulator/twl4030-regulator.c | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/drivers/regulator/twl4030-regulator.c b/drivers/regulator/twl4030-regulator.c index 80a4e10..ab2a726 100644 --- a/drivers/regulator/twl4030-regulator.c +++ b/drivers/regulator/twl4030-regulator.c @@ -506,6 +506,22 @@ static int twl4030reg_probe(struct platform_device *pdev) } platform_set_drvdata(pdev, rdev); + /* VDD1, VDD2 and VPLL1 are left in warm reset state after a reboot. + * We need to put them back to active state for DVFS and smartreflex. + */ + + if (twl4030_send_pb_msg(MSG_SINGULAR(DEV_GRP_P1, RES_VDD1, + RES_STATE_ACTIVE)) < 0) + pr_err("Unable to activate VDD1\n"); + + if (twl4030_send_pb_msg(MSG_SINGULAR(DEV_GRP_P1, RES_VDD2, + RES_STATE_ACTIVE)) < 0) + pr_err("Unable to activate VDD2\n"); + + if (twl4030_send_pb_msg(MSG_SINGULAR(DEV_GRP_P1, RES_VPLL1, + RES_STATE_ACTIVE)) < 0) + pr_err("Unable to activate VPLL1\n"); + /* NOTE: many regulators support short-circuit IRQs (presentable * as REGULATOR_OVER_CURRENT notifications?) configured via: * - SC_CONFIG