From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.1 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796083052; b=lf0egjXX+Xcu3LhDRAZFeCFgGo+5j/geyLgGiDpwZn5CYeURASARJF8J03Ohwkm+rs55 D+3r0tOHpoGc+Q+XtlVvOVf3oJUfeMRWvlr87BIAowAhz2KiF0xVNBm1ioWjhi7w5gqcy kcid9n9/RJvjbzhoN6q7ENQhHzzVRPTUQEGu1ghZ1exVa9hpCExpnx96z4IY3pmCG4VtW iYd0ts6nx7xK/D7D1cT/Fdyia5y2p3LVrPhUqAcySCjItUf13nl6T4gracUl1JzhPEpQg /lzf9sGTLL6XiyqZ/EIs8CZsfqhVJbsp5H7pd3WJWDKeVYqSMRjZXjQZsn7ZziAEVlQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796083052; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=B9pbUKgzXXrB4tZE0dwyVb0yOMYWacn3dqbSEOQRHcg=; b=b8Op/D75TXGxPlbQhE4m8jFyvPOP7YfNJe2etFcZ1CPbZnvlFpdZ03Al+96ZjneBhM2j LOCnETBFjuBqrAzJ4s+bMd2YXgup+KuU5coZyMrChQcbucHGurAChehOA3NH5fP+PT6VH sXPd/ZIv7Y4JOeAhlLZg4vRdeDzWTxXG+wjpcJcdDeSoCEPYfmVDV8jJ5sCoO5KLFwf4L 7da3pDMiCJ0sXFn4fkpyYsA4l2RsJj5lAuahFTBDxFu8pdbK+JJA0Lcs6AC3Gp5QlYt22 0HsJ1Zu1rDraCX+lpTX72qxAxQ8Ot1UYPPkPhpzbPUjGC/Y9EI8BodtSpXNizwwQoIQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=G5JSzz+u; arc=none smtp.remote-ip=95.215.58.1 Received: from mta1.migadu.com (out-1.mta1.migadu.com [95.215.58.1]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A0C0B606A31A for ; Mon, 30 Nov 2026 23:57:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A0C0B606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=G5JSzz+u X-Envelope-To: devicetree@vger.kernel.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: devicetree@vger.kernel.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-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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