Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp991892pxk; Fri, 18 Sep 2020 00:23:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHHrarGVxY8OGHR3X5uXRKtCtYGXAYeq2WQH+vdKqVZjRGLekvXsY1UpZQzvQTIbEto1u5 X-Received: by 2002:a17:906:941a:: with SMTP id q26mr33887991ejx.496.1600413816454; Fri, 18 Sep 2020 00:23:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600413816; cv=none; d=google.com; s=arc-20160816; b=LPqYmxSwODpBgquQEixIvEx7/dV/V7lLAr+yDkhngjUW8YK25Jfh/GNJrfvrEfYnjE vFfjjwzZ1acX5OzJZ4aV9Z/7C0Oew3IWpf9+TwvJPb44pyKRhH+lcEdRnG8lOn00xqo4 mn1lH1szrI7bCsFc5VzPFsKuOoW2sPwyes1otrhRiRXu+73jwnEtqv+iFQxakfrhq4Qb ueahYVjycmtH1WftaLq/UO/ec9U/GpZ2PTEfXKZW1dn5eRv6+OLIN3BSRh5mLFvcEaIr Ttq1wCynbynSbvXGHTvoB/HDgnaOEjaKRPPTWwju19G9LxPEqjhfMVd+T9nvljE3AI2V /z3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Ju0TrxIs6FJ7xW3Z7H2xcox4RM+XbSHCtVVVywc+J3U=; b=czP7hwCaexgiWV9FEK8hiBAgoii/kvWp5vtKyJMuNGbaIrvLTyW27g/yczs+QDE6Zv d+Ee4EIERC5lWfOMGchhmgWUt0YeLmJxeR4QciBtWQTTXE5k0qBzudBbKSwKn2muSqdl gwOL+Qnj+Ndu2quiJT84SibJ2IqI5hjUItILZuUZHlqApCPTafWOahfPjJQ/k7B4eiAP MIG/N9hMZozbZtZnSIazKa3SnojrGvrSZEiGazk0xrYAMyGr8ihBT0Z6GJ9O8PcZ3GTE QMXYuFd/JN0DYTYc6pzuVGcyDpuBXp/WawFCx2gPY4o/Jrz9Esfrdk1odmLpzaV0KNWG nKTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=D1hAU194; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d8si1492389edt.19.2020.09.18.00.23.13; Fri, 18 Sep 2020 00:23:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=D1hAU194; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726250AbgIRHV7 (ORCPT + 99 others); Fri, 18 Sep 2020 03:21:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbgIRHV7 (ORCPT ); Fri, 18 Sep 2020 03:21:59 -0400 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75036C06174A; Fri, 18 Sep 2020 00:21:59 -0700 (PDT) Received: by mail-io1-xd44.google.com with SMTP id g128so5759877iof.11; Fri, 18 Sep 2020 00:21:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Ju0TrxIs6FJ7xW3Z7H2xcox4RM+XbSHCtVVVywc+J3U=; b=D1hAU194FOUNNK3xN6BVA5UEh6cmkI4coh/bY3oUGjv2g5B1UPKStEj7aDce50HTSs reqEMLSZP3Si+OWqovmffFtQqGesmdeNnwY+kbtaSQugpsNRZgXOpJEGDiNRpihrjLG4 hprwG222jyoiThqFbCLYtaqU8yqOnK6mJVQxxoYnw4TY/dh3cIYysMDls68PL+C8pExp kxfQlWxpu2r7bWWYpsi/hsIlq01sqEBOaUqG27Hnmdv13oYjw8tE5pDP4ZkygqqZ2C2E 0imCirahv95O1NQDRZVfDPf+XoZ1A4/Ad4c6idUSuBoKof7KEtv21Uj2tOdBRRaiGCHi ILmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Ju0TrxIs6FJ7xW3Z7H2xcox4RM+XbSHCtVVVywc+J3U=; b=fcq+mHCqAcp0DZZXqPdOc2Cdc+oQBGbhrMf9RbTfxqBxDBVb0TTDstNMSVsq8HlCoZ iaZR7XPAqt7QfUBgnrQ13b24Vrp8IYjE1c+gqEq7TVRIBx33fZG5L+Dmq+DpbvuFLMFZ lvCAi8AiqAcuiz4sn++nOvZ4i6kyBCDBptadsJFZzKAZ/3KJjvmQ8Scj9nVLPfzm5r1I Y/zCs9NGE3kj7QdrTDtOyf2R6lKHuolmkkabgSUL5EXLrNpjty+pKQppc6tn4Wh4+/X+ SGxz4EeW8RS0QnhpFisHhQxtmFnQDwNq7BG8Tyx3NXg5kSPvcLYEHdQQV1cf3m2DQCwq +VlA== X-Gm-Message-State: AOAM533pV6ysgDNn5va0Zylz5TfgCBuUZbPuIj5T7hSTjoyLgxxWgBTn KFfOBAm9Xu7NdVjrtrS1TMh5EtEfcGiCrO1OoXM= X-Received: by 2002:a5e:8e0a:: with SMTP id a10mr26830525ion.200.1600413718688; Fri, 18 Sep 2020 00:21:58 -0700 (PDT) MIME-Version: 1.0 References: <1600191369-28040-1-git-send-email-gene.chen.richtek@gmail.com> <1600191369-28040-3-git-send-email-gene.chen.richtek@gmail.com> <20200917184256.71328701@archlinux> In-Reply-To: <20200917184256.71328701@archlinux> From: Gene Chen Date: Fri, 18 Sep 2020 15:21:44 +0800 Message-ID: Subject: Re: [PATCH v4 2/3] Documentation: ABI: testing: mt6360: Add ADC sysfs guideline To: Jonathan Cameron Cc: Matthias Brugger , knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-arm Mailing List , "moderated list:ARM/Mediatek SoC support" , Linux Kernel Mailing List , Gene Chen , Wilma.Wu@mediatek.com, shufan_lee@richtek.com, cy_huang@richtek.com, benjamin.chao@mediatek.com, Cristian Pop Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jonathan Cameron =E6=96=BC 2020=E5=B9=B49=E6=9C=8818=E6= =97=A5 =E9=80=B1=E4=BA=94 =E4=B8=8A=E5=8D=881:43=E5=AF=AB=E9=81=93=EF=BC=9A > > On Wed, 16 Sep 2020 01:36:08 +0800 > Gene Chen wrote: > > > From: Gene Chen > > > > Add ABI documentation for mt6360 ADC sysfs interfaces. > > > > Signed-off-by: Gene Chen > Would you consider using the proposed label attribute for channels? > > https://lore.kernel.org/linux-iio/20200916132115.81795-1-cristian.pop@ana= log.com/T/#u > > I'm hoping that will remove the need to have ext name used in the majorit= y of > cases and would like to know if it would work for you? > It may not work for this particular case of course. > > Other comments inline. > because of ADC layout is fixed, I can't switch channel to specific purpose for userspace. > > --- > > Documentation/ABI/testing/sysfs-bus-iio-adc-mt6360 | 83 ++++++++++++++= ++++++++ > > 1 file changed, 83 insertions(+) > > create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-adc-mt6360 > > > > diff --git a/Documentation/ABI/testing/sysfs-bus-iio-adc-mt6360 b/Docum= entation/ABI/testing/sysfs-bus-iio-adc-mt6360 > > new file mode 100644 > > index 0000000..4b1c270 > > --- /dev/null > > +++ b/Documentation/ABI/testing/sysfs-bus-iio-adc-mt6360 > > @@ -0,0 +1,83 @@ > > +What: /sys/bus/iio/devices/iio:deviceX/in_voltage_USBID= _input > > > The mixture of case is a bit ugly. Could we do > in_voltage_usbin_input? > ACK > > +KernelVersion: 5.8.0 > > +Contact: gene_chen@richtek.com > > +Description: > > + Indicated MT6360 USBID ADC which connected to connector I= D pin. > > + Reading returns voltage in uV > > + > > +What: /sys/bus/iio/devices/iio:deviceX/in_voltage_VBUSD= IV5_input > > > +KernelVersion: 5.8.0 > > +Contact: gene_chen@richtek.com > > +Description: > > + Indicated MT6360 VBUS ADC with high accuracy > > + Reading returns voltage in uV > > Why would we ever read the low accuracy version? > > > + > > +What: /sys/bus/iio/devices/iio:deviceX/in_voltage_VBUSD= IV2_input > > +KernelVersion: 5.8.0 > > +Contact: gene_chen@richtek.com > > +Description: > > + Indicated MT6360 VBUS ADC with low accuracy > > + Reading returns voltage in uV > > + > > +What: /sys/bus/iio/devices/iio:deviceX/in_voltage_VSYS_= input > > +KernelVersion: 5.8.0 > > +Contact: gene_chen@richtek.com > > +Description: > > + Indicated MT6360 VSYS ADC > > + Reading returns voltage in uV > > + > > +What: /sys/bus/iio/devices/iio:deviceX/in_voltage_VBAT_= input > > +KernelVersion: 5.8.0 > > +Contact: gene_chen@richtek.com > > +Description: > > + Indicated MT6360 VBAT ADC > > + Reading returns voltage in uV > > + > > +What: /sys/bus/iio/devices/iio:deviceX/in_current_IBUS_= input > > +KernelVersion: 5.8.0 > > +Contact: gene_chen@richtek.com > > +Description: > > + Indicated MT6360 IBUS ADC > > + Reading returns current in uA > Given voltage and current are already clear from the channel type, > could we avoid the repetition? > > in_current_bus_input perhaps? > ACK > > + > > +What: /sys/bus/iio/devices/iio:deviceX/in_current_IBAT_= input > > +KernelVersion: 5.8.0 > > +Contact: gene_chen@richtek.com > > +Description: > > + Indicated MT6360 IBAT ADC > > + Reading returns current in uA > > + > > +What: /sys/bus/iio/devices/iio:deviceX/in_voltage_CHG_V= DDP_input > > +KernelVersion: 5.8.0 > > +Contact: gene_chen@richtek.com > > +Description: > > + Indicated MT6360 CHG_VDDP ADC > > + Reading returns voltage in uV > > + > > +What: /sys/bus/iio/devices/iio:deviceX/in_temp_TEMP_JC_= input > > +KernelVersion: 5.8.0 > > +Contact: gene_chen@richtek.com > > +Description: > > + Indicated MT6360 IC junction temperature > > + Reading returns temperature in degree > > + > > +What: /sys/bus/iio/devices/iio:deviceX/in_voltage_VREF_= TS_input > > +KernelVersion: 5.8.0 > > +Contact: gene_chen@richtek.com > > +Description: > > + Indicated MT6360 VREF_TS ADC > > + Reading returns voltage in uV > > + > > +What: /sys/bus/iio/devices/iio:deviceX/in_voltage_TS_in= put > > +KernelVersion: 5.8.0 > > +Contact: gene_chen@richtek.com > > +Description: > > + Indicated MT6360 TS ADC > > + Reading returns voltage in uV > > + > > +What: /sys/bus/iio/devices/iio:deviceX/timestamp > > +KernelVersion: 5.8.0 > > +Contact: gene_chen@richtek.com > > +Description: > > + Indicated MT6360 timestamp > > + Reading returns current timestamp in ms > > That's an odd bit of ABI. Why would we want to read the current timestam= p from > sysfs? Timestamps in IIO also tend to be in nano seconds. > > > > ACK, I will remove this.