[U-Boot] [RFC] CONFIG naming convetion

Wolfgang Denk wd at denx.de
Sat Jul 18 19:50:46 CEST 2009


Dear Robin Getz,

In message <200907181115.26404.rgetz at blackfin.uclinux.org> you wrote:
>
> It would be nice to come up with some list of namespaces, and what they
> they should be used for...

Agreed.

> For example, should it be:
> CONFIG_DRIVER_OMAP24XX_I2C
> or
> CONFIG_SYS_I2C_DRIVER_OMAP24XX
> or
> CONFIG_DRIVER_I2C_OMAP24XX

Well, the difference between CONFIG_ and CONFIG_SYS_ is well-defined.

And the "DRIVER_" part makes not much sense to me in any of the
examples above. 

My personal way of thinking about such options is usually  CPU/archi-
tecture  first,  so I would probably chose CONFIG_OMAP24XX_I2C to en-
able/disable the I2C driver on a OMAP24XX based board, but  I  under-
stand  that there are reasons to prefer CONFIG_I2C_OMAP24XX as well -
let's see if there is a clear majority of opiniions...

> Again - which is only used in one place:
> drivers/i2c/Makefile:COBJS-$(CONFIG_DRIVER_OMAP24XX_I2C) += omap24xx_i2c.o
> include/configs/omap2420h4.h:#define CONFIG_DRIVER_OMAP24XX_I2C
> 
> Which is fine - since it is a driver, which I'm sure that people out of tree use.

Well, if only out-of-tree ports use it, it probably should never have
been added in the first place.

> I would think should be CONFIG_DRIVERS_PATA_BFIN

I dosagree, the "DRIVERS" part is just added line noise.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Politician:  An  eel  in  the  fundamental   mud   upon   which   the
superstructure  of  organized  society is reared. When he wriggles he
mistakes the agitation of his tail for the trembling of the  edifice.
As  compared with the statesman, he suffers the disadvantage of being
alive.                                               - Ambrose Bierce


More information about the U-Boot mailing list