lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250511154555.067143c9@jic23-huawei>
Date: Sun, 11 May 2025 15:45:55 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: David Lechner <dlechner@...libre.com>
Cc: Pop Ioan Daniel <pop.ioan-daniel@...log.com>, Lars-Peter Clausen
 <lars@...afoo.de>, Michael Hennerich <Michael.Hennerich@...log.com>, Nuno
 Sá <nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>,
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>, Sergiu Cuciurean
 <sergiu.cuciurean@...log.com>, Dragos Bogdan <dragos.bogdan@...log.com>,
 Antoniu Miclaus <antoniu.miclaus@...log.com>, Olivier Moysan
 <olivier.moysan@...s.st.com>, Javier Carrasco
 <javier.carrasco.cruz@...il.com>, Matti Vaittinen
 <mazziesaccount@...il.com>, Tobias Sperling <tobias.sperling@...ting.com>,
 Alisa-Dariana Roman <alisadariana@...il.com>, Marcelo Schmitt
 <marcelo.schmitt@...log.com>, Matteo Martelli <matteomartelli3@...il.com>,
 linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 4/4] iio: adc: ad7405: add ad7405 driver


> > +
> > +static const struct iio_info ad7405_iio_info = {
> > +	.read_raw = &ad7405_read_raw,
> > +	.write_raw = &ad7405_write_raw,
> > +	.read_avail = &ad7405_read_avail,
> > +};
> > +
> > +#define AD7405_IIO_CHANNEL {							\
> > +	.type = IIO_VOLTAGE,							\
> > +	.info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SAMP_FREQ),		\
> > +	.info_mask_shared_by_all_available = BIT(IIO_CHAN_INFO_SAMP_FREQ),	\  
> 
> Would it make more sense to use IIO_CHAN_INFO_OVERSAMPLING_RATIO for controlling
> the decimation rate and have IIO_CHAN_INFO_SAMP_FREQ be read-only?

My initial reaction to this was that we'd be not providing one of the longest
standing and user friendly(ish) interfaces.  However if it literally only affects
oversampling then indeed I think oversampling is the more informative interface.
Which is to say I started writing no then thought some more and ended up agreeing with
you ;)

As you say, a read only sampling frequency is fine.  We use those when it's controlled
by some outside factor (like a clock frequency) so userspace should in theory at least
cope fine with that being RO.

> Maybe also useful to have a read-only filter_type attribute to say that the
> backend is providing a sinc3 filter?

Nice to have perhaps.


J


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ