From patchwork Fri Mar 28 05:20:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 27242 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f197.google.com (mail-yk0-f197.google.com [209.85.160.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B005420062 for ; Fri, 28 Mar 2014 05:21:21 +0000 (UTC) Received: by mail-yk0-f197.google.com with SMTP id 19sf5891927ykq.4 for ; Thu, 27 Mar 2014 22:21:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=L7BptVpSwTmxoxJBq6VtBHfd/Ef8y292KfxyuYLpY0c=; b=mWthxoE3Vtt56EOO/HebsKCa6NtFt6PcgSs6ugK6Q5B6nkqV0lFVABD13Qzer7TBP9 329bNuiaycWSw8CSEN+WUAd4OFqyIR6CD+po485FUBhhjXigKrCveJ0XCHHBPpAz1CmH 6hWGdGt78GG4FOUAhF3EO2X61zfekyZQdxgdb0pG7x5MB4EvuitZVv1gOugM2KXUJpyW xJFusBlM/CGwNplb9MW73/CeAI+tWpfweY179rd6fb46XOYMVon/H/al71W1v//BUooQ wK8zuG5/yIeFaUV92NBnjltMvmwV0wqzl2LKqwXeR4Se0tXhBBScP76JQxFReN2rVcNd f+ag== X-Gm-Message-State: ALoCoQmvm/hdg3Yi7nPMgTEkBQHpq3YAFM8prJWAhDfAtRqARJJVVRQxhYDg4KIOl5fQO17WoLqu X-Received: by 10.58.127.66 with SMTP id ne2mr1109435veb.27.1395984081450; Thu, 27 Mar 2014 22:21:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.78 with SMTP id f72ls1470555qge.86.gmail; Thu, 27 Mar 2014 22:21:21 -0700 (PDT) X-Received: by 10.52.72.48 with SMTP id a16mr4403914vdv.19.1395984081365; Thu, 27 Mar 2014 22:21:21 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id ca6si963505vcb.163.2014.03.27.22.21.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Mar 2014 22:21:21 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id lf12so5425056vcb.11 for ; Thu, 27 Mar 2014 22:21:21 -0700 (PDT) X-Received: by 10.58.229.167 with SMTP id sr7mr5142677vec.7.1395984081251; Thu, 27 Mar 2014 22:21:21 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp7832vck; Thu, 27 Mar 2014 22:21:20 -0700 (PDT) X-Received: by 10.66.233.169 with SMTP id tx9mr6206819pac.7.1395984080525; Thu, 27 Mar 2014 22:21:20 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f8si2900420pbc.372.2014.03.27.22.21.19; Thu, 27 Mar 2014 22:21:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753854AbaC1FVK (ORCPT + 27 others); Fri, 28 Mar 2014 01:21:10 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:46829 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753225AbaC1FUo (ORCPT ); Fri, 28 Mar 2014 01:20:44 -0400 Received: by mail-pa0-f49.google.com with SMTP id lj1so4479726pab.22 for ; Thu, 27 Mar 2014 22:20:43 -0700 (PDT) X-Received: by 10.66.49.74 with SMTP id s10mr6401490pan.0.1395984043459; Thu, 27 Mar 2014 22:20:43 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id ci4sm17521715pbb.50.2014.03.27.22.20.40 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Mar 2014 22:20:42 -0700 (PDT) From: Tushar Behera To: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: rob@landley.net, olof@lixom.net, Mark Brown Subject: [PATCH 2/2] regulator: core: Add reg_ignore_unused to keep boot time regulators enabled Date: Fri, 28 Mar 2014 10:50:22 +0530 Message-Id: <1395984022-8284-3-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1395984022-8284-1-git-send-email-tushar.behera@linaro.org> References: <1395984022-8284-1-git-send-email-tushar.behera@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: tushar.behera@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Keep all regulators already enabled by bootloader on, even if no driver has claimed them. This is useful for debug and development, but should not be needed on a platform with proper driver support. Signed-off-by: Tushar Behera CC: Mark Brown --- Documentation/kernel-parameters.txt | 8 ++++++++ drivers/regulator/core.c | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 96bb532..20448e0 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -92,6 +92,7 @@ parameter is applicable: PPT Parallel port support is enabled. PS2 Appropriate PS/2 support is enabled. RAM RAM disk support is enabled. + REG Regulator support is enabled. S390 S390 architecture is enabled. SCSI Appropriate SCSI support is enabled. A lot of drivers have their options described inside @@ -2886,6 +2887,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted. reboot_cpu is s[mp]#### with #### being the processor to be used for rebooting. + reg_ignore_unused + [REG] + Keep all regulators already enabled by bootloader on, + even if no driver has claimed them. This is useful + for debug and development, but should not be + needed on a platform with proper driver support. + relax_domain_level= [KNL, SMP] Set scheduler's default relax_domain_level. See Documentation/cgroups/cpusets.txt. diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 9a09f3c..6e8305a 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -3800,6 +3800,14 @@ static int __init regulator_init(void) /* init early to allow our consumers to complete system booting */ core_initcall(regulator_init); +static bool reg_ignore_unused; +static int __init reg_ignore_unused_setup(char *__unused) +{ + reg_ignore_unused = true; + return 1; +} +__setup("reg_ignore_unused", reg_ignore_unused_setup); + static int __init regulator_init_complete(void) { struct regulator_dev *rdev; @@ -3807,6 +3815,11 @@ static int __init regulator_init_complete(void) struct regulation_constraints *c; int enabled, ret; + if (reg_ignore_unused) { + pr_warn("reg: Not disabling unused regulators\n"); + return 0; + } + /* * Since DT doesn't provide an idiomatic mechanism for * enabling full constraints and since it's much more natural