*/
val[0] = 0xd0;
i2c_write((0x72 >> 1), 0xa0, 1, val, 1);
--
- /* check back */
- udelay(10000);
- i2c_read((0x72 >> 1), 0x08, 1, val, 1);
- printf("(0x08, [0x%x] expecting 0x35\n", val[0]);
- /* added */
- val[0] = 0x03;
- i2c_write((0x92 >> 1), 0x17, 1, val, 1);
--
- i2c_read((0x72 >> 1), 0xa0, 1, val, 1);
- printf("(0xa0, [0x%x] expecting 0xd0\n", val[0]);
- val[0] = 0x6A;
- i2c_write((0x92 >> 1), 0x23, 1, val, 1);
- val[0] = 0xAA;
- i2c_write((0x92 >> 1), 0x24, 1, val, 1);
- val[0] = 0xCA;
- i2c_write((0x92 >> 1), 0x25, 1, val, 1);
- val[0] = 0xEA;
- i2c_write((0x92 >> 1), 0x26, 1, val, 1);
-
- val[0] = 0xA0;
- i2c_write((0x92 >> 1), 0x4C, 1, val, 1);
- val[0] = 0x00;
- i2c_write((0x92 >> 1), 0x4D, 1, val, 1);
-
- val[0] = 0x14;
- i2c_write((0x72 >> 1), 0x80, 1, val, 1);
- val[0] = 0x44;
- i2c_write((0x92 >> 1), 0x45, 1, val, 1);
- val[0] = 0xFC;
- i2c_write((0x72 >> 1), 0xA1, 1, val, 1);
- val[0] = 0xFA;
- i2c_write((0x72 >> 1), 0xA3, 1, val, 1);
-
- val[0] = 0x17;
- i2c_write((0x72 >> 1), 0x90, 1, val, 1);
- val[0] = 0x66;
- i2c_write((0x72 >> 1), 0x94, 1, val, 1);
- val[0] = 0x1C;
- i2c_write((0x72 >> 1), 0xA5, 1, val, 1);
- val[0] = 0x21;
- i2c_write((0x72 >> 1), 0x95, 1, val, 1);
- val[0] = 0x22;
- i2c_write((0x72 >> 1), 0x96, 1, val, 1);
- val[0] = 0x86;
- i2c_write((0x72 >> 1), 0x92, 1, val, 1);
- val[0] = 0xf6;
- i2c_write((0xC8 >> 1), 0x07, 1, val, 1);
- val[0] = 0x02;
- i2c_write((0xC8 >> 1), 0x40, 1, val, 1);
-
- val[0] = 0x00;
- i2c_write((0x72 >> 1), 0xC7, 1, val, 1);
-
- /* 100ms delay */
- udelay(100000);
-
- val[0] = 0x00;
- i2c_write((0x72 >> 1), 0x1A, 1, val, 1);
- val[0] = 0x00;
- i2c_write((0x72 >> 1), 0x1E, 1, val, 1);
- val[0] = 0x81;
- i2c_write((0x72 >> 1), 0xBC, 1, val, 1);
-
- /* 100ms delay */
- udelay(100000);
-
- val[0] = 0x1C;
- i2c_write((0x72 >> 1), 0x0D, 1, val, 1);
- val[0] = 0x04;
- i2c_write((0x72 >> 1), 0x05, 1, val, 1); /* Auto reset on */
- val[0] = 0xFF;
- i2c_write((0x72 >> 1), 0x74, 1, val, 1);
-
- i2c_read((0x72 >>1), 0x95, 1, val, 1);
- val[0] &= ~(1 << 4);
- i2c_write((0x72 >> 1), 0x95, 1, val, 1);
-
- val[0] = 0x01;
- i2c_write((0x72 >> 1), 0xBC, 1, val, 1);
- val[0] = 0xA1;
- i2c_write((0x72 >> 1), 0xBD, 1, val, 1);
- val[0] = 0x40;
- i2c_write((0x72 >> 1), 0xBE, 1, val, 1);
- val[0] = 0x01;
- i2c_write((0xC8 >> 1), 0x21, 1, val, 1);
-
- val[0] = 0x01;
- i2c_write((0x72 >> 1), 0xBC, 1, val, 1);
- val[0] = 0xA1;
- i2c_write((0x72 >> 1), 0xBD, 1, val, 1);
- val[0] = 0x7C;
- i2c_write((0x72 >> 1), 0xBE, 1, val, 1);
-
- val[0] = 0x01;
- i2c_write((0x72 >> 1), 0xBC, 1, val, 1);
- val[0] = 0x79;
- i2c_write((0x72 >> 1), 0xBD, 1, val, 1);
-
- i2c_read((0x72 >>1), 0x95, 1, val, 1);
- val[0] &= ~(1 << 4);
- i2c_write((0x72 >> 1), 0x95, 1, val, 1);
--
- val[0] = 0x81;
- i2c_write((0xC8 >> 1), 0x21, 1, val, 1);
}
- void check_micro_usb(void)
+ static void check_micro_usb(void)
{
- unsigned char addr = 0x25; /* fsa9480 */
+ unsigned char addr;
+ unsigned char val[2];
+ int ta = 0;
i2c_gpio_set_bus(I2C_PMIC);