From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rajendra Nayak Subject: Re: [PATCH v3 1/6] clk: qcom: Add support for GDSCs Date: Tue, 24 Mar 2015 08:40:13 +0530 Message-ID: <5510D595.4070008@codeaurora.org> References: <1426832483-27026-1-git-send-email-rnayak@codeaurora.org> <1426832483-27026-2-git-send-email-rnayak@codeaurora.org> <550BCE7C.3030000@linaro.org> <550BED93.3000305@codeaurora.org> <550BEFE0.1020004@codeaurora.org> <20150323232335.GA24757@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:60699 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752175AbbCXDKU (ORCPT ); Mon, 23 Mar 2015 23:10:20 -0400 In-Reply-To: <20150323232335.GA24757@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Stephen Boyd Cc: Srinivas Kandagatla , mturquette@linaro.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, georgi.djakov@linaro.org, svarbanov@mm-sol.com On 03/24/2015 04:53 AM, Stephen Boyd wrote: > On 03/20, Rajendra Nayak wrote: >> []... >>>>> @@ -0,0 +1,46 @@ >>>>> +/* >>>>> + * Copyright (c) 2015, The Linux Foundation. All rights reserved. >>>>> + * >>>>> + * This program is free software; you can redistribute it and/or modify >>>>> + * it under the terms of the GNU General Public License version 2 and >>>>> + * only version 2 as published by the Free Software Foundation. >>>>> + * >>>>> + * This program is distributed in the hope that it will be useful, >>>>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of >>>>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >>>>> + * GNU General Public License for more details. >>>>> + */ >>>>> + >>>>> +#ifndef __QCOM_GDSC_H__ >>>>> +#define __QCOM_GDSC_H__ >>>>> + >>>>> +#include >>>>> + >>>>> +struct regmap; >> >> I realized, after Srini pointed out on irc that this fwd declaration >> is a complete waste. I'll remove it when I do a repost. >> > > Why? It's there so that struct regmap is declared instead of > being declared inside struct gdsc. ah, sorry. I completely overlooked the fact that there isn;t a #include > >>>>> + >>>>> +/** >>>>> + * struct gdsc - Globally Distributed Switch Controller >>>>> + * @pd: generic power domain >>>>> + * @regmap: regmap for MMIO accesses >>>>> + * @gdscr: gsdc control register >>>>> + */ >>>>> +struct gdsc { >>>>> + struct generic_pm_domain pd; >>>>> + struct regmap *regmap; >>>>> + unsigned int gdscr; >>>>> +}; >>>>> + >>>>> +#define domain_to_gdsc(domain) container_of(domain, struct gdsc, pd) >>>>> + >>>>> +#ifdef CONFIG_QCOM_GDSC >>>>> +int gdsc_register(struct device *, struct gdsc **, size_t n, struct >>>>> regmap *); >>>>> +void gdsc_unregister(struct device *); >>>>> +#else >>>>> +int gdsc_register(struct device *d, struct gdsc **g, size_t n, struct >>>>> regmap *r) > -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation