From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (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 A464521CFF6 for ; Fri, 11 Jul 2025 09:25:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752225925; cv=none; b=EFIq3KojStwqiF12XcGSP/gIOhh6dvMzX7q11AcxW7WlsMkfTJW8h9qvw1w4zgVFP3GrVOIQJyuo7ZaYrSVgB1N2/GteHAIPvVNHVpTBnFoAwnh+6Yisosh+OKdYO89uAG/h5pPVV5BQ98CzqDewzsqSj4Alui2AiQVD86hY+uU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752225925; c=relaxed/simple; bh=9LHxuTI8hpxcflNdLOKFQbbQPPlJdw91dYnBuAXCxn0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To: Content-Type:References; b=TEVEIRNBO5MaB+wE/rX9/aAJcVX/YzUHN/I/i1CgEzkNULy0yK5JZ8k4VJiM2yg2msx6TAIOkGPcGIuNxJfaFxNdkcndZI6pHmF0wtCao2BRLP4kqteEKI6gJEZ23r7/kcru4FzQc88rrwbxq699rpe2jHyZG/WBjw+epzPE+Ck= 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=lofho167; arc=none smtp.client-ip=210.118.77.12 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="lofho167" Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20250711092520euoutp020094a380335d225db9d67a0e8123981f~RKDD0M-au1740017400euoutp02t for ; Fri, 11 Jul 2025 09:25:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20250711092520euoutp020094a380335d225db9d67a0e8123981f~RKDD0M-au1740017400euoutp02t DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1752225920; bh=HzPkVcD7EBpLB077YuBkrkHkCg7R8v/lMTm610TXX5M=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=lofho167lt5+OYJKtBe7YUJJ6Lp8NKwqQQRQ7gDsuC9W+lVy6exTq5fHdfWYhe22o vEyaZAuzdXF8zK35Ok8wiQ6GXPvEe3pOz7xS/3yD6eQjEVnIw9Y9fMfMKUsSta1ehf RtER64Nyp3VUGFlwOF8ft24Iy/Ad9RidLep8Ptjg= Received: from eusmtip1.samsung.com (unknown [203.254.199.221]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20250711092520eucas1p2c27be54c048556b3ce54242ab3d228e4~RKDDMne5X0267102671eucas1p2P; Fri, 11 Jul 2025 09:25:20 +0000 (GMT) Received: from [192.168.1.44] (unknown [106.210.136.40]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20250711092518eusmtip1c7e57196a1c1e0613b9ecfbad261718a~RKDCD2bkB3095630956eusmtip1K; Fri, 11 Jul 2025 09:25:18 +0000 (GMT) Message-ID: Date: Fri, 11 Jul 2025 11:25:18 +0200 Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v11 1/3] pwm: Export `pwmchip_release` for external use To: =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= Cc: Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Drew Fustini , Guo Ren , Fu Wei , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Marek Szyprowski , Benno Lossin , Michael Turquette , Drew Fustini , linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org Content-Language: en-US From: Michal Wilczynski In-Reply-To: Content-Transfer-Encoding: 8bit X-CMS-MailID: 20250711092520eucas1p2c27be54c048556b3ce54242ab3d228e4 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20250710185439eucas1p2684255d83d807dfd6f8b9b3caea65df6 X-EPHeader: CA X-CMS-RootMailID: 20250710185439eucas1p2684255d83d807dfd6f8b9b3caea65df6 References: <20250710-rust-next-pwm-working-fan-for-sending-v11-0-93824a16f9ec@samsung.com> <20250710-rust-next-pwm-working-fan-for-sending-v11-1-93824a16f9ec@samsung.com> On 7/10/25 22:52, Uwe Kleine-König wrote: > Hello Michal, > > On Thu, Jul 10, 2025 at 08:54:28PM +0200, Michal Wilczynski wrote: >> diff --git a/include/linux/pwm.h b/include/linux/pwm.h >> index 8cafc483db53addf95591d1ac74287532c0fa0ee..8f0698c09e62b893d63fc258da3c34781183056f 100644 >> --- a/include/linux/pwm.h >> +++ b/include/linux/pwm.h >> @@ -478,6 +478,7 @@ static inline bool pwm_might_sleep(struct pwm_device *pwm) >> >> /* PWM provider APIs */ >> void pwmchip_put(struct pwm_chip *chip); >> +void pwmchip_release(struct device *dev); > > I want this in a separate section because "normal" provider don't need > that. Please add a comment that this is only public for technical > reasons for the Rust wrappers. OK, thanks ! > > I understand you are eager to get this merged, but still I'd ask you to > slow down your patch sending frequency. Currently I tend to not apply it > for v6.17-rc1 as I'd like to have that in next for some time. Thank you for the feedback. All of your points make perfect sense. My apologies for the rapid pace of submissions; I will follow your suggestion and be sure to allow more time for discussion between future versions. > > With you waiting a bit longer before v11 I would have written that in > reply to the explanation in the v10 thread and we might have saved > one iteration ... > >> struct pwm_chip *pwmchip_alloc(struct device *parent, unsigned int npwm, size_t sizeof_priv); >> struct pwm_chip *devm_pwmchip_alloc(struct device *parent, unsigned int npwm, size_t sizeof_priv); >> >> @@ -551,6 +552,10 @@ static inline void pwmchip_put(struct pwm_chip *chip) >> { >> } >> >> +static inline void pwmchip_release(struct device *dev) >> +{ >> +} >> + > > Is this needed? There is no user of this function that doesn't depend > on CONFIG_PWM?! Since only Rust is using this it's not needed. Thanks ! > >> static inline struct pwm_chip *pwmchip_alloc(struct device *parent, >> unsigned int npwm, >> size_t sizeof_priv) >> > > Best regards > Uwe Best regards, -- Michal Wilczynski