From patchwork Mon Apr 23 09:37:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 8034 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 02A0A23E4C for ; Mon, 23 Apr 2012 09:38:17 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id A72DCA183D9 for ; Mon, 23 Apr 2012 09:38:16 +0000 (UTC) Received: by iage36 with SMTP id e36so22482980iag.11 for ; Mon, 23 Apr 2012 02:38:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=x6Rec72gF132+Uly+Upj1n3WgFjvzcUUbN4BmvAOwyM=; b=pBIF4+1RvodXmdhUe5e5za/gfxSpWwNLD9sMAMvFNeBef1oXr7aw9h77sHtiWmRs+J w0IVYO4I3c9FXdYgwEZem25MPIDYhEQo/cThfqO1Ujf6paefjv1tgvE6Bmr1gPLFcEFE VlJ3OZ1BUOy0l3R8rxFFHS0MlqIybD1qumgXcW/nVufzsYhgyo3oXmxD6+mmDXo++DwV Va7XocTmllwrxNTfvpw9qN8B59v4PHs5yyYP2rdBvxEr0zMG0aFpeV7Do7TOderdxY+d S72dQOKqEtnXQCZjOMqpksyFj5J6FUX/cknVkUVFxMMwey8ERn1FqPexSruv17W2T/9X 4EMA== Received: by 10.50.207.38 with SMTP id lt6mr1791664igc.55.1335173896117; Mon, 23 Apr 2012 02:38:16 -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.231.137.198 with SMTP id x6csp99649ibt; Mon, 23 Apr 2012 02:38:15 -0700 (PDT) Received: by 10.14.101.4 with SMTP id a4mr2402667eeg.62.1335173894987; Mon, 23 Apr 2012 02:38:14 -0700 (PDT) Received: from eu1sys200aog120.obsmtp.com (eu1sys200aog120.obsmtp.com. [207.126.144.149]) by mx.google.com with SMTP id p2si4217611eem.33.2012.04.23.02.38.07 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 23 Apr 2012 02:38:14 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.149 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) client-ip=207.126.144.149; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.149 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) smtp.mail=ulf.hansson@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob120.postini.com ([207.126.147.11]) with SMTP ID DSNKT5Ui/3sQt2dwYVNczoQnpDeNOJlB9hPB@postini.com; Mon, 23 Apr 2012 09:38:11 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id B3048CA; Mon, 23 Apr 2012 09:29:39 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 3CA9C1018; Mon, 23 Apr 2012 09:38:01 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 13A2924C2F2; Mon, 23 Apr 2012 11:37:55 +0200 (CEST) Received: from steludxu4020.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Mon, 23 Apr 2012 11:38:00 +0200 From: Ulf Hansson To: Liam Girdwood , Mark Brown , Cc: Mattias Wallin , Jonas Aberg , Lee Jones , Ulf Hansson Subject: [PATCH] regulator: core: Keep boot_on regulators powered during init Date: Mon, 23 Apr 2012 11:37:53 +0200 Message-ID: <1335173873-24301-1-git-send-email-ulf.hansson@stericsson.com> X-Mailer: git-send-email 1.7.9 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnJNO/IYCxauHxTK9WVcuPwMtv4ew/AYT6+9Us2kOUt/+GUFrrB+SmD60bHxOpAkMfcsQGr Regulators which has boot_on constraints set, will now remain powered after regulator_init_complete is done. In this case we leave the enable->disable operation to be handled by the regulator consumer instead. Signed-off-by: Ulf Hansson --- drivers/regulator/core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 1caada2..c5af6d2 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -3393,7 +3393,7 @@ static int __init regulator_init_complete(void) ops = rdev->desc->ops; c = rdev->constraints; - if (!ops->disable || (c && c->always_on)) + if (!ops->disable || (c && (c->always_on || c->boot_on))) continue; mutex_lock(&rdev->mutex);