From patchwork Tue Dec 19 21:22:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 122409 Delivered-To: patches@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4696994qgn; Tue, 19 Dec 2017 13:23:00 -0800 (PST) X-Received: by 10.46.59.10 with SMTP id i10mr3190852lja.60.1513718580624; Tue, 19 Dec 2017 13:23:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513718580; cv=none; d=google.com; s=arc-20160816; b=Mhm/vUGcKmRa15LRgXWwMQBupsQ4vwsqL5uMVcHxKRf445YOhTkVIncnH6WsNnuCGm 2EUzf3RzXbGHV67ywSNMMG4ROReew6ELHzEx5xgIuyQhwZCjCwhcW5rm1OiSlI5WP6AN tLSZl2gaiyHXZnjTQdZ5lXOrrdbjbz0aUYHQZ8q9v9g23kEJloPQKs1w3tYS6q3hED+F IRzBDkzS+tWdXiPxpTNdVh1SUa8ueCN5k9xo1cTkjk1Hg/ualmafLacGL5ljB2xVpcC9 wLbzIwbq17H+ZZ5AOLMhCBNbCXl+VQTZ7YIA0w//a/BoKTNogPrf00lh/3+0tqJ/SI6m wezw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=5l1EnkxdLbjvMPQesLQimh5VWyAFwilkS96XcUdE4QY=; b=r6ZUyM4MZfyytp8us/KTcclfuFp7bkR0CeDSNasdM1i6AT1j2Kh6JBxeMEP4CUfVvr ZVYwIxobzvaWNu0LlqMff6mwnSJJQfKvzSMyBxJWUlRkbMcO2CuW9/Ugl8BavU9/raZZ acQ2BM/B2Dbfau7hdiyaJx8W2dEjD1SxWztEuLnQCYgqqzRgeUYY90HdpdyeYMc5NkpW qBLybXEoW/Ybw/ePdayLONCeU3f21jvcXzuoQbcQQiF+9pN0FC+p+R9AjDRA5/O7DkvE P/0jlo3ychvUFbcMcQILjNivzqrGZpSlQjofYNzMmHdjrpj0Gd9dlrZ0J0XZF8BlYw29 vRbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AOMwsTYL; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id 74sor3067173ljc.85.2017.12.19.13.23.00 for (Google Transport Security); Tue, 19 Dec 2017 13:23:00 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AOMwsTYL; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=5l1EnkxdLbjvMPQesLQimh5VWyAFwilkS96XcUdE4QY=; b=AOMwsTYLbYnPj5ZDceYNB9qrY8fjKKSd+4ANnjwo+6SzotHxXN+rfH/KOGkVYxjkFr VhAwhMiN+q7wF/GVlF3vUuQdXFVqHlArHXpvsIsxcUanrkfuv051+HnG/7lD2iFG7mT1 HH++jFZ162OB+We262nUn9THCGxmCbcs2PKXs= 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=5l1EnkxdLbjvMPQesLQimh5VWyAFwilkS96XcUdE4QY=; b=hOo5ISM5atruBwKShhp1kVft/ctCdkSeH5IvQ2G6pdGd3W2NqRuJG5eYBjHZXTKKST yYEZaT1b+vvF1ZDTF8B2359+b+27h1xWqSMNfYw95kk+G9EV43n5vACjEE5hCn55EDds K30bFAjZ8MaP15VtYYusy0+qJa7MxwrxAnEUB8ITn7RFd1qfi7O8711IhY4BVk7Fje7u HeNITa3SJk9Opi7QFDCDPFZxHXb2Xoui5lCCKgWSavOBgYnHRGbYj40U8DMErbgq/2J1 l11JN82xsHqzdmoqes58suegBUpI4N6nUd8qGESsfAWaAruCNnVghXHb8sLTbPIVrg6W su2A== X-Gm-Message-State: AKGB3mKB74I5Hg8ThvjbWczaN/MnQpRMmt1wrMgkzRTA00dwNMTVj09e ph0Maz1JGn+V/f9kKllJygjMsTaw X-Google-Smtp-Source: ACJfBosmoBVFTfnOIvAfspIcEim5ihtPTA3E5BpbGxS3gbjN+HFTh8sxyY6Cj/AvAgDWFIZZaxptgg== X-Received: by 10.46.86.131 with SMTP id k3mr3252693lje.61.1513718580274; Tue, 19 Dec 2017 13:23:00 -0800 (PST) Return-Path: Received: from localhost.localdomain (h-158-174-22-67.NA.cust.bahnhof.se. [158.174.22.67]) by smtp.gmail.com with ESMTPSA id 13sm3173068ljv.37.2017.12.19.13.22.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Dec 2017 13:22:59 -0800 (PST) From: Ulf Hansson To: Kishon Vijay Abraham I , linux-kernel@vger.kernel.org Cc: "Rafael J . Wysocki" , linux-pm@vger.kernel.org, Yoshihiro Shimoda , Geert Uytterhoeven , linux-renesas-soc@vger.kernel.org, Ulf Hansson Subject: [PATCH 2/3] phy: core: Drop unused runtime PM APIs Date: Tue, 19 Dec 2017 22:22:30 +0100 Message-Id: <1513718551-28624-3-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513718551-28624-1-git-send-email-ulf.hansson@linaro.org> References: <1513718551-28624-1-git-send-email-ulf.hansson@linaro.org> The phy core already deploys runtime PM management, so there seems to be no reason for having a separate option of controlling runtime PM for phys via the phy runtime PM APIs. Moreover, since previous changes moved the runtime PM reference counting onto the parent provider device, which also avoid to enabled runtime PM for the phy child device, the APIs becomes NOOP. Therefore, let's remove them altogether. Signed-off-by: Ulf Hansson --- drivers/phy/phy-core.c | 66 ------------------------------------------------- include/linux/phy/phy.h | 45 --------------------------------- 2 files changed, 111 deletions(-) -- 2.7.4 diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index 9fa3f13..60818e1 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -149,72 +149,6 @@ static struct phy_provider *of_phy_provider_lookup(struct device_node *node) return ERR_PTR(-EPROBE_DEFER); } -int phy_pm_runtime_get(struct phy *phy) -{ - int ret; - - if (!pm_runtime_enabled(&phy->dev)) - return -ENOTSUPP; - - ret = pm_runtime_get(&phy->dev); - if (ret < 0 && ret != -EINPROGRESS) - pm_runtime_put_noidle(&phy->dev); - - return ret; -} -EXPORT_SYMBOL_GPL(phy_pm_runtime_get); - -int phy_pm_runtime_get_sync(struct phy *phy) -{ - int ret; - - if (!pm_runtime_enabled(&phy->dev)) - return -ENOTSUPP; - - ret = pm_runtime_get_sync(&phy->dev); - if (ret < 0) - pm_runtime_put_sync(&phy->dev); - - return ret; -} -EXPORT_SYMBOL_GPL(phy_pm_runtime_get_sync); - -int phy_pm_runtime_put(struct phy *phy) -{ - if (!pm_runtime_enabled(&phy->dev)) - return -ENOTSUPP; - - return pm_runtime_put(&phy->dev); -} -EXPORT_SYMBOL_GPL(phy_pm_runtime_put); - -int phy_pm_runtime_put_sync(struct phy *phy) -{ - if (!pm_runtime_enabled(&phy->dev)) - return -ENOTSUPP; - - return pm_runtime_put_sync(&phy->dev); -} -EXPORT_SYMBOL_GPL(phy_pm_runtime_put_sync); - -void phy_pm_runtime_allow(struct phy *phy) -{ - if (!pm_runtime_enabled(&phy->dev)) - return; - - pm_runtime_allow(&phy->dev); -} -EXPORT_SYMBOL_GPL(phy_pm_runtime_allow); - -void phy_pm_runtime_forbid(struct phy *phy) -{ - if (!pm_runtime_enabled(&phy->dev)) - return; - - pm_runtime_forbid(&phy->dev); -} -EXPORT_SYMBOL_GPL(phy_pm_runtime_forbid); - int phy_init(struct phy *phy) { int ret; diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index 4f8423a..29871aaa 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h @@ -17,7 +17,6 @@ #include #include #include -#include #include struct phy; @@ -133,12 +132,6 @@ static inline void *phy_get_drvdata(struct phy *phy) } #if IS_ENABLED(CONFIG_GENERIC_PHY) -int phy_pm_runtime_get(struct phy *phy); -int phy_pm_runtime_get_sync(struct phy *phy); -int phy_pm_runtime_put(struct phy *phy); -int phy_pm_runtime_put_sync(struct phy *phy); -void phy_pm_runtime_allow(struct phy *phy); -void phy_pm_runtime_forbid(struct phy *phy); int phy_init(struct phy *phy); int phy_exit(struct phy *phy); int phy_power_on(struct phy *phy); @@ -187,44 +180,6 @@ void devm_of_phy_provider_unregister(struct device *dev, int phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id); void phy_remove_lookup(struct phy *phy, const char *con_id, const char *dev_id); #else -static inline int phy_pm_runtime_get(struct phy *phy) -{ - if (!phy) - return 0; - return -ENOSYS; -} - -static inline int phy_pm_runtime_get_sync(struct phy *phy) -{ - if (!phy) - return 0; - return -ENOSYS; -} - -static inline int phy_pm_runtime_put(struct phy *phy) -{ - if (!phy) - return 0; - return -ENOSYS; -} - -static inline int phy_pm_runtime_put_sync(struct phy *phy) -{ - if (!phy) - return 0; - return -ENOSYS; -} - -static inline void phy_pm_runtime_allow(struct phy *phy) -{ - return; -} - -static inline void phy_pm_runtime_forbid(struct phy *phy) -{ - return; -} - static inline int phy_init(struct phy *phy) { if (!phy)