Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Jonathan Cameron <Jonathan.Cameron@Huawei.com>,
	<linux-iio@vger.kernel.org>,
	"Fabrice Gasnier" <fabrice.gasnier@foss.st.com>
Subject: Re: [PATCH 3/4] iio: ABI: stm32-timer-trigger: Fuse unusual ABI into main doc.
Date: Mon, 18 Jul 2022 18:39:05 +0100	[thread overview]
Message-ID: <20220718183905.2de6b3c7@jic23-huawei> (raw)
In-Reply-To: <20220628065119.38ef8aea@sal.lan>

On Tue, 28 Jun 2022 06:51:19 +0100
Mauro Carvalho Chehab <mchehab@kernel.org> wrote:

> Em Mon, 27 Jun 2022 15:09:55 +0100
> Jonathan Cameron <Jonathan.Cameron@Huawei.com> escreveu:
> 
> > On Sun, 26 Jun 2022 23:37:45 +0100
> > Mauro Carvalho Chehab <mchehab@kernel.org> wrote:
> >   
> > > Em Sun, 26 Jun 2022 17:55:10 +0100
> > > Jonathan Cameron <jic23@kernel.org> escreveu:
> > >     
> > > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > > 
> > > > We can't duplicate the description of sampling_frequency. This device
> > > > has some unusual requirements which we solved by giving a
> > > > sampling_frequency of 0 special meaning. As such add a note
> > > > about this unusual usage to the main documentation.
> > > > 
> > > > Whilst I don't particularly like this resolution, it is the best
> > > > I could come up with given earlier discussion on this topic.
> > > > 
> > > > Link: https://lore.kernel.org/linux-iio/20210315101217.00002c50@Huawei.com/
> > > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > > Cc: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
> > > > ---
> > > >  Documentation/ABI/testing/sysfs-bus-iio             | 3 +++
> > > >  Documentation/ABI/testing/sysfs-bus-iio-timer-stm32 | 8 --------
> > > >  2 files changed, 3 insertions(+), 8 deletions(-)
> > > > 
> > > > diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> > > > index 3e00d7f7ee22..e81ba6f5e1c8 100644
> > > > --- a/Documentation/ABI/testing/sysfs-bus-iio
> > > > +++ b/Documentation/ABI/testing/sysfs-bus-iio
> > > > @@ -107,6 +107,9 @@ Description:
> > > >  		relevant directories.  If it affects all of the above
> > > >  		then it is to be found in the base device directory.
> > > >  
> > > > +		The stm32-timer-trigger has the additional characteristic that
> > > > +		a sampling_frequency of 0 is defined to stop sampling.
> > > > +      
> > > 
> > > I would actually say something like:
> > > 
> > > 		A ampling_frequency of 0 means to stop sampling,
> > > 		if supported by the driver.
> > >     
> > 
> > We actively want to stop people doing this without coming
> > to the list and explaining exactly why they need to. The discussion
> > around that one exception was long and involved. So we want
> > them to have to modify this doc to list their part thus raising
> > awareness of them doing this. So far it's in one driver our of many
> > (and to use this feature it needs custom userspace as it is
> > setting up a complex chain of devices, but for other more conventional
> > use, not allowing 0 is fine).
> > 
> > The source of this disagreement is the documentation serves two
> > purposes - for userspace code authors and for kernel developers.
> > Userspace can just not set the value to 0 if it is generic code.
> > 
> > We could add additional ABI element to make userspace aware, but
> > so far only this one device which will run with customer userspace
> > uses this.  Hence we rely on documentation.  
> 
> 
> OK!
> 
> This actually proves the point that duplicated symbols at ABI cause
> troubles, as different implementations could end abusing on what
> it would be expected, like in this case ;-)
> 
> Anyway, feel free to add my reviewed-by to this patch.
Picked up 2 and 3 of this series. 4 was fixed by someone else.

Thanks,

Jonathan

> 
> Regards,
> Mauro
> 
> > 
> > Jonathan
> >   
> > > Either way:
> > > 
> > > Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> > > 
> > >     
> > > >  What:		/sys/bus/iio/devices/iio:deviceX/sampling_frequency_available
> > > >  What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_sampling_frequency_available
> > > >  What:		/sys/bus/iio/devices/iio:deviceX/in_proximity_sampling_frequency_available
> > > > diff --git a/Documentation/ABI/testing/sysfs-bus-iio-timer-stm32 b/Documentation/ABI/testing/sysfs-bus-iio-timer-stm32
> > > > index c4a4497c249a..05074c4a65e2 100644
> > > > --- a/Documentation/ABI/testing/sysfs-bus-iio-timer-stm32
> > > > +++ b/Documentation/ABI/testing/sysfs-bus-iio-timer-stm32
> > > > @@ -90,14 +90,6 @@ Description:
> > > >  		Reading returns the current master modes.
> > > >  		Writing set the master mode
> > > >  
> > > > -What:		/sys/bus/iio/devices/triggerX/sampling_frequency
> > > > -KernelVersion:	4.11
> > > > -Contact:	benjamin.gaignard@st.com
> > > > -Description:
> > > > -		Reading returns the current sampling frequency.
> > > > -		Writing an value different of 0 set and start sampling.
> > > > -		Writing 0 stop sampling.
> > > > -
> > > >  What:		/sys/bus/iio/devices/iio:deviceX/in_count0_preset
> > > >  KernelVersion:	4.12
> > > >  Contact:	benjamin.gaignard@st.com      
> >   


  reply	other threads:[~2022-07-18 17:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-26 16:55 [PATCH 0/4] IIO: Some documentation error and warning fixes Jonathan Cameron
2022-06-26 16:55 ` [PATCH 1/4] iio: ABI: temperature: Unify documentation for thermocouple fault detection Jonathan Cameron
2022-06-26 22:33   ` Mauro Carvalho Chehab
2022-06-27 14:18     ` Jonathan Cameron
2022-06-28  6:44       ` Mauro Carvalho Chehab
2022-07-18 17:36         ` Jonathan Cameron
2022-06-26 16:55 ` [PATCH 2/4] iio: ABI: max31865: Drop in_filter_notch_centre_frequency as in main docs Jonathan Cameron
2022-06-26 22:35   ` Mauro Carvalho Chehab
2022-06-26 16:55 ` [PATCH 3/4] iio: ABI: stm32-timer-trigger: Fuse unusual ABI into main doc Jonathan Cameron
2022-06-26 22:37   ` Mauro Carvalho Chehab
2022-06-27 14:09     ` Jonathan Cameron
2022-06-28  5:51       ` Mauro Carvalho Chehab
2022-07-18 17:39         ` Jonathan Cameron [this message]
2022-06-26 16:55 ` [PATCH 4/4] iio: ABI: sx9324: Squash some formatting to keep scripting happy Jonathan Cameron
2022-06-26 22:44   ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220718183905.2de6b3c7@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=fabrice.gasnier@foss.st.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox