Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp155790ybh; Tue, 14 Jul 2020 21:22:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/ObYsKqeDQPQcTPl6nRMIaP4w6Dc/6FEZtmhT/Zx7cRpmE00s6fPIcaPjRYTKhUQFXFPr X-Received: by 2002:aa7:c98d:: with SMTP id c13mr7561841edt.188.1594786932548; Tue, 14 Jul 2020 21:22:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594786932; cv=none; d=google.com; s=arc-20160816; b=q/mCHw8oGhFgyybhWuips4a/QG69bPD+neiCeZ2IiIlLEQwGfCS5NnRM3dl7LUpFsS k/1kXtzQGP5FDZOKq1Audg93xZNx+Yp51xKqL5d5pVr7uAAa2NWKVm+r6QSYeFlkIp4g SuFj2hCpT2MHqB8dnYbAERy1GkhvZDLdQv/ZdmiQMCf37VPA9FR/Va4Y5+Urpi2J5/cQ gJPGNiyIe2M1QzrYzy3LaOXJS6bl++smL+5jE73CwXRkF9jCdrC2Yz/o1VKwdUJb8kQr VrKSXikcwYuuuQkal+DmJtilmzVquxlUeQd0UUfjWEBk+TLCu39CaW6XNic5UAWgA+pY R8oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=DBvHcZ7/o4zFdY0BE62wZHO/OZDDaWxvCBsDSvvgBwM=; b=WUCJuEQY3lQVwBW44cIIckoLfi4QbEoHZ0x9FPjDe85Z7nDUSt6RnSl3PqiSKxAxC0 kBJlP+E/jZGAZp15v5eVC9L9AAnjLE1fAVTcZ4jcd343lYW9XWwApShZvcCkgJYLrtKb rcHGY9phwTPPyLU1WnHQM4QZePu+6oTQrwIAdZdSrS3rnBtima5y8PnVLTX3jD6icMyG WGJQf7XEXzQG0XzfvuptxsXtzHY+yaU6r7Gdzj8eOa6jJUb0E4szSkIJZxjhD4cJwVsn /AmviWeV+hV47xSSk9ZCAlgNjYSBt28+Olo6UNeRf+5g1dk9enMHoAxx2FBWpTADsqvC nFyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=lsT829Tn; 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 do22si691539ejc.79.2020.07.14.21.21.50; Tue, 14 Jul 2020 21:22:12 -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=lsT829Tn; 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 S1728625AbgGOETp (ORCPT + 99 others); Wed, 15 Jul 2020 00:19:45 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:11997 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728421AbgGOETi (ORCPT ); Wed, 15 Jul 2020 00:19:38 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 14 Jul 2020 21:18:40 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 14 Jul 2020 21:19:38 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 14 Jul 2020 21:19:38 -0700 Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 15 Jul 2020 04:19:37 +0000 Received: from rnnvemgw01.nvidia.com (10.128.109.123) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 15 Jul 2020 04:19:37 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.2.160.169]) by rnnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Tue, 14 Jul 2020 21:19:37 -0700 From: Sowjanya Komatineni To: , , , , , , , CC: , , , , , , , Subject: [RFC PATCH v3 14/18] gpu: host1x: mipi: Update tegra_mipi_request() to be node based Date: Tue, 14 Jul 2020 21:20:51 -0700 Message-ID: <1594786855-26506-15-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1594786855-26506-1-git-send-email-skomatineni@nvidia.com> References: <1594786855-26506-1-git-send-email-skomatineni@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1594786720; bh=DBvHcZ7/o4zFdY0BE62wZHO/OZDDaWxvCBsDSvvgBwM=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=lsT829TnseJglcetzgZABqP7FV3TJXEV+S75w/z3n1mV+bQdwx759HX11ivkcWNTZ 62WaaxRbpX3yOqjgTxDY0ADlcldBsdCHGK+PMiAV7p7pdb3wbqJHoG6f9bnp91dU31 jfwIIC+bpnMwIjUBj+QULK4wSGWoPnco7cwjS6OeUZj7HuY8+/WZBATNmwVoxnbIqq ZclP2XUpx8KlAj9FTKNffvTvSq8yeKHnxJo5m9NL32eqX1k4XIeqyTm0SZtN7d6hTY 2tAkdShL4D3xvUoE11Fn3PCCfeOfnEyvFM6j38nAKF36eFf4WQ3g9jM7GH4C6RMtIS tgnS6m1Sx1/7w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tegra CSI driver need a separate MIPI device for each channel as calibration of corresponding MIPI pads for each channel should happen independently. So, this patch updates tegra_mipi_request() API to add a device_node pointer argument to allow creating mipi device for specific device node rather than a device. Signed-off-by: Sowjanya Komatineni --- drivers/gpu/drm/tegra/dsi.c | 2 +- drivers/gpu/host1x/mipi.c | 4 ++-- include/linux/host1x.h | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c index 38beab9..3c09e29 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c @@ -1618,7 +1618,7 @@ static int tegra_dsi_probe(struct platform_device *pdev) if (IS_ERR(dsi->regs)) return PTR_ERR(dsi->regs); - dsi->mipi = tegra_mipi_request(&pdev->dev); + dsi->mipi = tegra_mipi_request(&pdev->dev, pdev->dev.of_node); if (IS_ERR(dsi->mipi)) return PTR_ERR(dsi->mipi); diff --git a/drivers/gpu/host1x/mipi.c b/drivers/gpu/host1x/mipi.c index e00809d..762d349 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; } -struct tegra_mipi_device *tegra_mipi_request(struct device *device) +struct tegra_mipi_device *tegra_mipi_request(struct device *device, + struct device_node *np) { - struct device_node *np = device->of_node; struct tegra_mipi_device *dev; struct of_phandle_args args; int err; diff --git a/include/linux/host1x.h b/include/linux/host1x.h index a3a568b..9e67841 100644 --- a/include/linux/host1x.h +++ b/include/linux/host1x.h @@ -328,7 +328,8 @@ int host1x_client_resume(struct host1x_client *client); struct tegra_mipi_device; -struct tegra_mipi_device *tegra_mipi_request(struct device *device); +struct tegra_mipi_device *tegra_mipi_request(struct device *device, + struct device_node *np); void tegra_mipi_free(struct tegra_mipi_device *device); int tegra_mipi_enable(struct tegra_mipi_device *device); int tegra_mipi_disable(struct tegra_mipi_device *device); -- 2.7.4