Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6740893rdb; Tue, 2 Jan 2024 11:38:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IH3RnrdVojaezoXaTvb2tWs0jSZIRNOtXWkk+42kokrThAC2AGnC4y/S/jHCDWjXuHKOGSP X-Received: by 2002:a05:6870:170a:b0:1fb:75a:de6c with SMTP id h10-20020a056870170a00b001fb075ade6cmr22450257oae.90.1704224291709; Tue, 02 Jan 2024 11:38:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704224291; cv=none; d=google.com; s=arc-20160816; b=FANissyDHQM4bAbk0joR0xH0ufCgAGwcop0mRkYiB6A+db1lPm8i89mB4dT1k8OCyx E60VtGLPgfojr/aEhAkZwiZeHv4pX2+lu+eNVyqs55oq0TykdxLOa6pM05/O3hTchofD rpPKhj9qu6niK6YHJaKGsKQjVpSilMLrRuGNInyUzSPHbN2k2y6Q104Hx1QWmm3n6lZs 3SMXPjwPrLgN+VN+T3RIiuTjMojqBw1LB04K/LXMYY9/OafE8U6380wQAhqiAnNnD1rW wkfK/tAB1qNmFHkFolNvtLGyelDofDa4UmupQwmIRwwfJarmZAo3W/suf+MDiMNJyXWn fAGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=Hy7m5NBRVczg91iDf5Eb7u55QimZ0t8BbQ4urZCLbZ0=; fh=/HPsgEK8OavhtVnienjUfGl3XN3E/8DwgXLMHriu5QM=; b=K3ua6KS7BAByf5/+wgd4qVYyQ2b6AZXQItlB7/SaQQUj1Msa56Tqt4zMZE4Fc/DFA1 UOTBxer18So3E2WMUvY/FIEFUuCGlr/1+PzlrXQq/bjM/GJm8L9YUjQB5Jwq4T9GynRq 6SCMzOSR1rvlvJxu09kAuRCEq1/Mm9L9LPF8piJ0AGZwfqD+2NwNBp7fCrRQX6tfB28n MaAjjcFMzpgM0S7SxrWa6DvnzhlPORgSGY2uYIpgogwozZ2U42ENhiy4uOxDz+tyWsO9 GDK7Sv2xyJoZI13b6BpELmUS5BtXPPefWRTrhSJXGdOA0+lbGOM0b65JUbrIyWGhqhH/ gSUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YCcgOUG9; spf=pass (google.com: domain of linux-kernel+bounces-14780-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14780-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id x6-20020a654146000000b005c668a5a906si20334098pgp.282.2024.01.02.11.38.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 11:38:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14780-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YCcgOUG9; spf=pass (google.com: domain of linux-kernel+bounces-14780-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14780-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 37836B2291F for ; Tue, 2 Jan 2024 19:37:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 794D016428; Tue, 2 Jan 2024 19:36:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YCcgOUG9" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A06A9168C6; Tue, 2 Jan 2024 19:36:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2086C433C9; Tue, 2 Jan 2024 19:36:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704224209; bh=z8L6/wjAuu1+co/0Y9paPzHusZ2E1Wm88BUIn8iOkng=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YCcgOUG9FFTHAfHaTStXjGyDLn86yKRSwvs4aF2tLvPfQVKG2uafvJulh9b2g1bZT uXSPuuxAdCEYTGHJDKHAIA3ItahYgX/LVm2zocLxOoCHBV/iOJVX45wqLWb8kIGTUw 2GcLj3PC4eDYBfhfci+6k1aZBA8J8emVKISe43bhRQEqVdOT7niFKXq5hkEl2vBxrs 6XGmURBRRBzzXi2sRF9LUqhXPy3jDBbrhw+dBRRke++Imv+JeH1jKvEFYaeioo2Ny1 pIUV+oK1/S0vR5trWVr8HM1de6V+wIsPpzy8RRVyBFgCgql1BMG4NCyUO8XHKblQQ9 IjaxC52L9OZzQ== Date: Tue, 2 Jan 2024 19:36:42 +0000 From: Jonathan Cameron To: ChiYuan Huang Cc: Krzysztof Kozlowski , Conor Dooley , Lars-Peter Clausen , Rob Herring , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , , , Subject: Re: [PATCH v2 2/2] iio: adc: rtq6056: Add support for the whole RTQ6056 family Message-ID: <20240102193642.0d6d2007@jic23-huawei> In-Reply-To: <20240102083042.GA13611@linuxcarl2.richtek.com> References: <74db15583a9a68701dbff5a1a967c0d987d6dfb6.1703762557.git.cy_huang@richtek.com> <20231230120347.0816bd09@jic23-huawei> <20240102083042.GA13611@linuxcarl2.richtek.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 2 Jan 2024 16:30:42 +0800 ChiYuan Huang wrote: > Hi, Johathan: > > Most comments are good and will be fixed in next revision. > > Still one comment I cannot make sure. > > Please see the comment that's below yours. > Hi ChiYuan, It's good practice to crop away all the parts where the discussion is finished. Makes it easier for people to find the bit you want discussion to continue on! I've done so in this reply. ... > > > + > > > enum { > > > RTQ6056_CH_VSHUNT = 0, > > > RTQ6056_CH_VBUS, > > > @@ -50,16 +60,29 @@ enum { > > > enum { > > > F_OPMODE = 0, > > > F_VSHUNTCT, > > > + F_SADC = F_VSHUNTCT, > > > > If the devices have different register fields, better to have different enums > > for them as well as that should result in less confusing code. > > > Actually, this is all the same register, just the control naming difference. > If not to define the new eum, I can remain to use the same field to handle rtq6059 part. If the bits in the register control the same thing across both parts then add a comment alongside the enum to make that clear. Given the naming that seems very unlikely. PGA and AVG would eman very different things to me for starters (oversampling vs a programmble gain amplifier on the front end) > > > > > F_VBUSCT, > > > + F_BADC = F_VBUSCT, > > > F_AVG, > > > + F_PGA = F_AVG, > > > F_RESET, > > > F_MAX_FIELDS > > > };