From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4D35CEE57CA for ; Wed, 11 Sep 2024 17:37:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kFJKQyvTNmFseCGbZEsWqedFg4Iyl55o3YIynloa5LA=; b=0vu5DAD7QAmHWA3TiDWObLMf1S 2iZePOeRVQ8MdJ+bL6tZibjjjkw+TdHKc5FucqGh8RPlWzzOCwHKoOgDskBFoKxEe+yAmSurk49fz Hcrmp39HTU6ExjvqYzshwGEB0MhvmkX5RM0kHzMt733torymgsEL77mDcvFEzcC1ju6IV/fV8BWTG f+m9pUBl13bfv+dadBQqip90umJkJFIVpFRYxUfm8wmgjclmYEhCqNrYgR7ER7Q3gv1Zuq+mq0Fq9 B/fbzpdQpDXjO4FwcGIaLq9qHSrzqUJOh9gPxLnoyC3A44PMmXmNlUS8HUbSnbiOTj+VZLrgaA7Lr TF9wX5pQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soRGt-0000000AWNX-3y7Y; Wed, 11 Sep 2024 17:36:51 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soRFq-0000000AW91-1zSc for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2024 17:35:47 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id EE500A452C8; Wed, 11 Sep 2024 17:35:36 +0000 (UTC) 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2024091106-scouring-smitten-e740@gregkh> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240911_103546_665041_3D961280 X-CRM114-Status: GOOD ( 19.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 >