Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3733355ybp; Sun, 6 Oct 2019 19:03:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGbORj9DQjJfWpzKv3ksasw9wKdpDe8uKzwNZWrS6VmlOzTqXYdS4mxINjS4+86Y8VByQE X-Received: by 2002:a17:906:8406:: with SMTP id n6mr16114049ejx.290.1570413782818; Sun, 06 Oct 2019 19:03:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570413782; cv=none; d=google.com; s=arc-20160816; b=dFeURSUcYbayM3wTQlREQV3RW/0Ps86HCSMz4QXBRtFm/C7nSk0lmwh29Wl5Heq7yk FnJKPSnprNxers5eFru+iAwUZVKeGsths2eMRGeKlnuAIClRS2fEfEIzc7BYPDrP0r9v 0O5TsUEkDMNGpYm8n6TdYry+SQz3lqYS5FipAnaeRq1TcnmVQC9fCqryxm0Pb4jqIqhl UQjc/IAioY+fKLFaOjVBtImq5DN91DRDvwwMepVlKtz/LjAY3NNSZsLu4C92O6exnJ6i VTLNn/jrvwhR+zp6XtxdeGQO9paqfdghVoRFi8mkL6pKYl9/C9h9njKupscEBYEP8s0P otNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=UCxra7pNLreK1p4smbL1blDozmUbV2ogxh75InDolrg=; b=lr/yVx2k0ARGmBgBWx171rtuvyNgvsTnCJI6WLDVI8RJRiWRdQGMuYemCmUV1ljviH jqeJ9QXuS9Ebdp9shVfuA7SzmaHRUBk+GXnduN/GSCf7ATO4nEKwjEnEQC0UndSgWe/L 6BmJU1nev92gqIoC4ocVFEWEB2QbER/Lac3DatO6sPlzOpIBsFr8nuPebbZwAPcTEJXN VyC2zHCjfi5G5mQE0eadrCi1CzAveasf1cfetr6IYa+5VTUY9v/ExAMoyEwbroviTIwU niAo0hZURpk8dhYjoTv68lJmaYT033065anfks7mke9ehaXCuUq1To0juX8XDBIPvPa5 17dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@onstation.org header.s=default header.b=pvTNK9Yz; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i16si6799151ejo.255.2019.10.06.19.02.38; Sun, 06 Oct 2019 19:03:02 -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 (test mode) header.i=@onstation.org header.s=default header.b=pvTNK9Yz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726853AbfJGCBy (ORCPT + 99 others); Sun, 6 Oct 2019 22:01:54 -0400 Received: from onstation.org ([52.200.56.107]:33194 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726772AbfJGCBx (ORCPT ); Sun, 6 Oct 2019 22:01:53 -0400 Received: from localhost (c-98-239-145-235.hsd1.wv.comcast.net [98.239.145.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id 78E843E993; Mon, 7 Oct 2019 02:01:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=onstation.org; s=default; t=1570413712; bh=siGWMgbrgb+20s6v5IDlxItW2optKHnyECSIZMUdXig=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pvTNK9Yz7kQHuKGejnj4blW9gNA47X4z3/NOu47ocWrvNGYUaCQH1S1ESdEsIcIts QbXVe2EqqsJK+wvDoZ12k9X7ba9rHuE7p0gTW3dsidijC02JprpFBiKoM1KiVTeDGv QqWzc8pdlgKIkhaRFmj5fjWSZObYleCU7m9vnyfk= Date: Sun, 6 Oct 2019 22:01:52 -0400 From: Brian Masney To: Georgi Djakov Cc: robh+dt@kernel.org, bjorn.andersson@linaro.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: <20191007020152.GA16902@onstation.org> References: <20190613151323.10850-1-georgi.djakov@linaro.org> <20190613151323.10850-3-georgi.djakov@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190613151323.10850-3-georgi.djakov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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); > } >