On Wed, Nov 11, 2009 at 08:14:38PM +0530, Anuj Aggarwal wrote:

Looking at a lot of this it feels like it would be cleaner to just have
a file defining the completely standard supplies, prototype them in the
header files and then link to them from the board code.  I'm finding the
macro stuff really hard to read.

More specific stuff:

> +/* Add/define supplies to the specific regulator */
> +#define REGULATOR_COMSUMER_DEFINE(s, device) \

These names are all very likely to clash with any similar macros added
to the regulator API.

> +               { \
> +                       .supply = #s, \
> +                       .dev = device, \
> +               }
> +

You should be using dev_name not dev for maximuim flexibility.

> +/* Define regulator with no supplies attached to it */
> +#define REGULATOR_CONSUMER_NO_SUPPLY(regulator) \
> +     REGULATOR_COMSUMER_START(regulator) = {}

> +/* VDAC */
> +#define TWL_VDAC_DATA        REGULATOR_INIT_DATA(vdac, VDAC, 1800000, 
> 1800000, \
> +                                             TWL_REGULATOR_MODES_DEFAULT, \
> +                                             TWL_REGULATOR_OPS_DEFAULT, \
> +                                             true)

This is the sort of thing that looks like it should be defined in one
common place rather than having multiple copies of the structure, one in
every board using it.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to