RE: [PATCH v9 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

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

 



On September 7, 2018 11:48:37 PM GMT+02:00, Ajay Gupta <ajayg@xxxxxxxxxx> wrote:

>> >> Per your comments on v8, the address has to be programmed before
>the
>> >> transfer, but you fail to do that if the first message is a read.
>> > This will never happen. Hint: I2C_AQ_COMB_WRITE_FIRST
>> 
>> Yes, it will. If the transfer consists of a single read, i.e. w/o any
>leading write.
>> E.g. i2c_smbus_read_byte (which is emulated in your case and will
>generate
>> this pattern).
>I don't think we intend to support SMBUS commands and so I will drop
>I2C_FUNC_SMBUS_EMUL.

SMBUS has nothing to do with the problem, that was just an example. An I2C client driver can issue such I2C xfers all by itself without going through emulation, so just dropping the _EMUL flag is not the answer. And I'd be surprised if the hardware doesn't support single message reads.

There is no quirk flag for this abnormality, so you will have to open code the check in your master_xfer if you can't make such xfers work, but the best fix is certainly to just make them work...

Cheers,
Peter




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux