Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2873855pxv; Mon, 12 Jul 2021 04:07:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGXDvAVhy/ePhNu32aIcbmgElOTfC13cjMmwpbbjP4vZeYbYUqCnaBgL0Z7jDTimiJjm2e X-Received: by 2002:a92:509:: with SMTP id q9mr1759075ile.239.1626088069152; Mon, 12 Jul 2021 04:07:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626088069; cv=none; d=google.com; s=arc-20160816; b=YgRvJ5DENL+CQwlQgZodv82yk3UBlsymzrPJ2ScrMFJtL8ADdIz93FgfsjnPj0TawG BGQ/eTET8xWDzVeyg3xy0KoCgCKeL7v3jm6fq07wr0YD2GelXzDUgX7rsI5Cm84+Dm4t U9c3WA+RCbJVr9XJEj4ySKJhF31/fUvgq+hSR8mAMyT6DzgTYKeqGJ3pfOw/1b8cLfSY h/FC6XCSesMD2i093ACi5gFsCrmp42igaM98JSxKhZy5cA/WYsQvrfyvcmLkZT3EZF9J P39sZ2/QCmark61qVxv66/mWlCRZJCgZ2L0Vgn4ucfo9QSZbvU/jJJSxGRFy6wt8vwov XjHQ== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=uO4T88cMOmGazhHiXXVd+768Ke78T4Zv7yPANEnlzrg=; b=elO7GqsZRv7IikEk4gvth30I7Rf3YAbVTgRaWG0cxwfdM6ffp3fW1s3UFi4KnLwK9A HxRasHUJtyQO2gEe4hElZA+T1urQ57VT5nUwIDnOpbrYtZhpmSqMPxWfImvmUEm3Fi1V 82hQQpeqaAhwHYW4VaL//fOUtdOSfEl19vqhpGPVpvhoiAEEgCkptMzADLvfF8mYcjOC L+QtoZGWOeNg0PdGA2L9YtT8aE3JBUZnSZSKVnWMCNLXf433kt/XE9I/pzw6XXLKzUws TRgfYy2/J8owo7C9vz47ZaKobaIcMLh0Xw4L/ssx5T5iyotKGSY1F9t6ElvfPvpwA9AL +7TA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si17408731ild.162.2021.07.12.04.07.37; Mon, 12 Jul 2021 04:07:49 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231841AbhGLKW0 (ORCPT + 99 others); Mon, 12 Jul 2021 06:22:26 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3379 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231425AbhGLKWS (ORCPT ); Mon, 12 Jul 2021 06:22:18 -0400 Received: from fraeml711-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4GNfbt4Jx0z6GFRQ; Mon, 12 Jul 2021 18:08:26 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml711-chm.china.huawei.com (10.206.15.60) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 12 Jul 2021 12:19:28 +0200 Received: from localhost (10.47.25.8) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 12 Jul 2021 11:19:27 +0100 Date: Mon, 12 Jul 2021 11:19:09 +0100 From: Jonathan Cameron To: David Lechner CC: Jonathan Cameron , William Breathitt Gray , , , , , , , , , , , , , , , , , Dan Carpenter , Mauro Carvalho Chehab Subject: Re: [PATCH v12 14/17] counter: Implement *_component_id sysfs attributes Message-ID: <20210712111909.00004f72@Huawei.com> In-Reply-To: <72d6513c-c7fc-c53d-b750-ebd2e8f3b848@lechnology.com> References: <0e04a9e6455faf171e5dd7885676e55b5321b1ea.1625471640.git.vilhelm.gray@gmail.com> <20210711142800.60e94cc7@jic23-huawei> <72d6513c-c7fc-c53d-b750-ebd2e8f3b848@lechnology.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.25.8] X-ClientProxiedBy: lhreml727-chm.china.huawei.com (10.201.108.78) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 11 Jul 2021 09:08:29 -0500 David Lechner wrote: > On 7/11/21 8:28 AM, Jonathan Cameron wrote: > > On Sat, 10 Jul 2021 12:06:53 -0500 > > David Lechner wrote: > > > >> On 7/5/21 3:19 AM, William Breathitt Gray wrote: > >>> The Generic Counter chrdev interface expects users to supply component > >>> IDs in order to select extensions for requests. In order for users to > >>> know what component ID belongs to which extension this information must > >>> be exposed. The *_component_id attribute provides a way for users to > >>> discover what component ID belongs to which respective extension. > >>> > >>> Cc: David Lechner > >>> Cc: Gwendal Grignou > >>> Cc: Dan Carpenter > >>> Signed-off-by: William Breathitt Gray > >>> --- > >>> Documentation/ABI/testing/sysfs-bus-counter | 16 ++++++++++- > >>> drivers/counter/counter-sysfs.c | 30 ++++++++++++++++----- > >>> 2 files changed, 39 insertions(+), 7 deletions(-) > >>> > >>> diff --git a/Documentation/ABI/testing/sysfs-bus-counter b/Documentation/ABI/testing/sysfs-bus-counter > >>> index 9809d8a47431..e0e99adb0ecc 100644 > >>> --- a/Documentation/ABI/testing/sysfs-bus-counter > >>> +++ b/Documentation/ABI/testing/sysfs-bus-counter > >>> @@ -203,12 +203,26 @@ Description: > >>> both edges: > >>> Any state transition. > >>> > >>> +What: /sys/bus/counter/devices/counterX/countY/ceiling_component_id > >>> +What: /sys/bus/counter/devices/counterX/countY/floor_component_id > >>> +What: /sys/bus/counter/devices/counterX/countY/count_mode_component_id > >>> +What: /sys/bus/counter/devices/counterX/countY/direction_component_id > >>> +What: /sys/bus/counter/devices/counterX/countY/enable_component_id > >>> +What: /sys/bus/counter/devices/counterX/countY/error_noise_component_id > >>> +What: /sys/bus/counter/devices/counterX/countY/prescaler_component_id > >>> +What: /sys/bus/counter/devices/counterX/countY/preset_component_id > >>> +What: /sys/bus/counter/devices/counterX/countY/preset_enable_component_id > >>> What: /sys/bus/counter/devices/counterX/countY/signalZ_action_component_id > >>> +What: /sys/bus/counter/devices/counterX/signalY/cable_fault_component_id > >>> +What: /sys/bus/counter/devices/counterX/signalY/cable_fault_enable_component_id > >>> +What: /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler_component_id > >>> +What: /sys/bus/counter/devices/counterX/signalY/index_polarity_component_id > >>> +What: /sys/bus/counter/devices/counterX/signalY/synchronous_mode_component_id > >> > >> Could we just write a single line? > >> > >> What: /sys/bus/counter/devices/counterX/signalY/_component_id > > > > Not nice for grepping so I think it's better to call them out explicitly. > > > > There has been a proposal to check this ABI doc against running kernels, and if we have > > too many wild cards that becomes very difficult to do. > > > > Jonathan > > > >> > >>> KernelVersion: 5.15 > > Makes sense. Do we start a new group of similar names with the same > description for each kernel release that includes new attributes then? You've spotted one of the short comings of current format. The scripts that produce the html docs don't cope with multiple version numbers. Mostly for IIO we've just been cynical and not had the correct kernel version for new ABI when it's added. It's not ideal though. The alternative, as you mention is to have a new block. Perhaps we can have that refer back to the existing one if the docs cover the new entries as well. @Mauro: Any suggestions for this? Thanks Jonathan > > >>> Contact: linux-iio@vger.kernel.org > >>> Description: > >>> Read-only attribute that indicates the component ID of the > >>> - respective Synapse of Count Y for Signal Z. > >>> + respective extension or Synapse. > >>>