Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1208043rdb; Sun, 7 Jan 2024 08:20:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7twFVsFz32ofVaa7pN8YO8Uv2vnfRhdUEop+g8YCGFosrw4pInoJZO6YPhG31Ksi73aM0 X-Received: by 2002:a05:6e02:3886:b0:35f:ca9d:6c42 with SMTP id cn6-20020a056e02388600b0035fca9d6c42mr4390171ilb.4.1704644413674; Sun, 07 Jan 2024 08:20:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704644413; cv=none; d=google.com; s=arc-20160816; b=OHdOQjqzT4n9ZMDUaEEJT42jQqKUP3pNQ/bqe6ccmJjxoO4pDhPukB7qdgZUfLCBzr fB6L7MWpXryFcDnek8ZjtfT6qrSOWQj/0LAL7EFaGawFPITqilHizleQfT/H0UgCJ0wQ 7RZzjKpTHuEZhSz6382ToWL0ArxMX4UHTdc5MyZcM3DL0wQq8Ch2IxqGnxMEvZiFswTk tJ3B72dgG08a4g5LpCatgVwqiyPsEUDsB4/rODoT9KbsjP5aPbrv2ukfHWhv8uaQtHyu Bh58qcoNoY4c5gov1VDkdgxQsuzXJX07KZnn/GGAYfVlAra6rZDWzqaGkX6GVn8J5C5r 2djQ== 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=vp5yh4TzAaQmkomFg1CBXEzrTzdQComzLA5AT2Rryg0=; fh=eeXddcWaQAWIbkS+ds82311PCFzLlYT3TjJVyTUb3zU=; b=gVUuWbzCj8hYYPIjS2bSntNTfcNzWw2ydbOTWBalxF95felZqpvysIm2nR61oaTL+v eyiKejlOQJ+zejaUyYOhdSMVmH2muU4Gu/0cILsTT2NviSxIb0lL4eJ3vOeLh8NjgD75 0T/xly1lWS8zwn61aewpZo6X/EUciluPUbL9cLmY1gxN+PyMfxCGAlzpOCTCs6XACBH7 JCMKdUHspCoxtsvG+DZAATteG9u8PlJQccMyEADpsJyo9GxDDFiCtBNhwrJKx2zwgEzq hKsKwZoMLPRd6RQ3kOtXSUpnD8BpFvOi1rSEv2tLOUKanJHUyLJoQ0amHxzH9uEy4nLr MowQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZqFx6g7I; spf=pass (google.com: domain of linux-kernel+bounces-18912-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18912-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. [147.75.48.161]) by mx.google.com with ESMTPS id c1-20020a6566c1000000b005cde387778esi4669910pgw.368.2024.01.07.08.20.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 08:20:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18912-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZqFx6g7I; spf=pass (google.com: domain of linux-kernel+bounces-18912-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18912-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 76D18B211F1 for ; Sun, 7 Jan 2024 16:20:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C940013AED; Sun, 7 Jan 2024 16:19:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZqFx6g7I" 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 02B7F13AD5; Sun, 7 Jan 2024 16:19:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54A02C433C8; Sun, 7 Jan 2024 16:19:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704644397; bh=uIAD5Kp2kfFIl9FoggQDWcZuqpMzhfaqIRSk/vA2DQM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZqFx6g7ImUgF+nkjBx9CrvDhk+3HY7beJOk1JAw5Kb9KYcl5sIoIiil23pNiWFIzE H5ZYXTaENWD3s4Uw170hu52T+13Zeeanp2+wBT7DQR25FhAzFzovEQ4EdBuiKcJ0Xa /RhA7Jel5bjtL+7TszdlfUvkHaW+uWLH28EjLNloNXAcAa+4NFNE5XosVe754Yyx+C piZIiaGdfBRsXukEtf9LZmdDM4p2OyudONueEz/4iPfAxtFsRJC893biNgAP/hlpjb yJdCutBCKdCv5it4noOCIsPjQxlvh/giq3Pq00HVigTVlLp4GRBEW61dRyz0FvSl/8 ZmJNeztyA8pIQ== Date: Sun, 7 Jan 2024 16:19:49 +0000 From: Jonathan Cameron To: Cc: Krzysztof Kozlowski , Conor Dooley , Lars-Peter Clausen , Rob Herring , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , , , Subject: Re: [PATCH v4 2/2] iio: adc: rtq6056: Add support for the whole RTQ6056 family Message-ID: <20240107161949.04ec0011@jic23-huawei> In-Reply-To: <2980b67de00bae1fc25004188e8aabf53073d940.1704357933.git.cy_huang@richtek.com> References: <2980b67de00bae1fc25004188e8aabf53073d940.1704357933.git.cy_huang@richtek.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.39; 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 Thu, 4 Jan 2024 17:03:31 +0800 wrote: > From: ChiYuan Huang > > RTQ6053 and RTQ6059 are the same series of RTQ6056. > > The respective differences with RTQ6056 are listed below > RTQ6053 > - chip package type > > RTQ6059 > - Reduce the pinout for vbus sensing pin > - Some internal ADC scaling change > > Signed-off-by: ChiYuan Huang Hi. One last follow on comment based on v4 changes to the enum naming. I think you missed one place they should be updated - the reg_field definitions. Thanks, Jonathan > > +/* > + * The enum is to present the 0x00 CONFIG RG bitfield for the 16bit RG value > + * field value order from LSB to MSB > + * RTQ6053/6 is OPMODE->VSHUNTCT->VBUSCT->AVG->RESET > + * RTQ6059 is OPMODE->SADC->BADC->PGA->RESET > + */ > enum { > F_OPMODE = 0, > F_VSHUNTCT, > + F_RTQ6059_SADC = F_VSHUNTCT, > F_VBUSCT, > + F_RTQ6059_BADC = F_VBUSCT, > F_AVG, > + F_RTQ6059_PGA = F_AVG, > F_RESET, > F_MAX_FIELDS > }; > > +static const struct reg_field rtq6059_reg_fields[F_MAX_FIELDS] = { > + [F_OPMODE] = REG_FIELD(RTQ6056_REG_CONFIG, 0, 2), > + [F_VSHUNTCT] = REG_FIELD(RTQ6056_REG_CONFIG, 3, 6), > + [F_VBUSCT] = REG_FIELD(RTQ6056_REG_CONFIG, 7, 10), > + [F_AVG] = REG_FIELD(RTQ6056_REG_CONFIG, 11, 12), > + [F_RESET] = REG_FIELD(RTQ6056_REG_CONFIG, 15, 15), Given these are the rtq6059 regfield definitions should they not be using the new enum names? > +}; > +