[U-Boot-Users] [PATCH][RFC] disable flat i2c commands when CONFIG_I2C_CMD_TREE defined

Ben Warren bwarren at qstreams.com
Fri Mar 2 18:41:02 CET 2007


Matthias,
On Fri, 2007-03-02 at 17:59 +0100, Matthias Fuchs wrote:
> Hi,
> 
> I noticed that when using CONFIG_I2C_CMD_TREE to enable
> the 'i2c' command with its sub commands, I also get the flat 
> i2c commands (imm, iprobe, ...) compiled into u-boot.
> 
> I think this is more than I need and want.
> 
> Does anything speak against disabling the flat i2c commands 
> when CONFIG_I2C_CMD_TREE is defined?
> 
> This is how I've done it (please skip the SPD stuff).
> 
> Matthias
Looks good.  I can't think of a use case where both command formats
would be useful, but maybe others can.

Please flip the order so it's 

#if defined(CONFIG_I2C_CMD_TREE)
U_BOOT_CMD(
	i2c, 6, 1, do_i2c,
	...
#else
U_BOOT_CMD(
	imd,	4,	1,	do_i2c_md,		\
	...
#endif

and submit as a proper patch.	

regards,
Ben





More information about the U-Boot mailing list