From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECC4B2F5A1A for ; Wed, 8 Oct 2025 07:31:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759908693; cv=none; b=G+P3IPNjsCjiS1rUsIaBmH9KX0NMkePzP7nKNLegaiJc9Ug3Y5jSUS2vrhmWo6gVUW0uPHbUM6NLv9QlCjlEXTTb70W0aBwZHCqk5QyOkEkeFIM4lKqV0eDVNbHSbYG/xQL1xZ4K+4h0FnBuL625xuqN+MpdN496hwyaUbtLTYQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759908693; c=relaxed/simple; bh=EkGBXhItwLWxgQ/aIBX1I+SuRG7//x8trI9XTwjIFpA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d3S6bff78SJPdNrXcDfNB92ls6oX0COD0Rf56C47d7nItDhU7rGggQLqJJntYPaMkgIQGHJAT4OFz7RU/0fPVRnOPLGVSsP5XelbdaidAeRPASbwWw9d7ySboX7sUwUrV4jaaryhVDUajNw9GnDZW9/nEV/jWefY4V4oUTyXtE8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YXuEKwYT; arc=none smtp.client-ip=209.85.167.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YXuEKwYT" Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-57a960fe78fso8035539e87.2 for ; Wed, 08 Oct 2025 00:31:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759908689; x=1760513489; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PboKxjSSvW6h8IWsKUFqt3oWZleCNVGyc+XkVJL1pxE=; b=YXuEKwYTbVzzkwo12hN63x+Ha6PFjTVrU25TB1zHtsKkg7rVDVeUf0NOGdgLPMkaqd YrwyObPA9KfdAJM0AW9sN2mhMjnTGG86m1TIe/UFC6lBL20ftKBsN4Hbk9iT99fsy6/p diEp+RNcfS0z/KTHSeKUhLSWQD3az+RdfMWB2tJ3QEHj2gxA8DyspjDOkzMUEAyAHd4E w/k34cx7SmlTLH/Q0gMNC08P9LpWx67PQy5oyS1JeY4Acq0tCOZt0TGY9r2wymZ/CZh3 pKXgrud6y555vky0c8jafKPWStn3HF7Gh9/Phi/EejQK/1xaShJRoQqAhrn8d14q9U4x cZ6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759908689; x=1760513489; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PboKxjSSvW6h8IWsKUFqt3oWZleCNVGyc+XkVJL1pxE=; b=vqEbo/MLysJdW9xztBsBOXKiCxh4f59aZR3VqnjnX3MNihcvu+zwo5/+cdcvUdgzcl WP1Hbo1XEgY3+dMgOHW6qI4h5Ay3iaTLbJ4AIO3fUPhXf1sUPGudvhtALDjEwQnilNUn AQ4yfo7mPf+ok5ne/3II7uPwQOlgSx2VIhgott/vrmXi6BTP0uXNuxuSJmEQZZ8rs+xs 8kA9gEJhGK7XZeuAS85XKccnNaa1OaYSudZ6tXDh1Yeq230iT3iSiR7MesGaE4WNdrMR pFXhGk3QtoamUvRZXMDVB4wIPvV6j9Gq0hQuqLRaSlGyzlg5jzwo//CBifOErnUzrYCN 5J+A== X-Forwarded-Encrypted: i=1; AJvYcCVy90/msxJf+inNqrCLoOnlHywpPFbtI+uklNdhrYlQP+rk46r1R8bAIbY8X2LOYy99GVt5mzhK0ZM=@vger.kernel.org X-Gm-Message-State: AOJu0YzQ4w1UMO8OERH7nKvoxIkuAiUEy6PpJTQh0tyiOaqNr5KNsF+q 2qfcfp5tVQhTTaO+iqWh+oo1NsqsjWoQuDq2AR8rfXcEHy1P+7zaKe+G X-Gm-Gg: ASbGncuSS+gvHaipWKjUXo8nfzAIRzOdmsgbsJ4VOsfY0z6CFRbDH4H6TqpKfmMmJEs KjQxfpQF/55JjptCncuFZuZEgEZbkCmmCRUBo77WVGLUVV5Dx6pVd5CcRg4Iszyqhi6d5ljXQ5t jMFAMtcQGF2pJaWNeTgycMPH2ksole2n1njI28QC8Ve17AV1rQOJGsxVDSenGTi+Fj5tJYig3ZF z7W1F9foXU4UWgrxfOlMA4ICha1CDMxD5Sntylg9DA+jdesHPLdFmduCrcETVCJcnwiK3Aw0K6W LKFvYovLFWEUBroIET/MLTSqD6cQIXOl1tMdkuts44GC52XSWa+vfAJ11x7gxEFHgc3foACMXVn 4V0fFvpNK78BYUy7LPF14zivWUD+LC4OmjTe4pQ== X-Google-Smtp-Source: AGHT+IGnZcqKqG0CeOtJ+fmzvG5biXeb/ChpdaHmR1TP85hnqOnS5yRC3IE90h8eaQFZIrYCt7o/qw== X-Received: by 2002:a05:6512:b96:b0:579:fbe5:449d with SMTP id 2adb3069b0e04-5906dc14a3dmr717226e87.24.1759908688715; Wed, 08 Oct 2025 00:31:28 -0700 (PDT) Received: from xeon.. ([188.163.112.70]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-58b0118d22bsm6911016e87.85.2025.10.08.00.31.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Oct 2025 00:31:28 -0700 (PDT) From: Svyatoslav Ryhel To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Luca Ceresoli , Prashant Gaikwad , Michael Turquette , Stephen Boyd , Mikko Perttunen , Linus Walleij , Mauro Carvalho Chehab , Greg Kroah-Hartman , Svyatoslav Ryhel , =?UTF-8?q?Jonas=20Schw=C3=B6bel?= , Dmitry Osipenko , Charan Pedumuru , Diogo Ivo , Aaron Kling , Arnd Bergmann Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v4 09/24] staging: media: tegra-video: csi: move CSI helpers to header Date: Wed, 8 Oct 2025 10:30:31 +0300 Message-ID: <20251008073046.23231-10-clamor95@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20251008073046.23231-1-clamor95@gmail.com> References: <20251008073046.23231-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Move CSI helpers into the header for easier access from SoC-specific video driver parts. Signed-off-by: Svyatoslav Ryhel --- drivers/staging/media/tegra-video/csi.c | 11 ----------- drivers/staging/media/tegra-video/csi.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/staging/media/tegra-video/csi.c b/drivers/staging/media/tegra-video/csi.c index 604185c00a1a..74c92db1032f 100644 --- a/drivers/staging/media/tegra-video/csi.c +++ b/drivers/staging/media/tegra-video/csi.c @@ -20,17 +20,6 @@ #define MHZ 1000000 -static inline struct tegra_csi * -host1x_client_to_csi(struct host1x_client *client) -{ - return container_of(client, struct tegra_csi, client); -} - -static inline struct tegra_csi_channel *to_csi_chan(struct v4l2_subdev *subdev) -{ - return container_of(subdev, struct tegra_csi_channel, subdev); -} - /* * CSI is a separate subdevice which has 6 source pads to generate * test pattern. CSI subdevice pad ops are used only for TPG and diff --git a/drivers/staging/media/tegra-video/csi.h b/drivers/staging/media/tegra-video/csi.h index 3e6e5ee1bb1e..3ed2dbc73ce9 100644 --- a/drivers/staging/media/tegra-video/csi.h +++ b/drivers/staging/media/tegra-video/csi.h @@ -151,6 +151,16 @@ struct tegra_csi { struct list_head csi_chans; }; +static inline struct tegra_csi *host1x_client_to_csi(struct host1x_client *client) +{ + return container_of(client, struct tegra_csi, client); +} + +static inline struct tegra_csi_channel *to_csi_chan(struct v4l2_subdev *subdev) +{ + return container_of(subdev, struct tegra_csi_channel, subdev); +} + void tegra_csi_error_recover(struct v4l2_subdev *subdev); void tegra_csi_calc_settle_time(struct tegra_csi_channel *csi_chan, u8 csi_port_num, -- 2.48.1