Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3143832iog; Mon, 20 Jun 2022 12:22:56 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t2cJW7cyijoPO6j5I3l8kjiuY6rLq6RndiY3c20FY8jH8NqlO4YQgHYzfWfJ1v7g8kAiHP X-Received: by 2002:a63:be41:0:b0:40c:b4a8:dee9 with SMTP id g1-20020a63be41000000b0040cb4a8dee9mr6538826pgo.107.1655752976483; Mon, 20 Jun 2022 12:22:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655752976; cv=none; d=google.com; s=arc-20160816; b=SZSDdCSZE/b5iATLiKEmAxrNRSQ+BaYYeUMpu946gU2q6ACYzrX60VZ5fT76L4YIo9 EfB0vgnrQ6eJT4wHpvp3himlZI0GQ2eHit5hWc3I/oy0S5N9eE/wBfFHHZRMjxPFHgKM JJnznon2kAzzm0aWXoHLmf+07+qCKk5bAJ6nuK/v329q5HLJp+v302jpq34//HKIB7DJ RcD8jaS1vQXhXKsT9AK77ZeSH+T86zRiSFLqggvUBnaTJX1/mQcqyZj429hdveFT1IEG GcRFPKh5gXf8jbVgKI54C8S4sut1WfVRw8UZkkXzzEK4BBQ7FWbjfcgrdB0cH6aR4b/l zpyw== 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=lGVk7QZLpP0Lr3q+4qWt9R+fHzNccJJ8txr43zBHWGo=; b=rkp0ZsGqcX6ENZGhuVZ73IjLtFYljBvHpSRmrtR/s3mmPgZ0QsGeqMystvjeau3A85 ZEeU5067971ofmVLJljCx7Vfsh5lbA47blXH3K19liMWTlh6i45NoNaXSUyu+JrXNp+o i1bsQghsb5G4A37e+m3ReCcxsWvMvxHHV19WzCQwK4Kv6lrETz2CIy+1rAGPgkuBaRJd Pz0sXx/nHhhnzoQUkdDC4S5w5dZsaZyzi+PmlUrgEChPrzf2md7pWBVwcU69x/y7lZJv a16kwqY2/L3ytIwXY6RDhLwMU0hMsnL8qZ11XAWedtIqBSM72uoVReF+twTm5fQwmzUR UJyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YvLC0E9Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s23-20020a170902b19700b001690142da59si15349569plr.100.2022.06.20.12.22.44; Mon, 20 Jun 2022 12:22:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YvLC0E9Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245515AbiFTSfO (ORCPT + 99 others); Mon, 20 Jun 2022 14:35:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245555AbiFTSfM (ORCPT ); Mon, 20 Jun 2022 14:35:12 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 274FD1EC6C; Mon, 20 Jun 2022 11:35:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BA4B8B812AB; Mon, 20 Jun 2022 18:35:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47C0EC3411B; Mon, 20 Jun 2022 18:35:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655750108; bh=3mSgNT10b4IjzPgWigmKhCRzl+Ti+EYL/1+uQFwMp0Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YvLC0E9QtvNI2VOwXPiBN5gXjqLr5rXxoHEMOQ5sUWXijZHmHqlZZoWVN+2mGVmI5 EP/BOzf3vOI83Nawe3EQM58nzxZAe6m0FgdZ/DpWODRGH6Cl5/dPjtx+o4oAnzLIe+ vLUBc4kyvZpN9kK3lF4+sU0CqlKEfutvlSARgTIOtq+LXAz47jazByohylHteahUL9 GvRGmi+FKujuIbhBWASw1vLw0pkSfwU5G6iFYlht1leiC50pXx4jiMfj9TBX8+yLXS aAQGL6ZkuYyzt59Xj0R0hgJ8s3YfDEkKxYFZGovzaJGKdKQKHWXfeSG+Uq/2fOKYAW v/wxDubWF0gSA== Date: Mon, 20 Jun 2022 19:35:00 +0100 From: Jonathan Cameron To: ChiaEn Wu Cc: lars@metafoo.de, matthias.bgg@gmail.com, lee.jones@linaro.org, Daniel Thompson , jingoohan1@gmail.com, pavel@ucw.cz, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, szunichen@gmail.com, ChiaEn Wu Subject: Re: [PATCH v2 07/15] Documentation: ABI: testing: mt6370: Add ADC sysfs guideline Message-ID: <20220620193500.145f05b9@jic23-huawei> In-Reply-To: References: <20220613111146.25221-1-peterwu.pub@gmail.com> <20220613111146.25221-8-peterwu.pub@gmail.com> <20220618164820.2eeb8ae8@jic23-huawei> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; 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=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 20 Jun 2022 14:00:43 +0800 ChiaEn Wu wrote: > Hi Jonathan, >=20 > Thanks for your helpful comments, and I have some questions want to > ask you below. >=20 > Jonathan Cameron =E6=96=BC 2022=E5=B9=B46=E6=9C=8818= =E6=97=A5 =E9=80=B1=E5=85=AD =E6=99=9A=E4=B8=8A11:39=E5=AF=AB=E9=81=93=EF= =BC=9A > > > > On Mon, 13 Jun 2022 19:11:38 +0800 > > ChiaEn Wu wrote: > > =20 > > > From: ChiaEn Wu > > > > > > Add ABI documentation for mt6370 non-standard ADC sysfs interfaces. > > > > > > Signed-off-by: ChiaEn Wu > > > --- > > > .../ABI/testing/sysfs-bus-iio-adc-mt6370 | 36 +++++++++++++++++= ++ > > > 1 file changed, 36 insertions(+) > > > create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-adc-mt6370 > > > > > > diff --git a/Documentation/ABI/testing/sysfs-bus-iio-adc-mt6370 b/Doc= umentation/ABI/testing/sysfs-bus-iio-adc-mt6370 > > > new file mode 100644 > > > index 000000000000..039b3381176a > > > --- /dev/null > > > +++ b/Documentation/ABI/testing/sysfs-bus-iio-adc-mt6370 > > > @@ -0,0 +1,36 @@ > > > +What: /sys/bus/iio/devices/iio:deviceX/in_voltage0_ra= w =20 > > > > Unfortunately the kernel documentation build scripts do no support dupl= icating > > standard ABI for particular devices so as to provide more information. > > Hence you can't have anything in this file. > > =20 >=20 > I want to confirm with you again, > because my ABI file duplicates with standard sysfs-bus-iio (voltage, > current, and temperature channels), > Should I just remove this ABI file and modify the code of mt6370-adc > to meet your expectations?? yes. >=20 > > =20 > > > +KernelVersion: 5.18 > > > +Contact: chiaen_wu@richtek.com > > > +Description: > > > + Indicated MT6370 VBUS ADC with lower accuracy(+-75mA) = =20 > > Curious though, voltage with a mA accuracy range? =20 >=20 > Yes, this description is based on the data sheet. Weird :)=20 >=20 > > This scale should be presented directly to userspace anyway so no need > > for this doc. > > =20 > > > + higher measure range(1~22V) > > > + Calculating with scale returns voltage in uV =20 > > > > No. All channels return in mV. That's the ABI requirement as > > in sysfs-bus-iio and we cannot vary if for particular drivers. If we d= id > > no generic tooling would work. =20 >=20 > Ok, I got it! >=20 > > =20 > > > + > > > +What: /sys/bus/iio/devices/iio:deviceX/in_voltage1_raw > > > +KernelVersion: 5.18 > > > +Contact: chiaen_wu@richtek.com > > > +Description: > > > + Indicated MT6370 VBUS ADC with higher accuracy(+-30mA) > > > + lower measure range(1~9.76V) > > > + Calculating with scale offset returns voltage in uV > > > + > > > +What: /sys/bus/iio/devices/iio:deviceX/in_voltage4_raw > > > +KernelVersion: 5.18 > > > +Contact: chiaen_wu@richtek.com > > > +Description: > > > + Indicated MT6370 TS_BAT ADC > > > + Calculating with scale returns voltage in uV > > > + > > > +What: /sys/bus/iio/devices/iio:deviceX/in_voltage7_raw > > > +KernelVersion: 5.18 > > > +Contact: chiaen_wu@richtek.com > > > +Description: > > > + Indicated MT6370 CHG_VDDP ADC > > > + Calculating with scale returns voltage in mV > > > + > > > +What: /sys/bus/iio/devices/iio:deviceX/in_temp8_raw > > > +KernelVersion: 5.18 > > > +Contact: chiaen_wu@richtek.com > > > +Description: > > > + Indicated MT6370 IC junction temperature > > > + Calculating with scale and offset returns temperature i= n degree =20 >=20 > Shall I modify the scale of temperature to milli degrees in > mt6370-adc.c and remove this item?? yes. Thanks, Jonathan >=20 > > =20 >=20 > Best regards, > ChiaEn Wu