This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TPS65930: reading ADCIN under linux environment

Other Parts Discussed in Thread: TPS65930, DM3730

Hi!

I'm trying to use ADCIN0 pin of TPS65930 chip using linux running on DM3730. There is twl.c driver that provides some functions to communicate with TPS65930 via I2C.

So there is my init code (according to TPS65930 TRM):

reg_val = 0x0D; //MADC_IMR1 register value
twl_i2c_write_u8(TWL4030_MODULE_MADC,reg_val,TWL4030_MADC_IMR1);

reg_val = 0x05; //SIH_CTRL register value
twl_i2c_write_u8(TWL4030_MODULE_MADC,reg_val,0x67);

reg_val = 0x01; //CTRL1 register value
twl_i2c_write_u8(TWL4030_MODULE_MADC,reg_val,0x00);

reg_val = 0x01; //SW1SELECT_LSB register value
twl_i2c_write_u8(TWL4030_MODULE_MADC,reg_val,0x06);

I can read correct values from that registers back,
so i2c driver works fine (looks like).

CFG_BOOT register contains 0x1A,
GPBR1 register contains 0x15,
So MADC clocks should be running

Then i want to request ADCIN0 conversion:

reg_val = 0x20; //CTRL_SW1 register, set SW1
twl_i2c_write_u8(TWL4030_MODULE_MADC,reg_val,0x12);

And i should wait for interrupt flag (SW1_ISR1) in proper register:
twl_i2c_read_u8(TWL4030_MODULE_MADC,&reg_val,TWL4030_MADC_ISR1);
but flag does not appear (no matter how many times i'm reading
register and what time i wait before first reading).
So looks like ADCIN0 conversion wasn't started.

Please help me with this problem! What I'm doing wrong?