Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3872524ybp; Sun, 6 Oct 2019 22:31:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHoLdLTlQUmx0fyMlfPyM/a46MVvi209TV74WRQorBsLJ43LKvocPWBWbDKs8zCpz1O4rB X-Received: by 2002:a17:906:1c5b:: with SMTP id l27mr22593131ejg.27.1570426292905; Sun, 06 Oct 2019 22:31:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570426292; cv=none; d=google.com; s=arc-20160816; b=ZDXS8H/dNMQ9CghoHGbRecRTbzmf9wRNiSlPJFIHHSjO0ABmCtba8MnfmwQXNc+WdB ogGwoJ+B7GdFzl17VTEu4+M+SV5mGCbpT5XBJAzcTkGx/2zfTt3iToodO6ncSCBm1g3B ciqoQ6F01NOUXXZfAurZvRAW4DkyjBeGn6QLAdmSWinIr1XjkIDSRT2suw8dgXJ0ua7/ 9XbbDAyILaycwJy+jpTC65OkKkcq59LV/J1uLO4wiQrjvgvakTrnx1CETxnd8epmUgLr SQjNZXRkLJs6gi29P7awQ56hYrIWU8471AzRg0sFsMM54xuP7iO7D7D16Bg6LiS3KlLo be8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=8CXK/TfIsFpbZLDTPIgvREp06YCnBiMnqmaYjisViyY=; b=CCey26+zHfWKYihGj3oqmI/Plp3JWDttIP/iZkvbdhQG9tnW6cGhHVkKz530vPFCYK kK6/ztXD+UwPf6qIjnFK7l2pdS3j5kIc7Peu89eYDRvMqJfpiWsN35PPU3COd/81ejFn rZgpAXtPdAnRxOt9dCK7GipkFu5+BvVerwLeb8xUa5TMzsCc/XpvPYMDE5YrO0SGs5AY 6biuGvgswangIS5Pr5lfCY3ievN0+CiCYwgDNKT6jNvxxbvEzweQUnzwKkSr580DRsAV 33UCrgMkr9YCBcvOqNO78wgtpdP85QGxqzls5GXqFlqQFGcTyTOE2rgQsCFxGjC85QIw 5+2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LAR6H5Za; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 96si8052577edq.24.2019.10.06.22.31.09; Sun, 06 Oct 2019 22:31:32 -0700 (PDT) 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 header.s=google header.b=LAR6H5Za; 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 S1727176AbfJGF27 (ORCPT + 99 others); Mon, 7 Oct 2019 01:28:59 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:41172 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726960AbfJGF27 (ORCPT ); Mon, 7 Oct 2019 01:28:59 -0400 Received: by mail-pg1-f194.google.com with SMTP id t3so1642871pga.8 for ; Sun, 06 Oct 2019 22:28:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8CXK/TfIsFpbZLDTPIgvREp06YCnBiMnqmaYjisViyY=; b=LAR6H5ZasQ8iPevuWF+vXdOwHJGt5uk3xJbaFv6C3Wd9u8HmgtJ7Qg1L9LdY53wOkb VlAWraIS3WJAoWfzYnoOTrCajo64NTbKw29mvKtcijueTi461E0NhHneWYXchgRAwGPo OMLFjD8p8ob0dUXytONE0BJpczSF3nlVSXdXrh3BvIgv9AY1c+ZtfF4K81uinVuGJm9i mQEgpVY2dy5APQJBUNydRXtQtV7aEMZRBSm4hbPfzEv8nh+cXOUbiOHDsZXfpH+oefTi 0P5coqYfZJRXraFDBNiwdwdnLyo4W/A77yzEzLD85hCoSy5o8VgzOEZabEEgo/QzXanB qnEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8CXK/TfIsFpbZLDTPIgvREp06YCnBiMnqmaYjisViyY=; b=Hz5oolbYimrYMCaOrJl5C0gQNvWT7LNK8Nb4EOUtEv0N3SN9Ddf+++XP6iNtzB5k9H t5pvk4pluIY7duLRM8Qj21RYSzolVWvPesMqT9cgvCibd4XWVe//BQTkojXNBw3EB2S8 5mhx4kyk9RPsw2JNWwm9TtVWd1VNXyLZ6ZkXS0RU/iFyxMhYjVq8Duosfq5pRId79ZfF TSKXoJR8o/eXI3YsaHWZNj0kqmmtA8oAHMhzmzduzWDSDRTd/uo+woE8Dhapd/hokZ6s T+z4fDTKvWJr+z84xZf2klyG2pkR808FBQEv2tKRK0UlCkqRf8D2CZ8jrdj1ubr6g+HN XeZQ== X-Gm-Message-State: APjAAAUaMDEPN8XG6w2XzERAXgObqLcvkU9Gp/PU8Xtf052aaSKyBcBq fhyGNKgFV15IokwWlTUOFGL7cQ== X-Received: by 2002:a62:8683:: with SMTP id x125mr30083504pfd.108.1570426138723; Sun, 06 Oct 2019 22:28:58 -0700 (PDT) Received: from tuxbook-pro (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id d20sm18058167pfq.88.2019.10.06.22.28.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Oct 2019 22:28:57 -0700 (PDT) Date: Sun, 6 Oct 2019 22:28:55 -0700 From: Bjorn Andersson To: Brian Masney Cc: Georgi Djakov , robh+dt@kernel.org, agross@kernel.org, vkoul@kernel.org, evgreen@chromium.org, daidavid1@codeaurora.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v4 2/5] soc: qcom: smd-rpm: Create RPM interconnect proxy child device Message-ID: <20191007052855.GE2999@tuxbook-pro> References: <20190613151323.10850-1-georgi.djakov@linaro.org> <20190613151323.10850-3-georgi.djakov@linaro.org> <20191007020152.GA16902@onstation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191007020152.GA16902@onstation.org> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun 06 Oct 19:01 PDT 2019, Brian Masney wrote: > On Thu, Jun 13, 2019 at 06:13:20PM +0300, Georgi Djakov wrote: > > Register a platform device to handle the communication of bus bandwidth > > requests with the remote processor. The interconnect proxy device is part > > of this remote processor (RPM) hardware. Let's create a icc-smd-rpm proxy > > child device to represent the bus throughput functionality that is provided > > by the RPM. > > > > Signed-off-by: Georgi Djakov > > Reviewed-by: Brian Masney > Tested-by: Brian Masney # msm8974 > > I think this patch may have fell through the cracks since I don't see > it in linux-next. The qcs404 patches in this series were merged. > Yes, I was expecting Georgi to pick the entire series through his tree, but see now that I didn't actually ask Georgi to do so. Sorry about that. I picked the this and the dts patch last week, so if it's not in linux-next yet it should show up in the next one. Thanks, Bjorn > Brian > > > --- > > > > v4: > > - Return error if platform_device_register_data() fails > > - Remove platform_set_drvdata() on the child device. > > > > v3: > > - New patch. > > > > drivers/soc/qcom/smd-rpm.c | 17 ++++++++++++++++- > > 1 file changed, 16 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/soc/qcom/smd-rpm.c b/drivers/soc/qcom/smd-rpm.c > > index fa9dd12b5e39..34cdd638a6c1 100644 > > --- a/drivers/soc/qcom/smd-rpm.c > > +++ b/drivers/soc/qcom/smd-rpm.c > > @@ -19,12 +19,14 @@ > > /** > > * struct qcom_smd_rpm - state of the rpm device driver > > * @rpm_channel: reference to the smd channel > > + * @icc: interconnect proxy device > > * @ack: completion for acks > > * @lock: mutual exclusion around the send/complete pair > > * @ack_status: result of the rpm request > > */ > > struct qcom_smd_rpm { > > struct rpmsg_endpoint *rpm_channel; > > + struct platform_device *icc; > > struct device *dev; > > > > struct completion ack; > > @@ -193,6 +195,7 @@ static int qcom_smd_rpm_callback(struct rpmsg_device *rpdev, > > static int qcom_smd_rpm_probe(struct rpmsg_device *rpdev) > > { > > struct qcom_smd_rpm *rpm; > > + int ret; > > > > rpm = devm_kzalloc(&rpdev->dev, sizeof(*rpm), GFP_KERNEL); > > if (!rpm) > > @@ -205,11 +208,23 @@ static int qcom_smd_rpm_probe(struct rpmsg_device *rpdev) > > rpm->rpm_channel = rpdev->ept; > > dev_set_drvdata(&rpdev->dev, rpm); > > > > - return of_platform_populate(rpdev->dev.of_node, NULL, NULL, &rpdev->dev); > > + rpm->icc = platform_device_register_data(&rpdev->dev, "icc_smd_rpm", -1, > > + NULL, 0); > > + if (IS_ERR(rpm->icc)) > > + return PTR_ERR(rpm->icc); > > + > > + ret = of_platform_populate(rpdev->dev.of_node, NULL, NULL, &rpdev->dev); > > + if (ret) > > + platform_device_unregister(rpm->icc); > > + > > + return ret; > > } > > > > static void qcom_smd_rpm_remove(struct rpmsg_device *rpdev) > > { > > + struct qcom_smd_rpm *rpm = dev_get_drvdata(&rpdev->dev); > > + > > + platform_device_unregister(rpm->icc); > > of_platform_depopulate(&rpdev->dev); > > } > >