From nobody Sun Feb 8 22:06:28 2026 Received: from mail-dy1-f202.google.com (mail-dy1-f202.google.com [74.125.82.202]) (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 E05753BFE42 for ; Tue, 3 Feb 2026 15:46:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770133605; cv=none; b=Py0InDxs/3sjhFxZft8PS21Z2Xm2TfN3psYW1Pk/q8IR4OTd/tHl9Hx8aGnXhSCXnWUjhM9LYxub7RCF1nHBgi2Xw56KwUG4uUc7Fa7iA4hVivx6HRZRQRGd5/bGfVCwIpWG8XJCDQXKQp2zYgXT6B2I54CVh7qOFJjVCedB0No= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770133605; c=relaxed/simple; bh=sLbxFTX2mTYV2vSHOwak0YCZYcQva6hVw82FQCeYKlk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=oSGgwmzn+TAquK8jG100JWyF7yXXaf6+bUamVmP8NZo4BJYJtMOJF8BO+h7h0v1UAbLAnj0WezqcBsyeNOkj7jSjFXlEEYIf5VRHicaeKh4gfJxNPu5ethdNPBAaAEx8htCEE3N+pUJeYTuWi5NUY5l5HW1F2NLIf8AxG8JATJ8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--mmaurer.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=o47zouml; arc=none smtp.client-ip=74.125.82.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--mmaurer.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="o47zouml" Received: by mail-dy1-f202.google.com with SMTP id 5a478bee46e88-2b795cff830so18085154eec.1 for ; Tue, 03 Feb 2026 07:46:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1770133602; x=1770738402; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=yriD2nT/Os7MHztKIgeqU92FBaPsLQ1akZyLJCP9KTY=; b=o47zoumlJdrRlPy6ZNnwUnLc/OELYrP8hjk4+NsdIelT0dGOyfVWUtWoByfnCo+ubt U6Nvufmiict84IsqfV/SmComuIvgXZu/ywEpnNzbL8RyThvn3LgaK5sgfV3cVSyl/B6k jbPXn/q8cMFIC+8bQMQ6AWijqDRKi6bIekaJxx1JzexituXxJ+lISMQDNKPFhwPuA9UY cnwKY5ZtsQCukha4vODVvtUiYDsCSJBmK0Iz/eyPOkBjsHEec96kfOT3rLMfhUTk3+M7 3V0zMVa28w+kNPLgRBpS3oPHUbyUrAqKK/IUAPN6zhino3tzd6q3famHirNjIWgDKxnz CIXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770133602; x=1770738402; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yriD2nT/Os7MHztKIgeqU92FBaPsLQ1akZyLJCP9KTY=; b=u9R11rqlMBVElCqWvrlom+H0D+WNniHrN0najguAmZPbAl2ZhtEtDuWNlqTs6LmJOg cPb3J/YLey5v3BuU22coPWT7Qc6PiNAITOI78ALpDdZXCGBh5cgSEuSTotUO+ELRGOOs jrey5hX0uMW61r7SpVqVh3EPyMBmWWpD1xMWVzxveAY/xN5Yw9pTyoXTFx/FdigKHmrc yKn8BRGL+457qWH+hOzG8e9dRqEvIaMdvY1aFc3gML4ZzFK+SnS3C74wPDJUVG4BGvES 96nqrBOWkyLd/8xvO0uJb66uGJNWeEb2P4HVjwIHYYy0gW/BF86fEm8PQkbuWdrPF9ev 3Mzg== X-Forwarded-Encrypted: i=1; AJvYcCVwqiomZcEIWqI6DWhiu/bhVwazKfwI/NUF2SyW02U44p/WyMBVO/SQlBYwkCuIRTg7T0lajsg2vJD48r0=@vger.kernel.org X-Gm-Message-State: AOJu0YwiM2RVzpS+GtrlFibWjLzept1/j9dCc5oToa3d2weDGkODFr9x mU8Tt36Lcpzy1KJ26kyT67jwqeapQEnmZITO+z1P2eLLm9gPsjOeZoDM8ruLE2vhDaeZxcyy+qk xhvAJs3QifQ== X-Received: from dybhk18.prod.google.com ([2002:a05:7301:2892:b0:2b7:d91:b4a2]) (user=mmaurer job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7300:7491:b0:2b7:f28d:c8c1 with SMTP id 5a478bee46e88-2b8327328c7mr4126eec.0.1770133601984; Tue, 03 Feb 2026 07:46:41 -0800 (PST) Date: Tue, 03 Feb 2026 15:46:33 +0000 In-Reply-To: <20260203-qcom-socinfo-v2-0-d6719db85637@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260203-qcom-socinfo-v2-0-d6719db85637@google.com> X-Developer-Key: i=mmaurer@google.com; a=ed25519; pk=2Ezhl7+fEjTOMVFpplDeak2AdQ8cjJieLRVJdNzrW+E= X-Developer-Signature: v=1; a=ed25519-sha256; t=1770133593; l=1096; i=mmaurer@google.com; s=20250429; h=from:subject:message-id; bh=sLbxFTX2mTYV2vSHOwak0YCZYcQva6hVw82FQCeYKlk=; b=lrUfeO8BzxGoH2q0cLzXZitIHc5mxhrmhIP1EvIGlTolROpSubzosdu4ukDgERhXMbVdgqt6B hy4MuPfZ3YMDwryq+n6Z7b1/52uJBUTXJBD7xC/OlPQKkhC26hmI+cu X-Mailer: b4 0.14.2 Message-ID: <20260203-qcom-socinfo-v2-4-d6719db85637@google.com> Subject: [PATCH v2 4/6] rust: auxiliary: Support accessing raw aux pointer From: Matthew Maurer To: Bjorn Andersson , Konrad Dybcio , Satya Durga Srinivasu Prabhala , Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?q?Bj=C3=B6rn_Roy_Baron?=" , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Daniel Almeida , Greg Kroah-Hartman , "Rafael J. Wysocki" , David Airlie , Simona Vetter , Michal Wilczynski , Dave Ertman , Ira Weiny , Leon Romanovsky Cc: Trilok Soni , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, rust-for-linux@vger.kernel.org, driver-core@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-pwm@vger.kernel.org, Matthew Maurer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable While it's preferable to add bindings in the kernel crate rather than using raw pointers where possible, access to the raw aux pointer is required to pass it to C interfaces provided by a driver. Signed-off-by: Matthew Maurer --- rust/kernel/auxiliary.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rust/kernel/auxiliary.rs b/rust/kernel/auxiliary.rs index 93c0db1f66555c97ec7dc58825e97c47c0154e54..1a88277f0fd9ea5ff32cc534dfe= 5682009de94c2 100644 --- a/rust/kernel/auxiliary.rs +++ b/rust/kernel/auxiliary.rs @@ -237,7 +237,11 @@ pub struct Device( ); =20 impl Device { - fn as_raw(&self) -> *mut bindings::auxiliary_device { + /// Returns the underlying auxiliary device + /// + /// Prefer to add bindings in the kernel crate for any use other than = calling driver-specific + /// functions. + pub fn as_raw(&self) -> *mut bindings::auxiliary_device { self.0.get() } =20 --=20 2.53.0.rc2.204.g2597b5adb4-goog