From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]:39204 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752705AbeCXR2C (ORCPT ); Sat, 24 Mar 2018 13:28:02 -0400 Date: Sat, 24 Mar 2018 17:27:57 +0000 From: Jonathan Cameron To: William Breathitt Gray Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, benjamin.gaignard@st.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 7/8] counter: stm32-timer-cnt: Add sysfs documentation Message-ID: <20180324172757.5350649c@archlinux> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-iio-owner@vger.kernel.org List-Id: linux-iio@vger.kernel.org On Fri, 9 Mar 2018 13:43:44 -0500 William Breathitt Gray wrote: > From: Benjamin Gaignard > > In addition of the generic sysfs-bus-counter ABI stm32-timer-cnt > offerts three functionality: > - enable the counter > - set preset value > - allow to read counter direction > > Signed-off-by: Benjamin Gaignard > Signed-off-by: William Breathitt Gray My main thought here is that there is nothing which doesn't belong in sysfs-bus-counter to my mind anyway. Jonathan > --- > .../ABI/testing/sysfs-bus-counter-stm32-timer-cnt | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > create mode 100644 Documentation/ABI/testing/sysfs-bus-counter-stm32-timer-cnt > > diff --git a/Documentation/ABI/testing/sysfs-bus-counter-stm32-timer-cnt b/Documentation/ABI/testing/sysfs-bus-counter-stm32-timer-cnt > new file mode 100644 > index 000000000000..73328e8e6d7e > --- /dev/null > +++ b/Documentation/ABI/testing/sysfs-bus-counter-stm32-timer-cnt > @@ -0,0 +1,21 @@ > +What: /sys/bus/counter/devices/counterX/countY_direction > +KernelVersion: 4.17 > +Contact: linux-iio@vger.kernel.org > +Description: > + Read-only attribute that indicates the count direction of > + Count Y. Two count directions are available: Forward and > + Backward. Given both existing devices have this, I'm guessing it is generic enough to graduate to the generic sysfs documentation file. > + > +What: /sys/bus/counter/devices/counterX/countY_enable > +KernelVersion: 4.17 > +Contact: linux-iio@vger.kernel.org > +Description: > + Whether channel Y inputs A and B are enabled. Valid attribute > + values are boolean. Given for the previous device we had individual inputs (which to my mind made no sense to disable separately) perhaps we should have this as the generic option. If a driver needs to separately disable the two signals then that is up to it to sort out. At least this way we reduce the guessing any userspace code will need to do in order to turns things on. > + > +What: /sys/bus/counter/devices/counterX/countY_preset > +KernelVersion: 4.17 > +Contact: linux-iio@vger.kernel.org > +Description: > + If the counter device supports preset registers, the preset > + count for channel Y is provided by this attribute. Again, looks pretty generic...