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 811DDEE49BC for ; Wed, 11 Sep 2024 15:55:40 +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:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mhFBnUxhXfUiwp2BIfSInO3F3yOJroJO17IaiZ1i4bw=; b=cTxpQZbdoDXIxHk711h3n+t1rY AfNx3Tpm8FZzoQX88KCEeBRbPgOPabacxajO13WmSh+rktJpG09CrXmLJq6BArm+bhpYIDso3/Aay reaqy7DBI4jk1aAHCrGU0qTvBCl7C3ENt/6ikYanCa0navPur4d1OXl7Ww8jFxFYO7KDyyacmiaNi 5XXFauaLU+QirLthlnRO1v9RwptIhwjTiG0YRSo26A9uORvaHLEdQIetPqJHHv0h2toOlddWLvKX7 nWdx+5UfY1p/5ns/Gr/5X0Q8AhyTn9N5p87UCO6Arajr0KP3qw4bFxoqLZLkPSqGQH6VGuwQTcxrg 6BcU15Ow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soPgo-0000000AFwe-1PDd; Wed, 11 Sep 2024 15:55:30 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soPdh-0000000AF6e-1oCl for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2024 15:52:18 +0000 Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-7cf5e179b68so943861a12.1 for ; Wed, 11 Sep 2024 08:52:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726069936; x=1726674736; darn=lists.infradead.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=mhFBnUxhXfUiwp2BIfSInO3F3yOJroJO17IaiZ1i4bw=; b=Xucap2Tc/tDRxnkFgBactwgTCQO/LU0GWubrIoy9Y4oxe2e2cw733qDcB5M68VdUpn gQu3V0WY726An2oRViK4PNhyHV7UA7Maancxb1Qq0wT9gtkyuklvkqV9JNGqKmYU6PAd MQSG3emV1UFdL1pbIlWkb7zqCF7Tz3s6kmPpeLXhdX51TsWGZyLb3SsdRsvX1/70Lqgj GrDLCub3S9QrjQ6DLG/I7HKSlRpZ95a1ID8FbLbhHzeV7NmE1G9KNsqQfWhLcBEirXf4 hXWZrg9hTboTjUjqIbTB4jzAcKk5qt7w4uM7z95lEsTBmSluTZ5XIrlxOYW4sIcHdHea SUpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726069936; x=1726674736; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mhFBnUxhXfUiwp2BIfSInO3F3yOJroJO17IaiZ1i4bw=; b=CUvPBAkowVL4EC9/IY9hJosny9nhaDB455jnWVFRBLbK1K5747WQxWkoVtSlEB0HEl /7MHfhvY2NPzwphGwnRIVbiqNo9imdWkPI7YkPsLFzRPDC8uJvgV9UXzK/bQBBjE1tNU 0mfObikG7LdIWozG+34lG8TEMR3pEZnl5HGSaWSFFMzzHVh6V3b6iLeBt8xusTg6wm9x dHNvbv99zHzDqP9Vv/oRdvOOnmUJJyu30BGQ2XFM9hfC3f/1AAqgOARZF5va2EA5JWoX NVVWpzUBLZqOE47TOM5buau/+C++uegkBxp6RnAz/uyo6Jfy8f86ES1jxf9gW/nxZCsR aRgQ== X-Forwarded-Encrypted: i=1; AJvYcCXaTkepMEyOHAFUDRnthaYvaemm+7AfuG2TYE70dqrUOZZ6LMp+7Exyw3jw1m8403ne1VUOXTXjblck5zDp+/Zo@lists.infradead.org X-Gm-Message-State: AOJu0Yy3DOZ71LqsXAxqo/pJx2NyVlicVpDhUgpROfVljwcppxDUKYaC WA2Q83Y14wLpfX4prLK/n5flk2RydUMks0IRwIDVaI87p6JoOmOL X-Google-Smtp-Source: AGHT+IGOs+PCUn2enJi/POGctcONbWacbrDES/fFDJJ5CFqIcJeEOmHs8RNjPCcMjrve1Sv401LJXA== X-Received: by 2002:a05:6a20:8424:b0:1cf:4a7e:117b with SMTP id adf61e73a8af0-1cf5e1b9c2amr7477090637.20.1726069935654; Wed, 11 Sep 2024 08:52:15 -0700 (PDT) Received: from [172.16.118.100] ([103.15.228.94]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7db1fdee1f0sm131274a12.77.2024.09.11.08.52.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Sep 2024 08:52:14 -0700 (PDT) Message-ID: Date: Wed, 11 Sep 2024 21:22:02 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/8] rust: kernel: Add Platform device and driver abstractions To: Greg Kroah-Hartman , Ayush Singh Cc: 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 , =?UTF-8?Q?Bj=C3=B6rn_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 References: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> <20240911-mikrobus-dt-v1-1-3ded4dc879e7@beagleboard.org> <2024091106-scouring-smitten-e740@gregkh> Content-Language: en-US From: Ayush Singh In-Reply-To: <2024091106-scouring-smitten-e740@gregkh> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240911_085217_499078_E8E93AB1 X-CRM114-Status: GOOD ( 21.16 ) 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 9/11/24 20:26, 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. 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 > Sure, can you provide me a link to patches or maybe the branch containing that work? I also think it would be good to have the link in Zulip discussion for Platform Device and Driver. Ayush Singh