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=-15.5 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_2 autolearn=unavailable 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 40B85C433E6 for ; Tue, 29 Dec 2020 16:48:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 12329207B3 for ; Tue, 29 Dec 2020 16:48:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726300AbgL2QsN (ORCPT ); Tue, 29 Dec 2020 11:48:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:35560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726161AbgL2QsN (ORCPT ); Tue, 29 Dec 2020 11:48:13 -0500 Received: from archlinux (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1227420867; Tue, 29 Dec 2020 16:47:31 +0000 (UTC) Date: Tue, 29 Dec 2020 16:47:28 +0000 From: Jonathan Cameron To: Cristian Pop Cc: , , Subject: Re: [PATCH v4 2/3] Documentation/ABI/testing: Add documentation for AD5766 new ABI Message-ID: <20201229164728.38a7d892@archlinux> In-Reply-To: <20201229162758.187beafd@archlinux> References: <20201218171231.58794-1-cristian.pop@analog.com> <20201218171231.58794-2-cristian.pop@analog.com> <20201229162758.187beafd@archlinux> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 29 Dec 2020 16:27:58 +0000 Jonathan Cameron wrote: > On Fri, 18 Dec 2020 19:12:30 +0200 > Cristian Pop wrote: > > > New interface is proposed for dither functionality. This future allows > > composing an external signals to the selected output channel. > > The dither signal can be turned on/off, scaled, inverted, or it can be > > selected from different sources. > > > > Signed-off-by: Cristian Pop > Coming together nicely though a few more thoughts came to mind when reading > this. Only significant one is whether we are better with decimal scaling > than percentage scaling for consistency with channel scales etc? > > Jonathan > > > --- > > Changelog v4: > > - Change to "in_voltageY_dither_enable" > > - Change scale to numbers + 100% for no scaling > > - Possible dither source values: 0 - N0, 1 - N1 > > .../ABI/testing/sysfs-bus-iio-dac-ad5766 | 36 +++++++++++++++++++ > > 1 file changed, 36 insertions(+) > > create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-dac-ad5766 > > > > diff --git a/Documentation/ABI/testing/sysfs-bus-iio-dac-ad5766 b/Documentation/ABI/testing/sysfs-bus-iio-dac-ad5766 > > new file mode 100644 > > index 000000000000..72100edb88bb > > --- /dev/null > > +++ b/Documentation/ABI/testing/sysfs-bus-iio-dac-ad5766 > > @@ -0,0 +1,36 @@ > > +What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_dither_pwr > > in_voltageY_dither_en would be more consistent with existing ABI naming. Seems to be different in the code (dither_enable I think) so please sanity check this file carefully against the driver. Thanks, Jonathan > > > +KernelVersion: > > +Contact: linux-iio@vger.kernel.org > > +Description: > > + Dither enable. Write 1 to enable dither or 0 to disable it. > > + > > +What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_dither_invert > > +KernelVersion: > > +Contact: linux-iio@vger.kernel.org > > +Description: > > + Inverts the dither applied to the selected DAC channel. Dither is not > > + inverted by default. Write "1" to invert dither. > > + > > +What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_dither_scale_available > > +KernelVersion: > > +Contact: linux-iio@vger.kernel.org > > +Description: > > + Returns possible scalings available for the current channel: > > Given this one is self defining and may well get generalized to other devices I'd > got with a description that doesn't provide values. > > Returns possible scalings as percentages. > > However, thinking more on this it's a bit inconsistent with other scale values we have > which are given in decimal. Would "1 0.75 0.5 0.25" work as well here? > > > + "100 75 50 25" scaling. > > + > > +What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_dither_scale > > +KernelVersion: > > +Contact: linux-iio@vger.kernel.org > > +Description: > > + Scales the dither before it is applied to the selected channel: > > + 100 - No scaling > > + 75 - 75% scaling > > + 50 - 50% scaling > > + 25 - 25% scaling > > As above, I'm don't really see an advantage in providing the values. Any userspace > ought to cope with any (finding out what is there via _available). > "Scales the dither before it is applied to the selected channel. 1 corresponds > to no scaling". > > > + > > +What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_dither_source > > +KernelVersion: > > Please fill in the expected kernel version. I'll fix it if this happens to merge near > the change over in a cycle, but it's easier to fix something that is there > than to add it from scratch :) > > > +Contact: linux-iio@vger.kernel.org > > +Description: > > + Selects dither source applied to the selected channel. Write "0" to > > + select N0 source, write "1" to select N1 source. >