From: Eddie James <eajames@linux.vnet.ibm.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, robh+dt@kernel.org,
benh@kernel.crashing.org, joel@jms.id.au, mark.rutland@arm.com,
gregkh@linuxfoundation.org, rdunlap@infradead.org,
andy.shevchenko@gmail.com, peda@axentia.se
Subject: Re: [PATCH v11 5/8] i2c: fsi: Add transfer implementation
Date: Tue, 10 Jul 2018 15:59:23 -0500 [thread overview]
Message-ID: <479b3c82-ffe7-9e6a-569c-64fcb1b43d32@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180710193944.34phe4zafzvwjm5v@ninjato>
On 07/10/2018 02:39 PM, Wolfram Sang wrote:
>> 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.
OK, I understand! Will test and resend with conforming addressing.
Thanks for all the feedback!
Eddie
>
>>>> 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.
>
next prev parent reply other threads:[~2018-07-10 21:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-05 18:40 [PATCH v11 0/8] i2c: Add FSI-attached I2C master algorithm Eddie James
2018-07-05 18:40 ` [PATCH v11 1/8] dt-bindings: i2c: Add FSI-attached I2C master dt binding documentation Eddie James
2018-07-05 18:40 ` [PATCH v11 2/8] i2c: Add FSI-attached I2C master algorithm Eddie James
2018-07-05 18:40 ` [PATCH v11 3/8] i2c: fsi: Add port structures Eddie James
2018-07-05 18:40 ` [PATCH v11 4/8] i2c: fsi: Add abort and hardware reset procedures Eddie James
2018-07-05 18:40 ` [PATCH v11 5/8] i2c: fsi: Add transfer implementation Eddie James
2018-07-09 22:41 ` Wolfram Sang
2018-07-10 17:52 ` Eddie James
2018-07-10 18:50 ` Wolfram Sang
2018-07-10 19:14 ` Eddie James
2018-07-10 19:39 ` Wolfram Sang
2018-07-10 20:59 ` Eddie James [this message]
2018-07-11 4:29 ` Joel Stanley
2018-07-11 7:34 ` Wolfram Sang
2018-07-10 23:39 ` Benjamin Herrenschmidt
2018-07-05 18:40 ` [PATCH v11 6/8] i2c: fsi: Add I2C master locking Eddie James
2018-07-05 18:40 ` [PATCH v11 7/8] i2c: fsi: Add bus recovery Eddie James
2018-07-05 18:40 ` [PATCH v11 8/8] MAINTAINERS: Add Eddie as the maintainer for the FSI-attached I2C driver Eddie James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=479b3c82-ffe7-9e6a-569c-64fcb1b43d32@linux.vnet.ibm.com \
--to=eajames@linux.vnet.ibm.com \
--cc=andy.shevchenko@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=joel@jms.id.au \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=peda@axentia.se \
--cc=rdunlap@infradead.org \
--cc=robh+dt@kernel.org \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).