Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1202357rdh; Fri, 27 Oct 2023 07:31:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHL8R85s8vU65IXWRtdAI4TSTHSnzJFw50aBSTd6Ko9ET6LJpI5Ba/iGc2btYjemhHSNQVf X-Received: by 2002:a05:690c:c:b0:598:7836:aac1 with SMTP id bc12-20020a05690c000c00b005987836aac1mr2939300ywb.49.1698417114216; Fri, 27 Oct 2023 07:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698417114; cv=none; d=google.com; s=arc-20160816; b=jDDwineqtL5i6ACPkWyE7P1hVR5moMyB3Ppr4/ZT3+TTRWd+1GYyUd7bk+/ZuGvX2v fH7VrPUGEdJL0vw5Gx94F/sq4YkHXVUeWR+jN53WQMcuTgnPQ/frxNjCRPpqcbVS73hg Z+HLsb75/PSPixqZy2y44y4wZbEk7ex0TEicu0TBHfk/xySLBh3dLNOCZNFg2442NZRo j8OkHlVNBK6WoAKN38Vp9+n/k8SdrWfByLDJ8jaHr6+A480swp26p0uU1mZfu7H0k3M/ CwTC3yig/IHkaMmVzo6Pdwnvr3p9Zv7iJaWbh8inGC30+JKLQuF2jdJZEFZZTAVFLQST DRjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=SoA84pnuL5Ae2R7vW6hgc8d+7F3emsVwezYSkeIw6eA=; fh=AGuS6osPArpWP1UY6EVIOoWNMWhFRb3dFhnNPYvwcbQ=; b=XudsBgObLHCG1psUfb7FS8xF21uIePsOah6pZgsy+3Yo46PPU4Aq4ogY/VbTSv89ys tsUwXbjihbGL7maOkhsAXp+kxPT8TejHXXLJ5cUzqdILJi+VVUR8pisclwjjHONZEJ1o ANlxD7Xqc+5wTXFCTgVU/2Rx6yYt7Wip7Ey/nXUqvGVG3snL4z0BOnsCk9mzZ6NV0+Dj m6XgI8t8LvrVEsfDr21m6ipF15FsACZBNqUMyuvTmp3Pv4zZTMdFdmZ6bLIn13hroIN6 CADYlOMSrQlpoyZR+sTamFcWEsWUR4ljbJhfQ9/7Q23nGooHPKHCnC4XzEaHSiIegX8t yytA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FobtRAFd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id k132-20020a816f8a000000b005a7cbddf600si2436942ywc.186.2023.10.27.07.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 07:31:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FobtRAFd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A4585801BEA4; Fri, 27 Oct 2023 07:30:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346003AbjJ0Oa2 (ORCPT + 99 others); Fri, 27 Oct 2023 10:30:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345952AbjJ0Oa1 (ORCPT ); Fri, 27 Oct 2023 10:30:27 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3982C0; Fri, 27 Oct 2023 07:30:24 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AE59C4339A; Fri, 27 Oct 2023 14:30:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698417024; bh=HqA0zfbW9VztCySYiMvQ/vRTrEs3pyPe0tuGpgEOlvI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FobtRAFdGyRTe4PRYmikUDCGdyCGTYC1ReQnrjPLjXFCM8cHB5oQy1TXboO3KZ1Rw 29IRmuAyY5INuMLwujSD2CxHnnomBmFbla++4xJjx2jcCr4zhcjIE6di7309O+rS11 +OFWiYCzDPI22HNKZr7rx2oqQHEr9bQBLo8i3BToEFAtAvkwhq2Nwa7ycR1QlnuwIL 98ZW1/tw2DSm4WbDHHz7NbUdHxm4oKuvghVm2dYnNe6f3/VJlhuLy9lXuzLKPsr8f+ j4MmsJcW2nBI0RVi2+R/XfiZMivrgpucwA480zAAmLwwFmIltMDmFWXWoCR18pS3LT E74I7nd5DzX+w== Date: Fri, 27 Oct 2023 15:29:51 +0100 From: Jonathan Cameron To: Nuno =?UTF-8?B?U8Oh?= Cc: Marius.Cristea@microchip.com, lars@metafoo.de, robh+dt@kernel.org, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] iio: adc: adding support for pac193x Message-ID: <20231027152951.52a4627f@jic23-huawei> In-Reply-To: References: <20231025134404.131485-1-marius.cristea@microchip.com> <20231025134404.131485-3-marius.cristea@microchip.com> <02ea54ae3a2ab4f0a19232a4df494f71b1de3b00.camel@microchip.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 27 Oct 2023 07:30:55 -0700 (PDT) On Fri, 27 Oct 2023 10:40:21 +0200 Nuno S=C3=A1 wrote: > On Thu, 2023-10-26 at 15:03 +0000, Marius.Cristea@microchip.com wrote: > > Hi Nuno S=C3=A1, > >=20 > > =C2=A0 Thanks for looking over the patch. > >=20 > > On Wed, 2023-10-25 at 16:38 +0200, Nuno S=C3=A1 wrote: =20 > > > EXTERNAL EMAIL: Do not click links or open attachments unless you > > > know the content is safe > > >=20 > > > On Wed, 2023-10-25 at 16:44 +0300, > > > marius.cristea@microchip.com=C2=A0wrote: =20 > > > > From: Marius Cristea > > > >=20 > > > > This is the iio driver for Microchip > > > > PAC193X series of Power Monitor with Accumulator chip family. > > > >=20 > > > > Signed-off-by: Marius Cristea > > > > --- =20 > > >=20 > > > Hi Marius, > > >=20 > > > I'll be honest and I just looked at this for 5min. But I'm seeing > > > things like > > > shunt resistors, vsense, power, energy... This seems to me that it > > > belong to > > > drivers/hwmon. Any special reason for IIO? > > > =20 > >=20 > > =C2=A0 Yes, this device is at the boundary between IIO and HWMON if you= are > > looking just at the "shunt resistors, vsense, power, energy". The > > device also has ADC internaly that can measure voltages (up to 4 > > channels) and also currents (up to 4 channels). Current is measured as > > voltage across the shunt_resistor. > > =20 >=20 > I think this alone is not justification but... >=20 > > =C2=A0 As I said before: I was thinking to start with a simple driver (= this > > one that is more apropiate to be a HWMON) and add more functionality > > later (like data buffering that is quite important for example if > > someone wants to profile power consumtion of the procesor itself, or a > > pheriperic, or a battery, this kind of functionality was requested by > > our customers). > > =20 >=20 > having buffering support already makes a case for IIO, yes. >=20 > Hmm, I'm also just realizing this is v2 and indeed you already justified = the very > same question in v1. Sorry for noise! I'd suggest adding some text to the cover letter to explain this so you can hopefully avoid being asked on v3 :) Also for cases like this that sit at the boundary we tend to also cc the hwmon maintainers so they are aware. It can help us to make more consistent decisions on where a future device belongs. I'm not against having this in IIO, but nice to work by consensus and avoid anyone getting a surprise. Jonathan >=20 > - Nuno S=C3=A1 > > =20 >=20