From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F50F606A31A for ; Mon, 30 Nov 2026 23:57:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=YHknOjO1; dkim=fail reason="signature verification failed" (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=G5JSzz+u DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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-Unsubscribe-Post:List-Owner; bh=SOJQSjKGlZAdBWJitGJYMetKUL5kYePgHkKGN/VMX2U=; b=YHknOjO1WHJEnALbAOrQokLuYV F4bMQ7SEK5VfYMS9DDrg54bMmko/gz94jQPBbw0zvYYcDVgOpTz9O821onMlEQGq+UJA1i44v8lNC /cQqTgxLrMrya/l5D+YDCgDYhzWWS7aGdpXyDWo1E7G/gBAMggvZ+AEsRYS6ys20YX9S49OHpqktD Aez2t+RG6TFyy4bhlXHn6sdc2Dqdk4xSthQVZ0WGQUZaOzikCs29xFNWzA7pkrVtkh4etpG+x8lZ0 vTjeWeHDWfrY6HC0uQ0OidH0QJguIY2lpheb4xHyXkai1r+a94BON2NJ6yA6GqT0abw1KEuvkW0KU hD4zuUvw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYBFX-000000065sa-2bXa; Mon, 30 Nov 2026 23:57:35 +0000 Received: from out-10.mta1.migadu.com ([2001:41d0:203:375::a] helo=mta1.migadu.com) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYBFS-000000065s9-3pBY for linux-riscv@lists.infradead.org; Mon, 30 Nov 2026 23:57:33 +0000 X-Envelope-To: linux-riscv@lists.infradead.org DKIM-Signature: a=rsa-sha256; bh=/HWUpONAVqBFlCUDbLFgxTomotIuGQqZyr9cU0pgrX4=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796083048; v=1; x=1796687848; b=G5JSzz+uGeXq3+mpKg21+vQ5sJqwZYXDgFsSR5E/TOT16HWPusB3x8Xg8Qfj3/AMqiE+0JWM XXK1rzHY8vHkcOVV+ufyM2b2UNon6132/OI2H6Hb7Zw6/k21PbkRY5KAYLYWCL1QE5C1tpWd7B4 tAyY323UcHTbWSgFQdxyLgjk= X-Envelope-To: linux-riscv@lists.infradead.org Received: by smtp.migadu.com with ESMTPS id 0d21273012d4b11c; Mon, 30 Nov 2026 23:57:28 +0000 X-Mizu-Trace-ID: 0d21273012d4b11c X-Migadu-Flow: FLOW_OUT Message-ID: <8a80695b-cac3-4db0-818a-327c945379e1@linux.dev> Date: Tue, 1 Dec 2026 07:57:23 +0800 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] pwm: sophgo-sg2042: add support for CV1800B To: Hiago De Franco Cc: =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Inochi Amaoto , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Chen Wang , linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, sophgo@lists.linux.dev, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org References: <20261117-milkv-duo-pwm-v1-0-3f1786ea57b7@baylibre.com> <20261117-milkv-duo-pwm-v1-2-3f1786ea57b7@baylibre.com> From: Chen Wang In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_155732_014896_06C91020 X-CRM114-Status: GOOD ( 12.68 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-riscv" X-Spam-Status: No, score=-10.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On 11/30/2026 8:57 PM, Hiago De Franco wrote: > Hi Chen, > > On Mon, Nov 30, 2026 at 01:30:55PM +0800, Chen Wang wrote: >> On 11/17/2026 8:57 PM, Hiago De Franco wrote: >> [......] >>> /** >>> * struct sg2042_pwm_ddata - private driver data >>> * @base: base address of mapped PWM registers >>> @@ -155,6 +168,14 @@ static void pwm_sg2044_set_outputen(struct sg2042_pwm_ddata *ddata, struct pwm_d >>> writel(pwmstart, ddata->base + SG2044_PWM_PWMSTART); >>> } >>> +static bool pwm_sg2044_get_outputen(struct sg2042_pwm_ddata *ddata, >>> + struct pwm_device *pwm) >>> +{ >>> + u32 pwmstart = readl(ddata->base + SG2044_PWM_PWMSTART); >>> + >>> + return !!(pwmstart & BIT(pwm->hwpwm)); >>> +} >>> + >> `pwm_sg2044_get_outputen` is only called in pwm_cv1800b_xxx, why not name it >> as pwm_cv1800b_get_outputen and put it together wtih pwm_cv1800b_xxx >> functions? > In this case I was not entirely sure and got confused with the names. I > agree with you, but pwm_sg2044_set_outputen already exists and > pwm_sg2044_get_outputen is just the a get function for > SG2044_PWM_PWMSTART. So for this specific case I believe keeping it as > pwm_sg2044_get_outputen would be more accurate, what do you think? Agreed; please maintain the original naming convention. [......] Thanks, Chen _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv