From nobody Mon Nov 25 16:44:37 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EFE84216DE1; Fri, 25 Oct 2024 21:06:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729890369; cv=none; b=HMdKQA1oZxKw3xUQfBzlGjI42ATucvQWDzXpqjLEzbdpQjjV/W0CFsrydrNx10HrIHYv1OURgJRNQ/abktq/Nq8AYytFepbBrCbioxKA77oOeraY/Ura6hls4+vIecier+r96CnaYXU5U6Cgx2s319oYPfDWPVNs8el8LMjBI1M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729890369; c=relaxed/simple; bh=yv3Bmr21rRk5eXwZrMp1GWmeP54UQKU8npZAxjm6M6k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LeSLv7SXa6tnXL4zkot9fP3I9AB+2BPzmkJGn9NLmI2R4TAtNWY5St5AC9uC3nKwQsUd64ALkP1RozUlcO5M/G1oozNUckAEhVAE3VzGZwdlumMRXC4gCFxXCpKWHDXJ/2zmv8yrbiW0hb0BcB2r5/Bwj0fwuylzmoIx0LeMnMA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=siwXzZBs; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="siwXzZBs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77994C4CEC3; Fri, 25 Oct 2024 21:06:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729890368; bh=yv3Bmr21rRk5eXwZrMp1GWmeP54UQKU8npZAxjm6M6k=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=siwXzZBspz5wDqs9RD5M93sgU+Madl9XI6od1OLT7rIGIGeAJTwA5pJ1kXvGP66kQ gFUHspHSL55CRKrRN++V6PREplLXM0yEH2DytEkIp7TBrLM9kzrdK7DcHLyFYzCrX4 XW94C+peSxBZHZfbFLul6VXJPQ9cKmTkXaZnsS2ulWG4yK1tIyuEb/o6BksERXMg69 gPBnI6zYy0gC7grWubljJ1Y+vg7ZGGPNg9uaSBekATBaVM7d5GN1HPSj5mtrhVB3hS zA6ukvOWrgknz9WPkljFbGHadmx9VVrE8+xO2C2EcCtCJgCunErB9CT0GDrbOSD8kF trypy5yS+Xe+Q== From: "Rob Herring (Arm)" Date: Fri, 25 Oct 2024 16:05:46 -0500 Subject: [PATCH RFC 1/3] of: unittest: Add a platform device node for rust platform driver sample Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241025-rust-platform-dev-v1-1-0df8dcf7c20b@kernel.org> References: <20241025-rust-platform-dev-v1-0-0df8dcf7c20b@kernel.org> In-Reply-To: <20241025-rust-platform-dev-v1-0-0df8dcf7c20b@kernel.org> To: Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Dirk Behme Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org X-Mailer: b4 0.15-dev Signed-off-by: Rob Herring (Arm) Reviewed-by: Dirk Behme --- drivers/of/unittest-data/tests-platform.dtsi | 5 +++++ samples/rust/rust_driver_platform.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/of/unittest-data/tests-platform.dtsi b/drivers/of/unit= test-data/tests-platform.dtsi index fa39611071b3..2caaf1c10ee6 100644 --- a/drivers/of/unittest-data/tests-platform.dtsi +++ b/drivers/of/unittest-data/tests-platform.dtsi @@ -33,6 +33,11 @@ dev@100 { reg =3D <0x100>; }; }; + + test-device@2 { + compatible =3D "test,rust-device"; + reg =3D <0x2>; + }; }; }; }; diff --git a/samples/rust/rust_driver_platform.rs b/samples/rust/rust_drive= r_platform.rs index 55caaaa4f216..5cf4a8f86c13 100644 --- a/samples/rust/rust_driver_platform.rs +++ b/samples/rust/rust_driver_platform.rs @@ -15,7 +15,7 @@ struct SampleDriver { MODULE_OF_TABLE, ::IdInfo, [( - of::DeviceId::new(c_str!("redhat,rust-sample-platform-driver")), + of::DeviceId::new(c_str!("test,rust-device")), Info(42) )] ); --=20 2.45.2