Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp252122ybg; Tue, 9 Jun 2020 23:06:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyowSCMOSR7+k5YV0d7bmuleKByopb24mhItqdd5mc2goUWmvyrKLR83cSUZ2dVsCmrYUQr X-Received: by 2002:aa7:cdc6:: with SMTP id h6mr1055091edw.191.1591769219159; Tue, 09 Jun 2020 23:06:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591769219; cv=none; d=google.com; s=arc-20160816; b=eFT8MasOi3w/6qcPeR4hh3lGtkd/j5oUTu/aDWaB7EabaV64cKu0EwTMAUMKtvXtNW 0ihYrnzgQNB3uRJf5bA42W9MD7YAFLWYONVsYheQ4IfIVKtJIP5BQPJlzAKtxAvg4Fhf LVMbcuvbgvfrWT1moJ5/lfPXbhcqiro48S6oO1TWgapqFmfN5+PqVIrQ/GKajWueliw8 QtmSy9m/UyfqYCdAUtAiOBKNrv3a4sjlgNdvWMd/i1IdwCBMjPX0wtvrq6ekSVkLdcqo HH8gmEwwut4ZyOBaz6cUcNlNmv4/3sj46bUlZYArj5gLKy5EFlKGICejQjIzQwc/x/Oo nP8g== 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=qd5ZedoXJM6zCreLe65FRGR8l6so02mvB+u6w942LLM=; b=JTh19hOaVddz0I284+IlbblLr8Rf+QWBhnintzK1nRA8ZBWPAvBzU5nxw/10feYCyp njLQYtQfQ7w32SsieeMaOICGhWpUsfa9FkhwFTlF6+85DHosA7KOCtC0x+gBBPC2i3+d IDvbKYylz/T7U1CkaxMrH4yHH7VGFh5rnkHmSmI2rEEZ9cwZNkT4RDx4dwVB566Q/Sr9 jkn3P7iZBiv/n5UUkZC559XNfBHaY0U0YaQzBLZQK7fItZJ8fFoPIwGrmc8kME+24zD+ EIty4lJ12Lcu5sZ9hpr06Vvv4SPUBxFaoayr3XMrGvsu2b6p96zxptTBIXwbeLJDJMWZ jhDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=dnismLbI; 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 z7si11863066edp.584.2020.06.09.23.06.36; Tue, 09 Jun 2020 23:06:59 -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=dnismLbI; 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 S1726510AbgFJGEH (ORCPT + 99 others); Wed, 10 Jun 2020 02:04:07 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:6104 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726275AbgFJGCw (ORCPT ); Wed, 10 Jun 2020 02:02:52 -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, 09 Jun 2020 23:02:06 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 09 Jun 2020 23:02:51 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 09 Jun 2020 23:02:51 -0700 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 10 Jun 2020 06:02:51 +0000 Received: from hqnvemgw03.nvidia.com (10.124.88.68) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 10 Jun 2020 06:02:51 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.2.167.70]) by hqnvemgw03.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Tue, 09 Jun 2020 23:02:51 -0700 From: Sowjanya Komatineni To: , , , , , , , CC: , , , , , , , Subject: [RFC PATCH v1 13/18] gpu: host1x: mipi: Add of_tegra_mipi_request() API Date: Tue, 9 Jun 2020 23:02:35 -0700 Message-ID: <1591768960-31648-14-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591768960-31648-1-git-send-email-skomatineni@nvidia.com> References: <1591768960-31648-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=1591768926; bh=qd5ZedoXJM6zCreLe65FRGR8l6so02mvB+u6w942LLM=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=dnismLbIeUjyT/UE4bEjAB6TfGtTrBB8Vd7yNwEQYVo4azSGukxYMHJerqsxMlA45 wLLKLVb7s9hVuGVcuR37tglygJjIgevZuVKmIvDIQzSPAMWUnHzb+EDXbcOHZtUzVp AQPIcltO0DLfdixvfbUfU2JpDafnGEmR6T5E+sJ1ypp+TuCom/CSDcHOpNn7IfYKck trR3iP1w6j+pxgb02f0lflSjHYPPq02bAJec/bVoEFcAoYF2KFUnA2MDsEU4KBtG5y pI31gIyEo8xJ+LIPVGjLlhTjXzya3o/7jvrbzBKemnDAa/kA5ZpXLAEM5k4FCS0RRI G5MmQEk+yrUzQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } -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 = 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); 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 *client); struct tegra_mipi_device; +struct tegra_mipi_device *of_tegra_mipi_request(struct device *device, + struct device_node *np); struct tegra_mipi_device *tegra_mipi_request(struct device *device); void tegra_mipi_free(struct tegra_mipi_device *device); int tegra_mipi_enable(struct tegra_mipi_device *device); -- 2.7.4