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: <20081103172146.GA8913@oksana.dev.rtsoft.ru>
Date:	Mon, 3 Nov 2008 20:21:46 +0300
From:	Anton Vorontsov <avorontsov@...mvista.com>
To:	Jonathan Cameron <Jonathan.Cameron@...il.com>
Cc:	Dmitry Baryshkov <dbaryshkov@...il.com>,
	linux-kernel@...r.kernel.org, cbou@...l.ru,
	Andrew Morton <akpm@...ux-foundation.org>,
	Marek Vasut <marek.vasut@...il.com>
Subject: Re: [PATCH] power_supply: change the way how wm97xx-bat driver is
	registered

On Mon, Nov 03, 2008 at 04:54:57PM +0000, Jonathan Cameron wrote:
[...]
> It is needlessly complex for this sort of thing, but that's not it's
> purpose.  (though that's not to say it won't be able to do this sort
> of thing).  It's gotten a smigeon delayed due to a change of my own
> requirements for what it does.  As a reminder, the purpose of that
> subsystem was at least partly to provide reasonably high performance
> data capture facilities (ring buffers, triggered sampling etc alongside
> suitably powerful userspace interfaces.)  Possibly my apps are somewhat
> unusual, but the complexity is absolutely necessary for what I'm doing
> (annoyingly!)

Yeah, I understand that. But when you need simple driver for very
simple ADC device, the subsystem is a bit scary. Maybe we could just
implement "simple API" on top of it, that would hide the complexity.

Something like

value = adc_sample_pin(adc_device, "voltage");

And

struct adc_pin pins[2];
pins[0].name = "x-axis";
pins[0].num_samples = 5;
pins[1].name = "y-axis";
pins[2].num_samples = 5;

adc_sample_pins(adc_device, pins);
for (i = 0; i < ARRAY_SIZE(pins); i++) {
	for (j = 0; j < pins[i].num_samples; i++)
		process(pins[i].values[j].value);
}

That would work for most in-kernel ADC users (batteries, touchscreens).

> Anyhow, definitely not given up on it.

Great, looking forward to your patches.

-- 
Anton Vorontsov
email: cbouatmailru@...il.com
irc://irc.freenode.net/bd2
--
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