From patchwork Thu Jan 19 10:47:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 92021 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp422334qgi; Thu, 19 Jan 2017 10:47:58 -0800 (PST) X-Received: by 10.84.232.204 with SMTP id x12mr15572181plm.125.1484851678482; Thu, 19 Jan 2017 10:47:58 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e19si4324744pfl.42.2017.01.19.10.47.58; Thu, 19 Jan 2017 10:47:58 -0800 (PST) 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; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754427AbdASSrv (ORCPT + 25 others); Thu, 19 Jan 2017 13:47:51 -0500 Received: from mail-pf0-f182.google.com ([209.85.192.182]:33711 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754310AbdASSrI (ORCPT ); Thu, 19 Jan 2017 13:47:08 -0500 Received: by mail-pf0-f182.google.com with SMTP id y143so15510199pfb.0 for ; Thu, 19 Jan 2017 10:46:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vTRphKaaDWVxeBSaOVCWmphVhouY6v/JKeftq4vx4Xs=; b=iP23a6odnQ7qUHP9HW1DcYOHT9u8gRi9JFIvioBLZXsfBKgEG2xGEzOU8k4w581CK2 pN2YYjZTltGXiTbOUgI/gL3c+iLPJYWPDQsFCVCtv+O61xmC1/V++cq8hAtbwtrJAw+H Bg7TEkJ/q3GbyFIFdfn3n72+a6kvxyQPJw3OI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vTRphKaaDWVxeBSaOVCWmphVhouY6v/JKeftq4vx4Xs=; b=MC8HjTczTePb9vuxwRPlzTlkQtWMpg9DjnAbQ/aYa9trGx08Z5TtVS8U6rDASQ1v9x Ikb9vNlFHGDQ8CmJSragBc2EWakjsMNmkYrAwOoCMEROW3lr0kY/3tVAY1Y7kN064sL3 SAlVg5K7bGbYEiKZbKz/WX8fsRIY7v8/aLslty0D14iZ8VzR5Ig9cvgzBLcNfX9Ux5wD lxJpuQT/M2/HLMl9gCmMfJrrgQCDHagFe1XjxaQjWnuQnWmC+W5Vhda4lIXooKpj1H2d KHmrDR/UNnUtEQpqGWcOIO4kYzgsqDU645qOMzT+TeflVEobOMMdf3vp+uTyNoQzTKRF MQoA== X-Gm-Message-State: AIkVDXLCcXBmOUupU5E27cvY8xHaG7YRp1XTN/zL1Ob9g2E7HkovsFaMwa86mSKYJGk+PHXB X-Received: by 10.98.223.195 with SMTP id d64mr11803073pfl.80.1484851612623; Thu, 19 Jan 2017 10:46:52 -0800 (PST) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id w76sm10552990pfd.74.2017.01.19.10.46.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jan 2017 10:46:51 -0800 (PST) From: Bjorn Andersson To: Kishon Vijay Abraham I Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Rob Herring , Mark Rutland , devicetree@vger.kernel.org, Subhash Jadavani , Vivek Gautam Subject: [PATCH 3/4] phy: qcom-ufs: Remove -always-on property Date: Thu, 19 Jan 2017 02:47:38 -0800 Message-Id: <20170119104739.4376-3-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170119104739.4376-1-bjorn.andersson@linaro.org> References: <20170119104739.4376-1-bjorn.andersson@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The fact that a regulator is always-on is a property of the regulator, not a specific consumer. Implementing this in the driver leads to a system behaviour that is dependent on if the Qualcomm UFS PHY was ever (partially) probed. If the specific regulator should be always on in a particular device, mark it so by specifying "regulator-always-on" in the regulator node. Cc: Subhash Jadavani Cc: Vivek Gautam Signed-off-by: Bjorn Andersson --- Documentation/devicetree/bindings/ufs/ufs-qcom.txt | 1 - drivers/phy/phy-qcom-ufs-i.h | 1 - drivers/phy/phy-qcom-ufs.c | 5 +---- 3 files changed, 1 insertion(+), 6 deletions(-) -- 2.11.0 Reviewed-by: Subhash Jadavani diff --git a/Documentation/devicetree/bindings/ufs/ufs-qcom.txt b/Documentation/devicetree/bindings/ufs/ufs-qcom.txt index b6b5130e5f65..1f69ee1a61ea 100644 --- a/Documentation/devicetree/bindings/ufs/ufs-qcom.txt +++ b/Documentation/devicetree/bindings/ufs/ufs-qcom.txt @@ -29,7 +29,6 @@ Optional properties: - vdda-pll-max-microamp : specifies max. load that can be drawn from pll supply - vddp-ref-clk-supply : phandle to UFS device ref_clk pad power supply - vddp-ref-clk-max-microamp : specifies max. load that can be drawn from this supply -- vddp-ref-clk-always-on : specifies if this supply needs to be kept always on Example: diff --git a/drivers/phy/phy-qcom-ufs-i.h b/drivers/phy/phy-qcom-ufs-i.h index d505d98cf5f8..13b02b7de30b 100644 --- a/drivers/phy/phy-qcom-ufs-i.h +++ b/drivers/phy/phy-qcom-ufs-i.h @@ -77,7 +77,6 @@ struct ufs_qcom_phy_vreg { int min_uV; int max_uV; bool enabled; - bool is_always_on; }; struct ufs_qcom_phy { diff --git a/drivers/phy/phy-qcom-ufs.c b/drivers/phy/phy-qcom-ufs.c index bbd317158084..c145fa6e824c 100644 --- a/drivers/phy/phy-qcom-ufs.c +++ b/drivers/phy/phy-qcom-ufs.c @@ -242,9 +242,6 @@ static int ufs_qcom_phy_init_vreg(struct device *dev, } err = 0; } - snprintf(prop_name, MAX_PROP_NAME, "%s-always-on", name); - vreg->is_always_on = of_property_read_bool(dev->of_node, - prop_name); } if (!strcmp(name, "vdda-pll")) { @@ -402,7 +399,7 @@ static int ufs_qcom_phy_disable_vreg(struct device *dev, { int ret = 0; - if (!vreg || !vreg->enabled || vreg->is_always_on) + if (!vreg || !vreg->enabled) goto out; ret = regulator_disable(vreg->reg);