From patchwork Thu Apr 6 21:56:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Almeida X-Patchwork-Id: 80563 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1333038vqo; Thu, 6 Apr 2023 15:13:42 -0700 (PDT) X-Google-Smtp-Source: AKy350aMO+nc+ZtFzYFfxwcCVZs/2BhQqI1t3wginbqz+JceYYe20NvJpQ2PBlmheH3FJqMSBNRq X-Received: by 2002:a17:906:898:b0:92f:a6d3:b941 with SMTP id n24-20020a170906089800b0092fa6d3b941mr338550eje.30.1680819221773; Thu, 06 Apr 2023 15:13:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680819221; cv=none; d=google.com; s=arc-20160816; b=Y/ryjIkS274XMrA/KGFGuDjVFmrMyDH3fdGu56V2P9oto1deB9mL6/x00dTZ33nhGS O7114Kv0dzGCqUiOIR1cP371cBi8MBRRKr6T4CoJqFoC8yFu5UZUkaFAmTdrJD31JPVj nXZsWI3qYoCXB2vyGbge2mXbSrA0jj1n0KxGLtNax/JaJBKcZnZP88/PUIskP9pLejQj H6+uDqsoSlT6Daqq1H+f/pwhsghKaoqHHoiUhOr7K5KioxKvaxW0BSVYO0ywNhkDD9Ud AxJ9R+9/eBKYS7QsEsXQPP+Je8IVInGalHw0j3/DlpHLDADZGtExMaEioHa6fqPdNaTD 0R+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=n8x8eOlU9Y189l8xnAfsVcZzaCQsaJ3A8zM5gSr6hRw=; b=Ckmj2LRtU6Jn3QhnlRxvL/CENufHDOS8JF4DvRezCazJYXgVyvQepyyHjipL9gJ+k9 h9EYx0A4WF40ptq2ZeFgIkuM08sOY+8Vt2WKVOsKhbrXKklAaqy411//eLL9TdSpCeZf F5dPhaNZgal9Gp9sN9A7vX0XN8TG8h/k0L6XUct1WvfNRfgHfVmICXJnxqv5VnvA2zfG GJdv2ziBfHnM/Ucia6CqQg7JEkpsr83Kv96U0iAvrXGBTLqh9dxrY0ATXcDXA4Xzf+9f NDmM52YW82ngeRN9/TDyhuLwwQDZ0R/9TUWiQc/Es6jQ/mP7jm1Ffj7reCpDoHa8lOX3 U09Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Ik0lOVuK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr35-20020a1709073fa300b009333e2401d0si2919039ejc.48.2023.04.06.15.13.18; Thu, 06 Apr 2023 15:13:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Ik0lOVuK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237787AbjDFV5k (ORCPT + 99 others); Thu, 6 Apr 2023 17:57:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229812AbjDFV5F (ORCPT ); Thu, 6 Apr 2023 17:57:05 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8679EC166; Thu, 6 Apr 2023 14:56:31 -0700 (PDT) Received: from localhost.localdomain (unknown [IPv6:2804:14d:72b4:8284:32a8:8167:f815:2895]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dwlsalmeida) by madras.collabora.co.uk (Postfix) with ESMTPSA id 72D8666031D8; Thu, 6 Apr 2023 22:56:27 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1680818190; bh=TtJ2WnTRRkClhj1i41IWbhWF3uLZCg3n4yAehksz+EQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ik0lOVuKltSX4y1PfBu6VtFlVFA0pILRH2V1/WCWU/rLrhfJeQ6sta6PLgKugNPvX g5U1EB29IDbYe1DNPCZekG5g8PqFaBPEW0tx5sA94q8zjXezQ1Be1Z22mclr51iY81 rQFPOyedj55Iy4NibjdvwpMAdqn6sC5llmmMLgLU91J5scKfrXCsJ1c9ck34F3zD+A jAW2TmtQ3Qlt030U9zLFQSyNyRwnAqBmDcPijl9aoNeRhb7ozXc1fKti9K/GCiJKuc UNYfIRGGTIeaJaO0K2YRPRUU12D8NItP2cWXVWpuSNwMU1SrBUW08e+B8lkpOAQ4kZ 3nC5PgPdkRbmg== From: Daniel Almeida To: wedsonaf@gmail.com, ojeda@kernel.org, mchehab@kernel.org, hverkuil@xs4all.nl Cc: Daniel Almeida , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, kernel@collabora.com Subject: [PATCH 1/6] rust: media: add the media module Date: Thu, 6 Apr 2023 18:56:10 -0300 Message-Id: <20230406215615.122099-2-daniel.almeida@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230406215615.122099-1-daniel.almeida@collabora.com> References: <20230406215615.122099-1-daniel.almeida@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762466696496753204?= X-GMAIL-MSGID: =?utf-8?q?1762466696496753204?= As part of the initial rust v4l2 support, add the media module to the kernel crate. Signed-off-by: Daniel Almeida --- rust/kernel/lib.rs | 2 ++ rust/kernel/media/mod.rs | 5 +++++ rust/kernel/media/v4l2/mod.rs | 3 +++ 3 files changed, 10 insertions(+) create mode 100644 rust/kernel/media/mod.rs create mode 100644 rust/kernel/media/v4l2/mod.rs diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs index c20b37e88ab2..d7e8f3297405 100644 --- a/rust/kernel/lib.rs +++ b/rust/kernel/lib.rs @@ -48,6 +48,8 @@ pub mod types; #[doc(hidden)] pub use bindings; pub use macros; +#[cfg(CONFIG_MEDIA_SUPPORT)] +pub mod media; #[cfg(CONFIG_ARM_AMBA)] pub mod amba; diff --git a/rust/kernel/media/mod.rs b/rust/kernel/media/mod.rs new file mode 100644 index 000000000000..342e66382719 --- /dev/null +++ b/rust/kernel/media/mod.rs @@ -0,0 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0 + +//! Media subsystem + +pub mod v4l2; diff --git a/rust/kernel/media/v4l2/mod.rs b/rust/kernel/media/v4l2/mod.rs new file mode 100644 index 000000000000..068dd9b4863d --- /dev/null +++ b/rust/kernel/media/v4l2/mod.rs @@ -0,0 +1,3 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT + +//! Abstractions for include/media/v4l2-*.h