From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88FC3C433E0 for ; Thu, 25 Feb 2021 23:35:13 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2D90064EDB for ; Thu, 25 Feb 2021 23:35:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2D90064EDB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ag8B53pAzr4MZ6XbW0XdgDJbiVADWQ6tGxMc4ZRpCrs=; b=aRJR1g2GamyD9zA1+KZuGHls6 21VxFwf2aS0cK3zKB+t1ONX4BdXWKkCBr6H6BM4bwpo0wBYzTYpf1ypeFukk9TEMh1T8QAkDPLAPq s3ABwlnCIhYPDJcZFBeRIgcGKaBGuiIsyPb+D0cAK3tq/nMbLiIYOUHbsEIndFuvh6lrnbo6qqOYd +hTiiUe2l37bIhwtmEvfq0YXUhDRUEws1AkytVjQucjecewyXp3Q4fBez+xe/iOkhGVq/uGvC/k0f VSvGWgsxAWjbRaKhnn+fakwEez87T9WldeeuCqvp4UTz2pcYg1xcFykVycATDx8gmIBZdYTWX7SJU 3Q9RQrD3g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFQ8B-0004BR-19; Thu, 25 Feb 2021 23:33:15 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFQ87-0004Af-7P for linux-arm-kernel@lists.infradead.org; Thu, 25 Feb 2021 23:33:12 +0000 Received: by mail-pj1-x1031.google.com with SMTP id l18so4560397pji.3 for ; Thu, 25 Feb 2021 15:33:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bryi5nIeAqPN6gv7PQEAJOmSmh8foFZDgMCzK44/Hyg=; b=iqG/f6sZQa2houoo+VxHHF5MXsX3q6ya/wwhRKCc0jn/JbAnFB2nwn6AcRC+SMb8by TtrQtNyfQLBdLC/7ipEnKQMfykNO7XppSRejPMrIAI42mzlddkR4Va38kmWC/dOZB9Q3 yQW81DF+qMabSjoY3OIDOsEtdv9q8R5ISUZ9OWeos27i6/ounQu/uOVvTXEUVN5hmqY6 d7ndpm/Mvctmq5r6ewk5IAPWvqhsrbrcnnwAI4QZ2AVAD6mAjTOtd1//QPmJGUZkOJ+N a5X290eJgasRN/rkCxp055Hbb+DIQOTEEP2DFwWZomTMZQIT6OT5ZWNwn0wLIwQHwHVL oT6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bryi5nIeAqPN6gv7PQEAJOmSmh8foFZDgMCzK44/Hyg=; b=GlLBypDkIq7L+w+rHR+94rzNwf2Taunew8RMf1vIosydj83FlIsR7ff/5ssbE/BknW c6BX4xmMOzIdbrVmHMyQaxHvmERwCJt+HH0QtpIHNQLJQXT6L2zj6Xh6fny28z9C0G+z FHepuiXBR3rhYm3LIxoSgyRiQH8VFliSLfzVu+cPrVaiejBm05Qx3MZ1QojQZC9NiRlB YMxRjotO0PEh8wC1QXKwxp71KIJ0J4pSNCYtZj5E59ZhjTAICldEV4ggw0IwR4xF+gvp NVFdWe8d6mjqx4+XrPNXtMRiaOq4+ERDry/eIBE/GVrNWl5cNLpbGjfONsUWDw1oRP63 MLhQ== X-Gm-Message-State: AOAM532eJ19nLvL3fLbgOzXF5tdKh3Ks6Uu/Sod548gYX1/0Dz187i2m sLOOclzLRCrVSXTa0NksPx0= X-Google-Smtp-Source: ABdhPJxMEOKq3iRqEYUSu0q+taLEkz0dkFYCzdzEkJXmSR/VAt/A+73uvo8HhMqtFBoeA3pTOYRZhQ== X-Received: by 2002:a17:902:c407:b029:e3:cfa7:e300 with SMTP id k7-20020a170902c407b02900e3cfa7e300mr203101plk.49.1614295988431; Thu, 25 Feb 2021 15:33:08 -0800 (PST) Received: from shinobu (113x37x72x20.ap113.ftth.ucom.ne.jp. [113.37.72.20]) by smtp.gmail.com with ESMTPSA id 8sm7577762pfp.171.2021.02.25.15.33.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 15:33:07 -0800 (PST) Date: Fri, 26 Feb 2021 08:32:59 +0900 From: William Breathitt Gray To: Jonathan Cameron Subject: Re: [PATCH v8 19/22] counter: Implement extension*_name sysfs attributes Message-ID: References: <20210214180913.05bd3498@archlinux> <20210221140507.0a5ef57f@archlinux> MIME-Version: 1.0 In-Reply-To: <20210221140507.0a5ef57f@archlinux> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210225_183311_483351_217AD185 X-CRM114-Status: GOOD ( 27.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kamel.bouhara@bootlin.com, gwendal@chromium.org, a.fatoum@pengutronix.de, david@lechnology.com, linux-iio@vger.kernel.org, patrick.havelange@essensium.com, alexandre.belloni@bootlin.com, mcoquelin.stm32@gmail.com, linux-kernel@vger.kernel.org, o.rempel@pengutronix.de, Dan Carpenter , kernel@pengutronix.de, fabrice.gasnier@st.com, syednwaris@gmail.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, alexandre.torgue@st.com Content-Type: multipart/mixed; boundary="===============4298858182748190546==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============4298858182748190546== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="g5C8206GHyZn93ao" Content-Disposition: inline --g5C8206GHyZn93ao Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 21, 2021 at 02:05:07PM +0000, Jonathan Cameron wrote: > On Fri, 19 Feb 2021 17:51:37 +0900 > William Breathitt Gray wrote: >=20 > > On Sun, Feb 14, 2021 at 06:09:13PM +0000, Jonathan Cameron wrote: > > > On Fri, 12 Feb 2021 21:13:43 +0900 > > > William Breathitt Gray wrote: > > > =20 > > > > The Generic Counter chrdev interface expects users to supply extens= ion > > > > IDs in order to select extensions for requests. In order for users = to > > > > know what extension ID belongs to which extension this information = must > > > > be exposed. The extension*_name attribute provides a way for users = to > > > > discover what extension ID belongs to which extension by reading the > > > > respective extension name for an extension ID. > > > >=20 > > > > Cc: David Lechner > > > > Cc: Gwendal Grignou > > > > Cc: Dan Carpenter > > > > Signed-off-by: William Breathitt Gray > > > > --- > > > > Documentation/ABI/testing/sysfs-bus-counter | 9 ++++ > > > > drivers/counter/counter-sysfs.c | 51 +++++++++++++++++= ---- > > > > 2 files changed, 50 insertions(+), 10 deletions(-) > > > >=20 > > > > diff --git a/Documentation/ABI/testing/sysfs-bus-counter b/Document= ation/ABI/testing/sysfs-bus-counter > > > > index 6353f0a2f8f8..847e96f19d19 100644 > > > > --- a/Documentation/ABI/testing/sysfs-bus-counter > > > > +++ b/Documentation/ABI/testing/sysfs-bus-counter > > > > @@ -100,6 +100,15 @@ Description: > > > > Read-only attribute that indicates whether excessive noise is > > > > present at the channel Y counter inputs. > > > > =20 > > > > +What: /sys/bus/counter/devices/counterX/countY/extensionZ_name > > > > +What: /sys/bus/counter/devices/counterX/extensionZ_name > > > > +What: /sys/bus/counter/devices/counterX/signalY/extensionZ_name > > > > +KernelVersion: 5.13 > > > > +Contact: linux-iio@vger.kernel.org > > > > +Description: > > > > + Read-only attribute that indicates the component name of > > > > + Extension Z. =20 > > >=20 > > > Good to say what form this takes. =20 > >=20 > > Do you mean a description like this: "Read-only string attribute that > > indicates the component name of Extension Z"? >=20 > My expectation would be that the possible strings are tightly constrained > (perhaps via review). So I'd like to see what they are and a brief descri= ption > of what each one means. >=20 > Jonathan Okay I see what you mean now. These names will match the sysfs attribute filenames. So for example, if Extension 9 of Count 2 of Counter device is /sys/bus/counter/devices/counter4/count2/ceiling, then the attribute /sys/bus/counter/devices/counter4/count2/extension9_name will hold a value of "ceiling". The idea is that the user walks down through each extension*_name to find sysfs attribute name for the Extension that they want. When they find the desired Extension name in say sysfs attribute extension9_name, then they know 9 is the ID number for that Extension. There is an alternative design I was considering: instead of extension*_name attributes, we could have each Extension sysfs attribute have a matching *_extension_id attribute which provides the respective Extension ID. So for example, using the same Extension as before: /sys/bus/counter/devices/counter4/count2/ceiling_extension_id will hold a value of 9. Do you think this alternative design would be more intuitive to users? William Breathitt Gray --g5C8206GHyZn93ao Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEk5I4PDJ2w1cDf/bghvpINdm7VJIFAmA4M6EACgkQhvpINdm7 VJIBCg/+JWYA6xMb2Q9RpprWLkpN2p4IE7zL9kEZE+WzE6aHG1+usGMbF3AQMIO9 LqssPDGtbchunSQk7RHkT8OMuUXIRaiIl1tE1Lefh+Tylaf4+VLbJo1t+I21MmLr LZDV8vnQnwFjhZhPgfOJo+dnOY1SldnRcZzfER607uWOb3xtVpHsdpWaS+IMwt6e Yn0Qe8URcv05YGrw4N2re9HtNU01hwlMTyKst7pNyY15MRwmPI7c9sBWC8nWKaCZ butQTV3VGDUA3VZ/DVwo0aOZ8HFbWsOpZKGII2IGNIvVgXBCKrkIw1W9wX9mHi4t s5uuIW0XBys3SzaxqV/zzV2jtQy/TexhjLMBELX+4M4WMeAbAGoHUA337QoI3EP1 Z0b28249Cax2iddXR90cisXqYMd8F/9fCaMzgR3lQF/pC3wB9LCk9JhCPaogtRRC ZleiZZA3/cgnYFiUlOcb4mfQGlxOSk2fs/EoXdfKVbmuxaHddiqFZJxImv0TnrWg Gag0WcYipOglgAQyJUwP36FBerkcqUc463KF7BtSp3in5YMPhR5xgOxS3nlK2rKO ySKzH/JjLsIQ1vaKb/Z42sPNJ+7XANxp+Wuoz2kKwHWevljJybwJG+AAIwMlyrqc osUnIPljV010+LeG2LU9AS7tdrN3l49nDY6XS4ITC3HXeTHIzuo= =IeB7 -----END PGP SIGNATURE----- --g5C8206GHyZn93ao-- --===============4298858182748190546== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============4298858182748190546==--