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: <4E9C0423.5010909@cam.ac.uk>
Date:	Mon, 17 Oct 2011 11:32:03 +0100
From:	Jonathan Cameron <jic23@....ac.uk>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC:	Linus Walleij <linus.ml.walleij@...il.com>,
	linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
	zdevai@...il.com
Subject: Re: [PATCH] staging:iio:proof of concept in kernel interface.

On 10/17/11 11:19, Mark Brown wrote:
> On Mon, Oct 17, 2011 at 10:43:53AM +0100, Jonathan Cameron wrote:
> 
>> For the adc channel I'm not particularly keen on insisting every device
>> have a unique name for every channel.  That breaks the effort we went to
>> in IIO to enforce consistent naming (for userspace interfaces) in the first
>> place.  To my mind it should never be anything other than a number.
> 
> I think you want something similar to what we do with platform devices -
> have both a name and a number.  For devices that are just a bunch of
> symmetric channels (which seems to be the main case you're thinking of)
> the name would always be the same and the number would vary but if the
> device has a bunch of different functions then they'd be named.  That
> way you don't have to remember that the channels of a given type start
> at offset X.
> 
> For example, on a PMIC you'll often have ADC channels wired up to
> specific supplies plus some extras which are left for board use.  The
> fixed channels might get named after the supplies and the extras all
> have the same name distinguished by number.
> 
We effectively have the equivalent already - I can add it to the query
interface.  It allows channels to have a supplementary name typically
if they are measuring something not of general purpose (such as the
sensor supply voltage).

I'd also allow for name to be NULL - it provides no information at all
for a lot of devices.

Note, if we are talking functions such 'acceleration' then I'd much
rather have explicit enums for type, direction etc in there.  This
means that we are mapping onto the full channel spec rather than the
channel index. Really don't want strings on the adc side (except for
special cases as described above) as I just spent rather a long time
ripping them out precisely to enforce a consistent interface where
there was previously too much flexibility.

We have a system that allows describing of more or less everything we
have ever encountered in a rigorous consistent fashion (I say almost
as there is a slight wrinkle with some dds channels as currently defined).

Initially I'd be tempted to only support numbered channels (on adc side).
Later we can add the named option - iff it has real use cases.

Jonathan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ