From mboxrd@z Thu Jan 1 00:00:00 1970 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 6EA2E1AE852; Wed, 11 Sep 2024 17:35:44 +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=1726076144; cv=none; b=XtvlNr2FJbhlzGR7vUKSPMOlRp8tFYqzQRc0enfspGmpHFPhWdumr2kiyk4P3wiXudLSBprNqACx6LNeBkL00/+1aVtIUtnRUH9pJNyTy5Wo4YO2IqZV4p1zCfa8ZXRd+RpcZgixcmiYZG8Vmu860hhKgY2xehS9W7olRnIrw0c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726076144; c=relaxed/simple; bh=YbkFZVRnO7z0xDZitZm29si1xpSBine6L+hGh61wN1U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Rgg2N+y1g0KC9V24EXWMfslTmL/6cKHCqhA/5/a9BSGbKqMcOHP711XDQ1uwBLsY8bmXxezlrgEqYS7zh4uX9jnikVbIBRqpZjp76I4uZO1BDnNJ01lIEEUybrf7c9RLlLBTtaGamiDYyiOxYfNmEiqsSQRN0xHMBw+U5BC/YqE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=miLmdgGo; 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="miLmdgGo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 195EAC4CEC0; Wed, 11 Sep 2024 17:35:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726076143; bh=YbkFZVRnO7z0xDZitZm29si1xpSBine6L+hGh61wN1U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=miLmdgGorlsJh0FQ94RmjTjwSf0/zRABbJ94KLqEmEDIjjdPPXJ34x69OvXCpI9nx Yxf0CufuinCFr8VaPmOMhDerDsA8hp49UbpnvvfTAUO0R/mssnjDuPOnfVPMsHdwkZ dmZzUnDLnYY54Wh9WNmYqdfFXYkSkwYzpYoj4W3xgZjzJx/RJjVKlhhbmnaDvQJRzU PhAPSO4s0fMSwLMAC5lFT22m3syGPJVsOVCuRr41760TEVausfkYOezblo9RkM0xHz E9v9kAHilNC13DoR/thFVknR2PQsN7/Os4jOIpTQbQECNMdmjxxaKZTPRv47DUpjmM Ii9Du3WxbVnaw== Date: Wed, 11 Sep 2024 19:35:35 +0200 From: Danilo Krummrich To: Greg Kroah-Hartman Cc: Ayush Singh , fabien.parent@linaro.org, d-gole@ti.com, lorforlinux@beagleboard.org, jkridner@beagleboard.org, robertcnelson@beagleboard.org, Andrew Davis , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/8] rust: kernel: Add Platform device and driver abstractions Message-ID: References: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> <20240911-mikrobus-dt-v1-1-3ded4dc879e7@beagleboard.org> <2024091106-scouring-smitten-e740@gregkh> Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2024091106-scouring-smitten-e740@gregkh> On Wed, Sep 11, 2024 at 04:56:14PM +0200, Greg Kroah-Hartman wrote: > On Wed, Sep 11, 2024 at 07:57:18PM +0530, Ayush Singh wrote: > > +/// An identifier for Platform devices. > > +/// > > +/// Represents the kernel's [`struct of_device_id`]. This is used to find an appropriate > > +/// Platform driver. > > +/// > > +/// [`struct of_device_id`]: srctree/include/linux/mod_devicetable.h > > +pub struct DeviceId(&'static CStr); > > + > > +impl DeviceId { > > > > I appreciate posting this, but this really should go on top of the > device driver work Danilo Krummrich has been doing. If everyone agrees, I'd offer to just provide platform device / driver abstractions with my next patch series. This way you don't need to worry about aligning things with the rest of the abstractions yourself and throughout potential further versions of the series. Just be aware that I probably won't get to work on it until after LPC. > He and I spent a > lot of time working through this this past weekend (well, him talking > and explaining, and me asking too many stupid questions...) > > I think what he has will make the platform driver/device work simpler > here, and I'll be glad to take it based on that, this "independent" code > that doesn't interact with that isn't the best idea overall. > > It also will properly handle the "Driver" interaction as well, which we > need to get right, not a one-off like this for a platform driver. > Hopefully that will not cause much, if any, changes for your use of this > in your driver, but let's see. > > thanks, > > greg k-h >