Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp726293ybg; Wed, 10 Jun 2020 12:02:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxG8qxnuo/d5GLMli1W5A4abemCttbC9wabkCqV4HB/nGQlqbEQVn7yvCzTjJjnRsNwhsxU X-Received: by 2002:a17:907:94c4:: with SMTP id dn4mr4657190ejc.150.1591815731501; Wed, 10 Jun 2020 12:02:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591815731; cv=none; d=google.com; s=arc-20160816; b=dTuX6ckLRDyfstnt+4q45ls310b35BGF+5upustPe8RtZWVhdfUIZl+Vw2SLT5QAlt Vyy6W7DkMAacFu33xgkf9m1txxdUuYlWeiwsUtod3yLfKuHImpJeqks4oaWefav2fJyL EIeBP7ABzSN8ROzsSGDy3R55Nx7g8uY9Fa0S4G40/Ygj+l9G3rXsvM060kUVOeYvDPWg GOaEmALvt/ZI+4ElpTmFTmgHFQyOEgjeAx7h+keJMFSSX8sNKa70U/zgY9FHaXAQ3mKV 5kDoACd5sCVDZgp5hxvgGOdpniwK3iZ8zJXKBhF1Jf25iv6qRupayZWmJ5qvm8LNqcjk z0Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Imz6doYV660y+cWZb3k3Hst0ZTywDfXDU/B2fakCmbE=; b=o1pOST3DVnM0fxc6b4JN2ZdcsacWdjHD5eGeDo++CUambaT3+Qg7fGldMmi6l61Ve3 UxEVJQur28oObpI1YeWGk2r0QhQ/J6VoOmN3qRljbpwNinfxS/C3KFd4brqd+dzrmxYM 89hdtrvuDD3D1c4gh+qm7hGOc+zDO1bCEskNsgJsHhIetkSNExVTIcxeqWVE+VirzRY/ YY3E0h61mq8wPAb0bZ53GSWYOvyRUPzqAWIWkG07ZkDY47rdy1mnIpOq+zhdV6KQB5V5 Dt6bc/5lYAwMFVk3vOFJDGywo2TGoAztslBNDDefTLptcUGy7PKM7j7BX2dNaqAMCA1s MtsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=gpiEPWI1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u20si289296edb.355.2020.06.10.12.01.37; Wed, 10 Jun 2020 12:02:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=gpiEPWI1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729241AbgFJRAQ (ORCPT + 99 others); Wed, 10 Jun 2020 13:00:16 -0400 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:18488 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726560AbgFJRAQ (ORCPT ); Wed, 10 Jun 2020 13:00:16 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 10 Jun 2020 10:00:02 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 10 Jun 2020 10:00:15 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 10 Jun 2020 10:00:15 -0700 Received: from [10.2.167.70] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 10 Jun 2020 17:00:14 +0000 Subject: Re: [RFC PATCH v1 13/18] gpu: host1x: mipi: Add of_tegra_mipi_request() API To: Dmitry Osipenko , , , , , , , CC: , , , , , , References: <1591768960-31648-1-git-send-email-skomatineni@nvidia.com> <1591768960-31648-14-git-send-email-skomatineni@nvidia.com> From: Sowjanya Komatineni Message-ID: Date: Wed, 10 Jun 2020 10:00:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1591808402; bh=Imz6doYV660y+cWZb3k3Hst0ZTywDfXDU/B2fakCmbE=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Transfer-Encoding: Content-Language; b=gpiEPWI11tmwvkC1z4UqgSJgJALbX1UO7Icf7RcURBPTCfOGmtBoegR9TiB6A1cUT BpcIZVnuYZ8a3S7SmDrChcksWlyjGqzfvDZXMnS4WELWyhq4yG4FrjJiTJg4mCMbE4 b5nHI9snhjEaBq5DJ4CX83uT0iZQ4MuZPOnaSNRtaGJOfIiNlekdxcM+RvTG37CUIc J8dUr9wKHRpV+wILC4lL55qvEvo5oDQp4e7JMbnxy77Z6tpPLlbYVCfOGRdESHEXKQ LVhoCkttS4pwxekjsd92ZwpPPl4whkJTICqFAMoQrXnxd0KcJIUCX7LSF37gShZQsT 1pYidMutj/pzQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/10/20 6:33 AM, Dmitry Osipenko wrote: > 10.06.2020 09:02, Sowjanya Komatineni =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >> This patch adds an API of_tegra_mipi_request() to allow creating >> mipi device for specific device node rather than a device so Tegra >> CSI driver can use it for calibrating MIPI pads for each stream >> independently. >> >> Signed-off-by: Sowjanya Komatineni >> --- >> drivers/gpu/host1x/mipi.c | 10 ++++++++-- >> include/linux/host1x.h | 2 ++ >> 2 files changed, 10 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/gpu/host1x/mipi.c b/drivers/gpu/host1x/mipi.c >> index e00809d..f51fe69 100644 >> --- a/drivers/gpu/host1x/mipi.c >> +++ b/drivers/gpu/host1x/mipi.c >> @@ -206,9 +206,9 @@ static int tegra_mipi_power_down(struct tegra_mipi *= mipi) >> return 0; >> } >> =20 >> -struct tegra_mipi_device *tegra_mipi_request(struct device *device) >> +struct tegra_mipi_device *of_tegra_mipi_request(struct device *device, >> + struct device_node *np) >> { >> - struct device_node *np =3D device->of_node; >> struct tegra_mipi_device *dev; >> struct of_phandle_args args; >> int err; >> @@ -252,6 +252,12 @@ struct tegra_mipi_device *tegra_mipi_request(struct= device *device) >> of_node_put(args.np); >> return ERR_PTR(err); >> } >> +EXPORT_SYMBOL(of_tegra_mipi_request); >> + >> +struct tegra_mipi_device *tegra_mipi_request(struct device *device) >> +{ >> + return of_tegra_mipi_request(device, device->of_node); >> +} >> EXPORT_SYMBOL(tegra_mipi_request); >> =20 >> void tegra_mipi_free(struct tegra_mipi_device *device) >> diff --git a/include/linux/host1x.h b/include/linux/host1x.h >> index c230b4e..a61ca52 100644 >> --- a/include/linux/host1x.h >> +++ b/include/linux/host1x.h >> @@ -325,6 +325,8 @@ int host1x_client_resume(struct host1x_client *clien= t); >> =20 >> struct tegra_mipi_device; >> =20 >> +struct tegra_mipi_device *of_tegra_mipi_request(struct device *device, >> + struct device_node *np); > Looks like adding a new function here is a bit of overkill. What about > to change tegra_mipi_request() to take the node argument? thought to avoid changes to existing usage of that function in other=20 drivers. Will update in v2.