So I was messing around with I2C on the AT91RM9200 when I ran into the i2c tools. These tools were very simple to compile and use. For cross compiling all I had to do was “make CC=arm-linux-gcc”. Then I had the i2cdetect, i2cdump, i2cget, i2cset tools. I used these to debug the RTC chip. To get the rtc driver to work I added the following lines to board-ecbat91.c:
static struct i2c_board_info __initdata ecb_i2c_devices[] = {
{
I2C_BOARD_INFO(“isl1208″, 0×6f),
},
};
And then in ecb_at91board_init I added
at91_add_device_i2c(ecb_i2c_devices, ARRAY_SIZE(ecb_i2c_devices));