Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4081846imu; Mon, 14 Jan 2019 14:42:16 -0800 (PST) X-Google-Smtp-Source: ALg8bN49czVrnPTJcxMAWqiwp4uIU2mfntkTvE/xkkAovI8484ozGkpr54sIrVfRPK7nXi1M2DmM X-Received: by 2002:a62:62c5:: with SMTP id w188mr788483pfb.160.1547505736720; Mon, 14 Jan 2019 14:42:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547505736; cv=none; d=google.com; s=arc-20160816; b=lpvD/d60as011lY2qdP1nMl/pEKAIB1JwsEZenV6sKV+UixglVR30nQDlDzYIHR9pp ij00McbEmx0YsKKTbnukKO0ZX65EJkgy95FvosVF12v6av5FaV0cI2VxgJi40SnnMN15 sduNCMVgyCY3vdTKDH3hkElmj5BSbyP7AGCgaeIoybe2uJO++HFyhSgdJXMS6AGQ53Ve EN5kQynfCWDp2N1HpF6TqllkXV6q+6HUIMamD88hf+DAmEMec+9TocE+igReZG4N655R HVh95deENu45qKoEjhZYFdaDobiJeDs4QNoehTGOwrdbaTah8S2lvQs1cWn32Vlfye53 6vvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:from:message-id:to:cc:references :in-reply-to:user-agent:subject:content-transfer-encoding :mime-version:dkim-signature; bh=WLM5dNyoTozbSd88yUgecKq6QyU7aVPi4GfRYy8UReI=; b=YzfCWfzzg2lM3M/7aG1Vp4nrGYG3FxMh4QOt8Ul6BCmmGjwhJ6OCuklmXXaNaBFoKm pkxScxJ+n8OH+88vFmiI5C65yHSzM5PTs0v7b91j4vJGXK8HPhAstbtSFhHVdo+6pCHj GVbSPAmsazA4XNE6GX9u86Rgk9bDbzwLQhKenCfJiB3P3SPj+MAkFupchQ6qU5/OnNQs xI/1SORHL2XS7Mo5BFl3mPnSvK/ZZPGF3V31dz2pMudY3YR5GWJLOhPSsCXBwBxk91lw rJ7RmXDJmLGIdiQvhQ7FF2wV9wMiaWZUt+N1pq468tUW5/C0pKF7maRHrH5/v9J/ZX5C M6Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=h8TH0YP7; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j13si1408197pgi.227.2019.01.14.14.42.00; Mon, 14 Jan 2019 14:42:16 -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=@chromium.org header.s=google header.b=h8TH0YP7; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726865AbfANWk4 (ORCPT + 99 others); Mon, 14 Jan 2019 17:40:56 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:43815 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726696AbfANWk4 (ORCPT ); Mon, 14 Jan 2019 17:40:56 -0500 Received: by mail-pf1-f196.google.com with SMTP id w73so287853pfk.10 for ; Mon, 14 Jan 2019 14:40:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:subject:user-agent :in-reply-to:references:cc:to:message-id:from:date; bh=WLM5dNyoTozbSd88yUgecKq6QyU7aVPi4GfRYy8UReI=; b=h8TH0YP7JGX2HERs2Xbopr3IY+BaCgskhvbbnmskeHAayxvDvHycazUMlkBSvpLUUi Gccje91dblSoB+9bqGaSTgSGPF0G8ADg46rSdjznDntLdy/c6xAl97+oOZpA1b4B2LPC sTnOI8QeKZeMtfE0BhXygtDJ62lsmomLd2mhA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding:subject :user-agent:in-reply-to:references:cc:to:message-id:from:date; bh=WLM5dNyoTozbSd88yUgecKq6QyU7aVPi4GfRYy8UReI=; b=SiDj7K0sohAP2g3C3IAiUkX+RY/3QqAdT+wE7f/tYKJbKD1HBWHk1BemCvWaKPF+17 NMvLLge3zj3ussyjnWdR4b2Mu6f1qh520aomzpxS7HCl9R6oLsMw2fFZy93guYn0QOmh k9PS6THOeOaAAxOQ/MrbYtXCPCubakMZojFjGMVDfLkuQz1lQlZWpP2y1CzejEvtPd8D taMC6ynlQoaYinBFlc+2/evEFRJhFW7c0E9XfPQi5SK6648jtvShjnMrsTmZdQVMAbPI I46GmmltmnnWemSGk5IxuOkhzRpPZjKovh/J69AzHk20tURWF+RGH6WiNniI2R9U7H9i +apQ== X-Gm-Message-State: AJcUuke253lGqeMa9ZehXKm0qvED5sCzUI1SzpWnOnX7bvsdpzB1z02U 4lr7F9evFUW4cI4lU+usNlCz/Shry66HNA== X-Received: by 2002:a62:6408:: with SMTP id y8mr767786pfb.202.1547505655487; Mon, 14 Jan 2019 14:40:55 -0800 (PST) Received: from localhost ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id e123sm1468751pgc.58.2019.01.14.14.40.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 14:40:54 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v2 3/7] soc: qcom: Add AOSS QMP genpd provider User-Agent: alot/0.8 In-Reply-To: <20190106080915.4493-4-bjorn.andersson@linaro.org> References: <20190106080915.4493-1-bjorn.andersson@linaro.org> <20190106080915.4493-4-bjorn.andersson@linaro.org> Cc: Russell King , Ulf Hansson , Arun Kumar Neelakantam , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org To: Andy Gross , Bjorn Andersson , David Brown , Mark Rutland , Rob Herring Message-ID: <154750565372.169631.9416138415370937156@swboyd.mtv.corp.google.com> From: Stephen Boyd Date: Mon, 14 Jan 2019 14:40:53 -0800 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Bjorn Andersson (2019-01-06 00:09:11) > diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig > index dda19471057f..d81256ef5055 100644 > --- a/drivers/soc/qcom/Kconfig > +++ b/drivers/soc/qcom/Kconfig > @@ -12,6 +12,15 @@ config QCOM_AOSS_QMP > micro-controller in the AOSS, using QMP, to control certain res= ource > that are not exposed through RPMh. > =20 > +config QCOM_AOSS_QMP_PD > + tristate "Qualcomm AOSS Messaging Power Domain driver" > + depends on QCOM_AOSS_QMP > + select PM_GENERIC_DOMAINS > + help > + This driver provides the means of controlling the AOSSs handlin= g of Is that possesive? AOSS's? > + low-power state for resources related to the remoteproc subsyst= ems as > + well as controlling the debug clocks. > + > config QCOM_COMMAND_DB > bool "Qualcomm Command DB" > depends on ARCH_QCOM || COMPILE_TEST > diff --git a/drivers/soc/qcom/aoss-qmp-pd.c b/drivers/soc/qcom/aoss-qmp-p= d.c > new file mode 100644 > index 000000000000..62b8fcb9d09e > --- /dev/null > +++ b/drivers/soc/qcom/aoss-qmp-pd.c > @@ -0,0 +1,135 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Copyright (c) 2018, Linaro Ltd > + */ > +#include > +#include > +#include > +#include > +#include > + > +struct qmp_pd { > + struct qmp *qmp; > + > + struct generic_pm_domain pd; > + > + const char *name; > +}; > + > +#define to_qmp_pd_resource(res) container_of(res, struct qmp_pd, pd) > + > +struct qmp_pd_resource { > + const char *name; > + int (*on)(struct generic_pm_domain *domain); > + int (*off)(struct generic_pm_domain *domain); > +}; > + > +static int qmp_pd_clock_toggle(struct qmp_pd *res, bool enable) > +{ > + char buf[96]; Is 96 calculated from somewhere? Can it be a define because it's quite magical.