From patchwork Thu Mar 28 16:11:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 15723 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id E26EA23E10 for ; Thu, 28 Mar 2013 16:12:00 +0000 (UTC) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by fiordland.canonical.com (Postfix) with ESMTP id B4D40A184BD for ; Thu, 28 Mar 2013 16:12:00 +0000 (UTC) Received: by mail-ve0-f174.google.com with SMTP id jz10so5628316veb.33 for ; Thu, 28 Mar 2013 09:12:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=25F+4umQ7xH01JwnUp8FVSMRyer3HWj0+222w1l7opg=; b=UV/uSRDgY3D6hCaId8mdpJvlWsMaYaQ7hOaso7SMkv5I9NcEeze6KR+GF5jtGLul3v GBEchxNy+guDd6uzknudZh9PVOIepUjUhhKW0zXKJUQ0mxeGXrmJ2UmZA8kexgBr+nfq E1z5uTvX9jYV7KBVc640blY6pjkGmOw6d8IdbLlmyNcHKjXxP4KObXruUxCamw3hDp76 GQyVeceZIHn6XKi6yLxOU5HXkKIt32wbeTnBtszfgP/RPREtWXeBd+Mv03mANqOgj2C8 h9sd8vZdpIyrFwhfBLLApwyZun3KgZvwOaGsAtJtyP/O1eCh9aVOFtYpPGvWSGfb/Tbk vhAA== X-Received: by 10.52.93.20 with SMTP id cq20mr23713562vdb.38.1364487120279; Thu, 28 Mar 2013 09:12:00 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.59.4.204 with SMTP id cg12csp22392ved; Thu, 28 Mar 2013 09:11:59 -0700 (PDT) X-Received: by 10.180.181.40 with SMTP id dt8mr17471737wic.17.1364487119322; Thu, 28 Mar 2013 09:11:59 -0700 (PDT) Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by mx.google.com with ESMTPS id ff16si4326423wic.38.2013.03.28.09.11.59 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Mar 2013 09:11:59 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.45 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.45; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.45 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wg0-f45.google.com with SMTP id x12so1735007wgg.24 for ; Thu, 28 Mar 2013 09:11:59 -0700 (PDT) X-Received: by 10.180.79.227 with SMTP id m3mr17417662wix.12.1364487117741; Thu, 28 Mar 2013 09:11:57 -0700 (PDT) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPS id o5sm16765926wix.3.2013.03.28.09.11.56 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Mar 2013 09:11:56 -0700 (PDT) From: Lee Jones To: linux-kernel@vger.kernel.org, broonie@opensource.wolfsonmicro.com Cc: Lee Jones Subject: [PATCH 04/33] ARM: ux500: Turn off external regulator #1 when early HREFs suspend Date: Thu, 28 Mar 2013 16:11:04 +0000 Message-Id: <1364487093-19551-5-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1364487093-19551-1-git-send-email-lee.jones@linaro.org> References: <1364487093-19551-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQne2OqtqA4OVJiitfwtB1gbSlhj7ykwIMGYUOya/BhL1CLwkoV+Hc/U5hzV39M9dSdzgobn When older variants of the HREF (earlier than v22) development platform enter suspend mode, power down EXT_SUPPLY1. Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500-regulators.c | 17 +++++++++++++++++ arch/arm/mach-ux500/board-mop500-regulators.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c index 22dfaf3..2a2751e 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.c +++ b/arch/arm/mach-ux500/board-mop500-regulators.c @@ -11,6 +11,7 @@ #include #include #include +#include /* to identify older boards for fixes */ #include "board-mop500-regulators.h" static struct regulator_consumer_supply gpio_en_3v3_consumers[] = { @@ -494,3 +495,19 @@ static void ab8500_modify_reg_init(int id, u8 mask, u8 value) BUG_ON(1); } + +void mop500_regulator_init(void) +{ + struct regulator_init_data *regulator; + + /* + * Handle VextSupply1 on older boards than HREFP_V22_V1x + * (turn off in suspend) + */ + if (cpu_is_u8500v20() || cpu_is_u8500v21()) { + /* disable VextSupply1 in suspend */ + regulator = &ab8500_ext_regulators[AB8500_EXT_SUPPLY1]; + regulator->constraints.state_mem.disabled = 1; + regulator->constraints.state_standby.disabled = 1; + } +} diff --git a/arch/arm/mach-ux500/board-mop500-regulators.h b/arch/arm/mach-ux500/board-mop500-regulators.h index 9ca4869..3d4c412 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.h +++ b/arch/arm/mach-ux500/board-mop500-regulators.h @@ -18,4 +18,6 @@ extern struct ab8500_regulator_platform_data ab8500_regulator_plat_data; extern struct regulator_init_data tps61052_regulator; extern struct regulator_init_data gpio_en_3v3_regulator; +void mop500_regulator_init(void); + #endif