RE: [PATCH v2] drivers: regulator: add Maxim 8998 driver

Marek Szyprowski
2010-06-16T05:14:21Z

Hello,

On Tuesday, June 15, 2010 3:15 PM Mark Brown wrote:

> On Tue, Jun 15, 2010 at 02:38:26PM +0200, Marek Szyprowski wrote:
>
> > Are global exports preferred over the callbacks? I saw both in different
> > MFD drivers and was not sure which one to use.
>
> > I've selected callbacks, because they are a bit nicer and don't pollute
> > the name space for each single driver. In my opinion the cost of these
> > 3 max8998_reg_{read,write,update} inline functions in regulator/max8998.c
> > is not so significant.
>
> The dereferences looked fairly painful reading the code. You can always
> do the global stuff as static inlines in the header file which avoids
> namespace pollution while keeping the code looking like a function call.

Ok, I will provide a patch that moves {read,write,update}_reg functions to
linux/mfs/max8998-private.h soon.

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center