linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 14:14:40 -0500	[thread overview]
Message-ID: <cda1b231-eeff-626d-5c79-a07c9bc5a9ec@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180710185042.x3slnms5wzocobqu@ninjato>



On 07/10/2018 01:50 PM, Wolfram Sang wrote:
>>>> +	cmd |= FIELD_PREP(I2C_CMD_ADDR, msg->addr >> 1);
>>> I just noticed this and wonder: Don't you need the LSB of the address?
>>> It is not the RW flag, this is encoded in msg->flags.
>> So, the hardware interprets the LSB as the RW flag. It wouldn't be possible
>> to have a device addressed with the LSB set on this I2C master.
> But msg->addr is 7 bit and LSB aligned. If I am not horribly wrong, with
> the above code, an EEPROM at 0x50 would show up as 0x28 with your
> driver?

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 :(

>
>> 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.

>


  reply	other threads:[~2018-07-10 19:15 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 [this message]
2018-07-10 19:39           ` Wolfram Sang
2018-07-10 20:59             ` Eddie James
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=cda1b231-eeff-626d-5c79-a07c9bc5a9ec@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).