From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 4CDF21F874C for ; Sat, 13 Dec 2025 07:06:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765609570; cv=none; b=IsxSCko9nv+M/ylmjXk8ZItPzkkKlAoOEIKi9s0/AsJZ9+9CNzJ9mDa58lYBDjK17aFCi9m2rQ2y4LnDguBw/hgLhBtNnqCSKJ6Bu0qG4fWg8JVD4PFeK6sDTbMcqK/hH/mF/hCFY4+81wXwmKz1FoS1y/JOm0Ql8y1scnsTB68= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765609570; c=relaxed/simple; bh=sE/EyXXimWQedlIS9kSYL8xotY+s2Jg5Ps+K1WvYiAs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=oDR4dgFUVFNBKyM7q8AgaCd87rkg2gtwcJfArzjYH8VU3lvJM4gkzBrAMpfHPvw2tlzOz858bNF7XPNykW1ucKL6migZvH6mAkSdz8QjggYukZLJ/ea40u/Z2MwYMq+IfVCdS+QlmB65bQ8xor5Ud1CiebyiT4FDDCXzPk6XZEc= 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=lJAxMw6U; arc=none smtp.client-ip=209.85.128.46 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="lJAxMw6U" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4779adb38d3so14947575e9.2 for ; Fri, 12 Dec 2025 23:06:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765609565; x=1766214365; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=GlggRzqJp4Lvfcs8towPJe8czeydtpdFLnsmM6SNOmw=; b=lJAxMw6USVqY+IjMYnoG+zzGP/wbTkyfihNFdhJJDVuQ2IktWT3lDdIB3otp8c2WGX wEjXD9gCGlSO1ZoKyZ+bpdrwZJD0JChXI+WP88tJ+zt2cfszyfzjovPlKyVdzCFFX6T4 fSJGX2wm3ohRo82KyA7Q/hWUNlVxeg2/jvT5hrgdcPXCe0bgGNdMrQREesJ7GXWfh7Q3 W8cXPX7nYJpEc4E0H0WCAcFUcmGiP5szNVcvfW/N16zxlv1OhMiV0yeRKt65nY8m+a/m zoaF296AqASVxAESmMEnA21XsE2HfkNX9OKSJHoOvkZUlk46/knm/RrAkGgQDXNXbX/l UN6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765609565; x=1766214365; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GlggRzqJp4Lvfcs8towPJe8czeydtpdFLnsmM6SNOmw=; b=IUNHXWd06CP410+8bSrpXZGfoNLATdyf4pOUHlw2XUl2MvplriJvjnq9g2bfixp+Yr wftnSe2FpGLmAeuROynY+UVlLH9QASKpEioS6Tu8qcKPKhZgRRtpBiF+uVeufP/WexRA NS+Y8Ab7ed4vyel9946/TSh/Ht+TxYlLCtByUem6yLTxMGb1BgHDHCZ4RTX4ScZqLM/J QIjz5Lh8t0QuGD/sthMvboX1XKebyPetvPANpqjulTesODxbIeD3ywPNzvI5QgYZS+o6 pq4mvjbolTf7PXpUD/RbK/5tUbdm3PLPHBFRx4EgIydRXkWjuMwaEa+2l8u0Px3McFac Oazg== X-Gm-Message-State: AOJu0YyKh2/5zfY6jSIAHtuLeuPeqf8Od64KMImIH6btD26JlYAKcWgo 412eyKukjk0iVhc0uHmnhfXkkXBPdQeWBQGD8IPgGAA543ADfzWBordp X-Gm-Gg: AY/fxX5Hq6CCsQBIHvK32rwFe6nzO48zr8zgCWxRSn/gmDMmHAZ5LZFLx0x+LD9X1IA KoXQW35CON7Bkc/Uzl9tSGpPpn2U+f4wJB7X34AGZihB9k0GS4gCJ311s0CMVaVjlynzhEzC5QL T0ntAvvQ5DExpeFo/aIFBtyOMtREZLiPCTgEf0vMGM2y89noJ4hyM3xG9ssXF4imatYQ/HDGXlr P/ms+mq7YHwVsFel7Ptt+b1GZKopvnyK2XhBRDrGsll6np8FwYlL+bg+gwmoKJHFgSEbYMMFeOZ lhPZYffB0XgK4HsR/Z0HE4vRH0MXjEiWu/MaWBW2eRrfczHAeLFh7RMNz7XVY0hMxPaeDwQooJR UzsQXhaTtdWk+aMGrDOc/9a+/qY7IKXQHScRT5QH5cbvtgC2PFZKkhqi5QEUU08V+vpXPLZV0O6 lHuQrrmntNcyVZpbcevOkjlM+tmXtxXGCOsoCAGx98/ZFucUgzKhr0LquOU614KFln4nDNDG6hY pXgYgLGFSrdsYAab1xZcF4yFlXFRg4AwVDKuwNhHBjOTQ== X-Google-Smtp-Source: AGHT+IGudL1cl5s1SKkweCc09Z0Zj+UmvZhwk9yOyEqnOsuqKxzAGFrRKdViXGhXL+k4+dk0lFVX7A== X-Received: by 2002:a05:600c:190c:b0:479:33be:b23e with SMTP id 5b1f17b1804b1-47a8f907d4cmr50452015e9.17.1765609565386; Fri, 12 Dec 2025 23:06:05 -0800 (PST) Received: from ?IPV6:2003:df:bf2d:e300:c706:d28b:5de4:d353? (p200300dfbf2de300c706d28b5de4d353.dip0.t-ipconnect.de. [2003:df:bf2d:e300:c706:d28b:5de4:d353]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42fa8a66614sm15996305f8f.5.2025.12.12.23.06.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Dec 2025 23:06:04 -0800 (PST) Message-ID: <0ed88191-a40e-406f-bd75-4992fdbe2fdd@gmail.com> Date: Sat, 13 Dec 2025 08:06:03 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] rust: Add SoC Driver Sample To: Matthew Maurer , Miguel Ojeda , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Greg Kroah-Hartman , "Rafael J. Wysocki" Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org References: <20251212-soc-bindings-v1-0-db51044ce805@google.com> <20251212-soc-bindings-v1-2-db51044ce805@google.com> Content-Language: de-AT-frami From: Dirk Behme In-Reply-To: <20251212-soc-bindings-v1-2-db51044ce805@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 13.12.25 00:14, Matthew Maurer wrote: > Shows registration of a SoC device upon receipt of a probe. > > Signed-off-by: Matthew Maurer > --- > MAINTAINERS | 1 + > samples/rust/Kconfig | 11 +++++++ > samples/rust/Makefile | 1 + > samples/rust/rust_soc.rs | 74 ++++++++++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 87 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 4ff01fb0f1bda27002094113c0bf9d074d28fdb6..bb2e710277cc84dd6042d4d46076e665d9f68752 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -7705,6 +7705,7 @@ F: samples/rust/rust_debugfs.rs > F: samples/rust/rust_debugfs_scoped.rs > F: samples/rust/rust_driver_platform.rs > F: samples/rust/rust_driver_faux.rs > +F: samples/rust/rust_soc.rs > > DRIVERS FOR OMAP ADAPTIVE VOLTAGE SCALING (AVS) > M: Nishanth Menon > diff --git a/samples/rust/Kconfig b/samples/rust/Kconfig > index 3efa51bfc8efccd91d9ee079ccd078ed1a6e8aa7..c49ab910634596aea4a1a73dac87585e084f420a 100644 > --- a/samples/rust/Kconfig > +++ b/samples/rust/Kconfig > @@ -161,6 +161,17 @@ config SAMPLE_RUST_DRIVER_AUXILIARY > > If unsure, say N. > > +config SAMPLE_RUST_SOC > + tristate "SoC Driver" > + select SOC_BUS > + help > + This option builds the Rust SoC driver sample. > + > + To compile this as a module, choose M here: > + the module will be called rust_soc. > + > + If unsure, say N. > + > config SAMPLE_RUST_HOSTPROGS > bool "Host programs" > help > diff --git a/samples/rust/Makefile b/samples/rust/Makefile > index f65885d1d62bf406b0db13121ef3e5b09829cfbc..6c0aaa58ccccfd12ef019f68ca784f6d977bc668 100644 > --- a/samples/rust/Makefile > +++ b/samples/rust/Makefile > @@ -15,6 +15,7 @@ obj-$(CONFIG_SAMPLE_RUST_DRIVER_USB) += rust_driver_usb.o > obj-$(CONFIG_SAMPLE_RUST_DRIVER_FAUX) += rust_driver_faux.o > obj-$(CONFIG_SAMPLE_RUST_DRIVER_AUXILIARY) += rust_driver_auxiliary.o > obj-$(CONFIG_SAMPLE_RUST_CONFIGFS) += rust_configfs.o > +obj-$(CONFIG_SAMPLE_RUST_SOC) += rust_soc.o > > rust_print-y := rust_print_main.o rust_print_events.o > > diff --git a/samples/rust/rust_soc.rs b/samples/rust/rust_soc.rs > new file mode 100644 > index 0000000000000000000000000000000000000000..ca0294819f100fa7b713c6b41c5b8a9b3906b863 > --- /dev/null > +++ b/samples/rust/rust_soc.rs > @@ -0,0 +1,74 @@ > +// SPDX-License-Identifier: GPL-2.0 > + > +//! Rust SoC Platform driver sample. > + > +use kernel::{ > + acpi, c_str, device::Core, of, platform, prelude::*, soc, str::CString, sync::aref::ARef, > +}; Should this be formatted according to https://docs.kernel.org/rust/coding-guidelines.html#imports as well? Thanks Dirk