Re: Strange behavior in i2c-mpc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I’m trying to implement the following transfer with the i2c-mpc driver:

Read MR: Initiate pressure management

+---------------------+
|S|6|5|4|3|2|1|0|R|A|S|
+---------------------+

First S - start condition
6:0 - slave address
R - read bit ('1')
A - wait for slave ACK
Second S - stop condition.

My guess was that doing that would be enough:

    struct i2c_msg msg = {
        .addr = <addr>,
        .flags = I2C_M_RD,
        .len = 0,
        .buf = NULL,
    };

    return i2c_transfer(data->client->adapter, &msg, 1);

However, when the length parameter is 0, the wait for the CSR_MBB bit
in lines 617-630 of mpc_xfer in drivers/i2c/busses/i2c-mpc.c times
out.

I’m checking the NXP P2020 spec, and it says that

     Note that a master can generate a STOP even if the slave has transmitted an
     acknowledge bit, at which point the slave must release the bus.

To me everything seems OK here, but still CSR_MBB never becomes zero.
Would you be able to give me any advice?

Best regards,
Andrij Abyzov




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux