Skip to content
Snippets Groups Projects
i2c.c 48.1 KiB
Newer Older
  • Learn to ignore specific revisions
  • Wolfgang Denk's avatar
    Wolfgang Denk committed
    
    /***************************************************/
    
    #ifdef CONFIG_SYS_LONGHELP
    static char i2c_help_text[] =
    
    #if defined(CONFIG_SYS_I2C) || defined(CONFIG_DM_I2C)
    
    	"bus [muxtype:muxaddr:muxchannel] - show I2C bus info\n"
    
    	"crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n"
    
    #if defined(CONFIG_SYS_I2C) || \
    
    	defined(CONFIG_I2C_MULTI_BUS) || defined(CONFIG_DM_I2C)
    
    	"i2c dev [dev] - show or set current I2C bus\n"
    
    #if defined(CONFIG_I2C_EDID)
    	"i2c edid chip - print EDID configuration information\n"
    #endif  /* CONFIG_I2C_EDID */
    
    	"i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device\n"
    
    	"i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device\n"
    	"i2c mm chip address[.0, .1, .2] - write to I2C device (auto-incrementing)\n"
    	"i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)\n"
    	"i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)\n"
    
    	"i2c probe [address] - test for and show device(s) on the I2C bus\n"
    
    	"i2c read chip address[.0, .1, .2] length memaddress - read to memory\n"
    
    	"i2c write memaddress chip address[.0, .1, .2] length [-s] - write memory\n"
    	"          to I2C; the -s option selects bulk write in a single transaction\n"
    
    #ifdef CONFIG_DM_I2C
    	"i2c flags chip [flags] - set or get chip flags\n"
    
    	"i2c olen chip [offset_length] - set or get chip offset length\n"
    
    	"i2c reset - re-init the I2C Controller\n"
    
    	"i2c sdram chip - print SDRAM configuration information\n"
    
    	"i2c speed [speed] - show or set I2C bus speed";
    #endif
    
    U_BOOT_CMD(
    
    	"I2C sub-system",
    	i2c_help_text