From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7381C433E2 for ; Wed, 10 Jun 2020 17:00:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 92CDC204EC for ; Wed, 10 Jun 2020 17:00:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="gpiEPWI1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729244AbgFJRAQ (ORCPT ); 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.