Re: [PATCH v11 5/8] i2c: fsi: Add transfer implementation

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

 



> Sorry, what do you mean "show up as"? Yes, we could first shift all our
> addresses in user-space before passing them to the driver, so that the
> msg->addr field is exactly what the hardware expects already... This would
> be non-trivial for our users considering all our documentation represents
> the addresses as the top 7 bits of a byte :(

Ah, now I understand the whole situation! Good that I asked. But I have
bad news for you:

msg->addr is 7 bit and LSB aligned. No way around that. This is how
Linux I2C worked since the beginning. You have to adapt to it.

I know what you mean. Most doumentation I get has the addresses in 8
bit, i.e. 7 bit address shifted + RW bit. But sorry again, the Linux
representation is different and all drivers have to adhere to that.

An EEPROM ist at 0x50 in Linux. There is no write addr 0xa0 and read
addr 0xa1.

> > > Indeed, real 10-bit addresses require some additional manipulation of this
> > > I2C master in order to work. We don't support it right now.
> > Then you should remove the associated FUNC flag.
> 
> Ah, but due to the addressing situation, tools like i2cget don't work with
> our addresses unless the 10 bit flag is specified. For example, we may want
> to access 0xA0.

This is a kinda dirty workaround to the above problem. It is even wrong
because 10-bit addresses look totally different on the wire.

Sorry for the hazzle with the docs, but there is no way around that.

Attachment: signature.asc
Description: PGP signature


[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