[UPSTREAM] Attempt at improving ADC access

Balaji Rao balajirrao at openmoko.org
Thu Oct 16 10:01:15 CEST 2008

On Thu, Oct 16, 2008 at 12:32:45PM +0530, Balaji Rao wrote:
> On Thu, Oct 16, 2008 at 01:09:40AM -0200, Werner Almesberger wrote:
> > Balaji Rao wrote:
> > > Here's an attempt to improve ADC access in the pcf50633 driver.
> > > I've introduced a method for synchronously reading from the ADC.
> > 
> > Very nice work ! One suggestion for a slight simplification: you can
> > avoid distinguishing synchronous and asynchronous by using a callback
> > in adc_sync_read that does the completion.
> > 
> Yea, I did that at one point, but tore it down later, for some reason I
> don't recall. But It now looks like it can be done :)

Ah, now I remember! From the proposed sync callback, we wouldn't know
which completion to complete as we wouldn't be passed the adc_request
object. We could very well look at the queue head, but that would not be
a clean way to do it. What do you say ?
	- Balaji

More information about the openmoko-kernel mailing list