From patchwork Mon Apr 9 11:43:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 133034 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp168510ljb; Mon, 9 Apr 2018 04:44:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx4829N/tUBG8Ak+kWITWRCpwKoNowi7aWUeT96IyNcTjx1xEOokYpWq6J4tvaFHvWSQI2J81 X-Received: by 2002:a17:902:107:: with SMTP id 7-v6mr38190421plb.374.1523274286654; Mon, 09 Apr 2018 04:44:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523274286; cv=none; d=google.com; s=arc-20160816; b=zl3eYwxoBg+h0ZwUJ8oqxijFK5sjeXMkxKzM1WLK1QpdPHmFClEE4sNcnQDyiEO9CJ 5IldDpsNSwA15KZw6Adv/Awv0VzJlDooGXKalUDtxVCyzR42ixV45YQkbBs8MpXRmwc8 txyyPi13EJetLwf2WuFu0rFhkqaXS58YtGJm+lyFJkKt187WpaMblJpuH9VVQeouOKjK AvP+2HNm+A/gohtctqecDI92L051jSGDQi6bkB5u4T2oRO6f5JiA+uxXNRO+TTeUixNM KcjNaH6oqY6NpER+uV5OQIDJkCxVLeOVcKM1awPoyrui5Lu2pT6Y5nOuk0/8PW3qFfnJ Joww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=TFezoPga6ifvymwl7bV21bweH3Wl2drJfxx5EqJqrT8=; b=QdXd6l8t801uTqkcbCPwe7gX1gz8nMXnvvtBUBwUkexAz1wXk/UCsJv+oQbOLmAyCh iMlFkSjcVLFPDmPoqiKHnARNOLLNGemDgMvIZDDQYABVoowzmdETLAAEl6NBs7zmawtI 3Pq9KJbpHsGSbLFNd6eyCRauVgzetmE1omMkgFMgNyaL5nJOOkDckcEs9w8GyM/KeF/c cNxxjPu79CUodppqtPfVuy99qhVG4n/c170keFgv/eoq2evxfxHxmrCBadF4fV1pF9OQ CNCAqDhSolDizP/+aJ7wRQ5lTCtgqiILg8olymlp2qOau8Yddlnz6iAnXV2cFSYYa3xq cFhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AzzjnMJk; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n11-v6si153720pls.422.2018.04.09.04.44.46; Mon, 09 Apr 2018 04:44:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 header.s=google header.b=AzzjnMJk; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1752272AbeDILoo (ORCPT + 11 others); Mon, 9 Apr 2018 07:44:44 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:35520 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752260AbeDILom (ORCPT ); Mon, 9 Apr 2018 07:44:42 -0400 Received: by mail-pl0-f65.google.com with SMTP id 61-v6so4959610plb.2 for ; Mon, 09 Apr 2018 04:44:42 -0700 (PDT) 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 :in-reply-to:references; bh=TFezoPga6ifvymwl7bV21bweH3Wl2drJfxx5EqJqrT8=; b=AzzjnMJkINUizEYNIATdraA8i9kwcW958GTPiubPC9eh+2hBH1c12+WTjdCCNHqu7f Wdr95JHIlACRjeY2at+xxy8SyPtd7KaN8ELfdInjrtE0PcvmROBwbpFO69K447oZeyZ8 T0ouf5jNLb8CVmyTDo9ult1yZuc7eJDZijOPI= 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:in-reply-to:references; bh=TFezoPga6ifvymwl7bV21bweH3Wl2drJfxx5EqJqrT8=; b=EkFxoDha+Mjci11q9NMEn6g4aVCklUcbzXSSWmMzUrhvCg7AKrWIFaZn44J4IvW5pg pAbvRTnk5+4x4Q6BnwFTGyNdgAk6/5KR14SgWtvS4kaK2OsSa8zCMOvTVHg8UCvP7m14 5dFkS+KTj144Y8Oaa/WmEDvgYNtMdizwZFQbzuugvhCQ230uB/VAHBzYBl3JHfMx5C+U D0QdePOUg4neDT+UBVPysGZOv4hPXicpKqMGKEFHiT7OpMHFfpDjT6GZUHMCYqe8ftcF s9DPB36OM/ZHvvnpErOcDFfOAtLiCCmD6usg8xWBaBS9woKqFT7+m6QEs249AEIHwVuS 1+OA== X-Gm-Message-State: ALQs6tCsidUROrqfx6d2qBFSo/kznKzC068QZ8dHbrWoSuNOvGX8+gEk Wr8rXq5511WVzKnq2IqBQlje+w== X-Received: by 2002:a17:902:8505:: with SMTP id bj5-v6mr19759049plb.231.1523274282092; Mon, 09 Apr 2018 04:44:42 -0700 (PDT) Received: from localhost ([122.171.228.188]) by smtp.gmail.com with ESMTPSA id t25sm338588pfh.184.2018.04.09.04.44.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Apr 2018 04:44:41 -0700 (PDT) From: Viresh Kumar To: Ulf Hansson , Stephen Boyd , Viresh Kumar , Nishanth Menon , "Rafael J. Wysocki" Cc: Viresh Kumar , Rajendra Nayak , Vincent Guittot , linux-pm@vger.kernel.org Subject: [PATCH V2 11/11] PM / OPP: Remove dev_pm_opp_{un}register_get_pstate_helper() Date: Mon, 9 Apr 2018 17:13:51 +0530 Message-Id: <9068360bcd9d2c3f9099af2ba80b7396fbf79d47.1523273291.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org These helpers aren't used anymore, remove them. Signed-off-by: Viresh Kumar Reviewed-by: Ulf Hansson --- drivers/opp/core.c | 75 -------------------------------------------------- drivers/opp/opp.h | 2 -- include/linux/pm_opp.h | 10 ------- 3 files changed, 87 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/opp/core.c b/drivers/opp/core.c index e4ec30ee1493..6d3624ba89b6 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -1567,81 +1567,6 @@ void dev_pm_opp_unregister_set_opp_helper(struct opp_table *opp_table) } EXPORT_SYMBOL_GPL(dev_pm_opp_unregister_set_opp_helper); -/** - * dev_pm_opp_register_get_pstate_helper() - Register get_pstate() helper. - * @dev: Device for which the helper is getting registered. - * @get_pstate: Helper. - * - * TODO: Remove this callback after the same information is available via Device - * Tree. - * - * This allows a platform to initialize the performance states of individual - * OPPs for its devices, until we get similar information directly from DT. - * - * This must be called before the OPPs are initialized for the device. - */ -struct opp_table *dev_pm_opp_register_get_pstate_helper(struct device *dev, - int (*get_pstate)(struct device *dev, unsigned long rate)) -{ - struct opp_table *opp_table; - int ret; - - if (!get_pstate) - return ERR_PTR(-EINVAL); - - opp_table = dev_pm_opp_get_opp_table(dev); - if (!opp_table) - return ERR_PTR(-ENOMEM); - - /* This should be called before OPPs are initialized */ - if (WARN_ON(!list_empty(&opp_table->opp_list))) { - ret = -EBUSY; - goto err; - } - - /* Already have genpd_performance_state set */ - if (WARN_ON(opp_table->genpd_performance_state)) { - ret = -EBUSY; - goto err; - } - - opp_table->genpd_performance_state = true; - opp_table->get_pstate = get_pstate; - - return opp_table; - -err: - dev_pm_opp_put_opp_table(opp_table); - - return ERR_PTR(ret); -} -EXPORT_SYMBOL_GPL(dev_pm_opp_register_get_pstate_helper); - -/** - * dev_pm_opp_unregister_get_pstate_helper() - Releases resources blocked for - * get_pstate() helper - * @opp_table: OPP table returned from dev_pm_opp_register_get_pstate_helper(). - * - * Release resources blocked for platform specific get_pstate() helper. - */ -void dev_pm_opp_unregister_get_pstate_helper(struct opp_table *opp_table) -{ - if (!opp_table->genpd_performance_state) { - pr_err("%s: Doesn't have performance states set\n", - __func__); - return; - } - - /* Make sure there are no concurrent readers while updating opp_table */ - WARN_ON(!list_empty(&opp_table->opp_list)); - - opp_table->genpd_performance_state = false; - opp_table->get_pstate = NULL; - - dev_pm_opp_put_opp_table(opp_table); -} -EXPORT_SYMBOL_GPL(dev_pm_opp_unregister_get_pstate_helper); - /** * dev_pm_opp_add() - Add an OPP table from a table definitions * @dev: device for which we do this operation diff --git a/drivers/opp/opp.h b/drivers/opp/opp.h index f9eccf9811ae..7c540fd063b2 100644 --- a/drivers/opp/opp.h +++ b/drivers/opp/opp.h @@ -140,7 +140,6 @@ enum opp_table_access { * @genpd_performance_state: Device's power domain support performance state. * @set_opp: Platform specific set_opp callback * @set_opp_data: Data to be passed to set_opp callback - * @get_pstate: Platform specific get_pstate callback * @dentry: debugfs dentry pointer of the real device directory (not links). * @dentry_name: Name of the real dentry. * @@ -178,7 +177,6 @@ struct opp_table { int (*set_opp)(struct dev_pm_set_opp_data *data); struct dev_pm_set_opp_data *set_opp_data; - int (*get_pstate)(struct device *dev, unsigned long rate); #ifdef CONFIG_DEBUG_FS struct dentry *dentry; diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index 8fd34c4398b2..099b31960dec 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h @@ -125,8 +125,6 @@ struct opp_table *dev_pm_opp_set_clkname(struct device *dev, const char * name); void dev_pm_opp_put_clkname(struct opp_table *opp_table); struct opp_table *dev_pm_opp_register_set_opp_helper(struct device *dev, int (*set_opp)(struct dev_pm_set_opp_data *data)); void dev_pm_opp_unregister_set_opp_helper(struct opp_table *opp_table); -struct opp_table *dev_pm_opp_register_get_pstate_helper(struct device *dev, int (*get_pstate)(struct device *dev, unsigned long rate)); -void dev_pm_opp_unregister_get_pstate_helper(struct opp_table *opp_table); int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq); int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, const struct cpumask *cpumask); int dev_pm_opp_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask); @@ -247,14 +245,6 @@ static inline struct opp_table *dev_pm_opp_register_set_opp_helper(struct device static inline void dev_pm_opp_unregister_set_opp_helper(struct opp_table *opp_table) {} -static inline struct opp_table *dev_pm_opp_register_get_pstate_helper(struct device *dev, - int (*get_pstate)(struct device *dev, unsigned long rate)) -{ - return ERR_PTR(-ENOTSUPP); -} - -static inline void dev_pm_opp_unregister_get_pstate_helper(struct opp_table *opp_table) {} - static inline struct opp_table *dev_pm_opp_set_prop_name(struct device *dev, const char *name) { return ERR_PTR(-ENOTSUPP);