Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp366959rdb; Thu, 1 Feb 2024 10:39:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IG5WL9yYGfS2/nyHwnRbB17SD7+tHxvuGwRJLFBi/AB/bmdsEqROU26fYAf+qsJf7OmixW4 X-Received: by 2002:a17:902:f683:b0:1d9:3b9e:dc08 with SMTP id l3-20020a170902f68300b001d93b9edc08mr5700857plg.20.1706812786025; Thu, 01 Feb 2024 10:39:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706812786; cv=pass; d=google.com; s=arc-20160816; b=RfpAjHuEDCVGjAxKIma+1MntpbhJk+SV38yyfkCet4vkYNCFzJ4lt9LyOlmBs9XaV5 qaCgjRiucuau/s7FPbUvviyhUp2vyxQm78bTB2wOlKq4oAH1A21pdKc92cGpaaDEatAZ 5FBTVBBkGqARQaHKzifYJGV6RibrRU84STj31Qend51El18+hRbLtwHcHdNkUFWgo7++ QNl5Bv1AljqcDeI2bOp7QNZv/ubt/B/TqzgscyX/gvJJagTnXfNe+Y0HYDJbIs0WvMrd D42ZeqXv2jctetsXPTmhGcaugYnB4I4vY1eveGX56/D6akveWinzvIRBMXiP/wEh3INK fZdg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from; bh=x4OPjEpUKjwSBjYVydSlZ68eGPeU5YBNy+z/M0GoQeg=; fh=rpdBWgoQ1xJiixjvBv4ru9QeAtrzs5h6wcXVz5LPy+I=; b=MU63nY3dzo9jwp41JBE+ZW/UQhUDO9geScs7Jc8WRCme/7Pw8QJ2FWaVFk6PnPjZwH lR5jdj04t30CWpITBu/Txi0tEb0jTPUJ/n24bn+CkKq1DHsUbR/CxHNXSnXUcYeudME2 VConvlxv3SSoE/rjvhbDk1hP2ycYM0hJvP7J7Gcwzo0mRNPoBF35W+J2uAIWHUx4i1Ay 3Lvw8D4lHzVysG66kGpbMXAB6RDMvNlwHEfGsx45NDx0H5KTKdlMz7UwH/BQV9D9LYYm rf9p10suNGNAMKPEuvn4PUe6gkLP/1H4h7uLa8sCZLBcOmyw8lbGIQsCMPDGB/VySP8p dsdQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=christina-quast.de); spf=pass (google.com: domain of linux-kernel+bounces-48661-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48661-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCV926ZHL4WXuAjzgNMOrYAAQ+Uw2hEeL6VuIQM/pYn8e3Pbvn+ZhvWkhEjqPDjbiJiWpn3f+PHmPl01SesRUd9Io3XIiJkwVGXhhpYrQg== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id w5-20020a170902e88500b001d78f9081b5si235717plg.467.2024.02.01.10.39.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 10:39:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48661-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=christina-quast.de); spf=pass (google.com: domain of linux-kernel+bounces-48661-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48661-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 53028B2666B for ; Thu, 1 Feb 2024 18:11:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD4C312880D; Thu, 1 Feb 2024 18:07:16 +0000 (UTC) Received: from mail.someserver.de (mail.someserver.de [116.202.193.223]) (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 0D46912FB00; Thu, 1 Feb 2024 18:07:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.202.193.223 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706810836; cv=none; b=GfGJR0SVnMIRHOBHljEuY/0e/FH3cfcqsqHDgho4yK8ufc3vP/2gWEdsMz+Zg6OHpggLlfNCaEv4cTRzvnAOeix7E9Sb6OO/5s/BoMeI3i6ZD7/6XdFblSnbISD6u8xZvoyRqFfuVceg97nIQd0rnYhFmw6kKXL0FyyDcXGDfFo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706810836; c=relaxed/simple; bh=jWA5iTRD69ucDNwkpZwR5jCH+P2otKImG+J2kWpMQs8=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=ckf0wEhSkc25Chs4CfzO8gMYwLo3J0H0Rtc59yMtST9u95saXZdYCCSzEFMirLk/m9dWD2ekBvNspWAg+WT+ZrnGmtuqbA+DV6WvC4+HGT2xlO+/DJm0cy6vXvrexD8jYvmmaCTgqkSqS0fPmJLuQAggdwhRxulk+AlenrDd50A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=christina-quast.de; spf=pass smtp.mailfrom=christina-quast.de; arc=none smtp.client-ip=116.202.193.223 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=christina-quast.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=christina-quast.de Received: from localhost (unknown [195.162.191.218]) by mail.someserver.de (Postfix) with ESMTPSA id 80FA2A211E; Thu, 1 Feb 2024 19:07:10 +0100 (CET) From: Christina Quast Subject: [PATCH v2 0/3] Add Rust Rockchip PHY driver Date: Thu, 01 Feb 2024 19:06:57 +0100 Message-Id: <20240201-rockchip-rust-phy_depend-v2-0-c5fa4faab924@christina-quast.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAMHdu2UC/0XMQQ7CIBCF4asY1o4BWtvqynsYYyhMZWKkONBG0 /TuEl34dt/i/YtIyIRJHDeLYJwp0RgK9HYjrDfhhkCuWGipa6mlAh7t3XqKwFPKEP376jBicNB 0yvV1K9syUe6RcaDXN32+FA88PiB7RvMPqkr+Oj1lmBUoQKfRNVV3MPvuZD1TyhQMPCeT8s6hW NcPdt7myrMAAAA= To: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , FUJITA Tomonori , Trevor Gross , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Heiko Stuebner Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Christina Quast X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1706810819; l=1206; i=contact@christina-quast.de; s=20240130; h=from:subject:message-id; bh=jWA5iTRD69ucDNwkpZwR5jCH+P2otKImG+J2kWpMQs8=; b=x2+WW6v6zLMM6XjRuSZYbZ89dx3Cl5LmXdahaHthccc/4Gh8+ZzNrEDkpGaplAm9LUlUMptAJ DRo0OfTS6bQB4JaHE1iLovyZ7EjwiZi42bBiADhExh0vY5oYleM7WbV X-Developer-Key: i=contact@christina-quast.de; a=ed25519; pk=aoQfinjbnr265vCkIZdYteLDcmIqLBhY1m74WfFUU9E= Based on the example shown in drivers/net/phy/ax88796b_rust.rs, I ported the rockchip phy driver to Rust. The code in drivers/net/phy/rockchip.c was basically rewritten in Rust. The patchset includes changes to phy.rs, adding more struct driver functions for the abstraction with Rust. The driver was not tested on real hardware, because I do not have a board with this phy, and I would appreciate it if somebody could try out the driver on their board. Signed-off-by: Christina Quast --- Christina Quast (3): DONOTMERGE: rust: prelude: add bit function rust: phy: add some phy_driver and genphy_ functions net: phy: add Rust Rockchip PHY driver drivers/net/phy/Kconfig | 8 +++ drivers/net/phy/Makefile | 4 ++ drivers/net/phy/rockchip_rust.rs | 131 +++++++++++++++++++++++++++++++++++++++ rust/kernel/net/phy.rs | 31 +++++++++ rust/kernel/prelude.rs | 16 +++++ 5 files changed, 190 insertions(+) --- base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d change-id: 20240201-rockchip-rust-phy_depend-681db4707777 Best regards, -- Christina Quast