From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (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 8E283330B1D for ; Tue, 9 Dec 2025 13:41:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765287694; cv=none; b=me3cjNSCin3yA8P+vdqi/k747qASj3DQWqW1YG6A2JkgNBaZoppIoaxFMrpQd8BIjBK9fhWv6B7QPR37sFqPADDNkcKcsQMcD+C2LqMKw39dW/nHqgBc5ydBKzl1md0KYVUF8Ogg07TjA4xr/POZ2eiXvzSaE4/vSNLDUBSbWsM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765287694; c=relaxed/simple; bh=kJk1Mdu9xXvv+bQyE7E7F9faw/Qf9P3GDjSaY0xFvWY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To: Content-Type:References; b=hVzhsC3pKAqWS7IfpTuMsZ83Xa3jui0lsYCebzjmlMGKHddmYYa1zx+WpfvQfMW3KJ4FM5ZIPvFNZZD+uA4oh7iAoDJyJe/beef3VEeoAtp0y5Qp74RjUh6fdy5kV5iP3AjEpbfYKRHeCJO+SWXaXe+yOoirH4+xH5Zma/vxQKI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=DISYFaX9; arc=none smtp.client-ip=210.118.77.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="DISYFaX9" Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20251209134130euoutp0142f72cbf577f841ab6b5ee3963fb9817~-j81CnalZ2218522185euoutp01B for ; Tue, 9 Dec 2025 13:41:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20251209134130euoutp0142f72cbf577f841ab6b5ee3963fb9817~-j81CnalZ2218522185euoutp01B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1765287690; bh=NYkdWnmHGgFN43Uqa8YF07pn4VK88DvECmSTgJyvBxI=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=DISYFaX9BUFOZD0EdnhHagJD2E5+Q0kTeKjknFwSLXxzvUE8tmvQlHZadeUUFPmPB k3ni9HrjUkaFzMZLMkGSyXzE2qYCeltzaSbOY8UrSb7STY8webP0tYyB876OQmudaB xVWY66h5qVejbV+pMAY+y4i+rd0PzIbsyQ6FySzY= Received: from eusmtip1.samsung.com (unknown [203.254.199.221]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20251209134130eucas1p22a063fe18c5fdccb8e586892570f3895~-j80gIjuJ1957519575eucas1p2P; Tue, 9 Dec 2025 13:41:30 +0000 (GMT) Received: from [192.168.1.44] (unknown [106.210.136.40]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20251209134129eusmtip129f83220e2503bac3a89ad1f43f2971a~-j8zxf-hZ0170401704eusmtip1C; Tue, 9 Dec 2025 13:41:29 +0000 (GMT) Message-ID: <5a742181-dff6-4073-ada0-342298da63b6@samsung.com> Date: Tue, 9 Dec 2025 14:41:29 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] rust: pwm: Add UnregisteredChip wrapper around Chip To: Markus Probst , =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= Cc: linux-riscv@lists.infradead.org, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, Drew Fustini , Guo Ren , Fu Wei , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich Content-Language: en-US From: Michal Wilczynski In-Reply-To: Content-Transfer-Encoding: 8bit X-CMS-MailID: 20251209134130eucas1p22a063fe18c5fdccb8e586892570f3895 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20251202181800eucas1p18be878cb74d14444f2df8bdcd7a718ee X-EPHeader: CA X-CMS-RootMailID: 20251202181800eucas1p18be878cb74d14444f2df8bdcd7a718ee References: <20251202-pwm_safe_register-v2-1-7a2e0d1e287f@posteo.de> On 12/9/25 13:26, Markus Probst wrote: > On Tue, 2025-12-09 at 09:08 +0100, Uwe Kleine-König wrote: >> On Sun, Dec 07, 2025 at 11:16:59PM +0100, Michal Wilczynski wrote: >>> On 12/2/25 19:17, Markus Probst wrote: >> What does "not able to successfully compile drivers/pwm/pwm_th1520.rs" >> mean? You were unable to find a .config that included CONFIG_PWM_TH1520, >> or you got a compiler error? If it's the latter, ... >> >>> I suspect your kernel configuration is missing CONFIG_COMMON_CLK. >> >> ... are we missing a dependency for the driver? > I got a compiler error. Enabling CONFIG_COMMON_CLK indeed fixes it. > > Without it: > CLIPPY drivers/pwm/pwm_th1520.o > error[E0432]: unresolved import `kernel::clk::Clk` > --> drivers/pwm/pwm_th1520.rs:26:5 > | > 26 | clk::Clk, > | ^^^^^^^^ no `Clk` in `clk` > > error: aborting due to 1 previous error > > For more information about this error, try `rustc --explain E0432`. > make[4]: *** [scripts/Makefile.build:354: drivers/pwm/pwm_th1520.o] > Error 1 > make[3]: *** [scripts/Makefile.build:556: drivers/pwm] Error 2 > make[2]: *** [scripts/Makefile.build:556: drivers] Error 2 > make[1]: *** [/home/markustieger/build/synology/linux- > upstream/Makefile:2010: .] Error 2 > make: *** [Makefile:248: __sub-make] Error 2 > > A simple fix would be to add "depends on COMMON_CLK" in > drivers/pwm/Kconfig for PWM_TH1520. While at it I think we should also add dependency on ARCH_THEAD | COMPILE_TEST as well as HAS_IOMEM in my opinion. I think some of those dependencies were lost when we were iterating on the patchset for some reason, can't recall when exactly. If you plan to send a patch include those as well. Otherwise let me know and I send a patch. > > Thanks > - Markus Probst Best regards, -- Michal Wilczynski