lkml.org 
[lkml]   [2011]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] MFD: ab8500: New ab8500_gpadc APIs and reentrance
Hi Daniel,

On Tue, Feb 22, 2011 at 01:24:00PM +0100, Daniel Willerud wrote:
> Added ab8500_gpadc_get() API: A client do not need to be a ab8500 sub-device
> Added ab8500_gpadc_convert() API
> Added support for multiple ab8500-gpadc instances, driver is now reentrant
>
> Corrected regulator naming according to ste-next
This patch is fixing/improving several things at the same time, please split
it up.

Also, one additional comment:

> +/**
> + * ab8500_gpadc_get() - returns a reference to the primary AB8500 GPADC
> + * (i.e. the first GPADC in the instance list)
> + */
> +struct ab8500_gpadc *ab8500_gpadc_get(void)
> +{
> + struct ab8500_gpadc *gpadc;
> + gpadc = list_first_entry(&ab8500_gpadc_list, struct ab8500_gpadc, node);
> +
> + return gpadc;
> +}
This seems really arbitrary. We argued with Mattias about it, and giving
drivers access to your ADCs means they should somehow have a pointer back to
the right ADC. That's not the case here, and while it will just work fine
whenever you have one ADC on your board, you'll probably be relying on some
sort of device probe order otherwise.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/


\
 
 \ /
  Last update: 2011-03-02 12:37    [W:0.064 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site