From: Wolfram Sang <wsa@the-dreams.de>
To: Michael Bachmeier <michael.bachmeier.linux@gmail.com>
Cc: linux-i2c@vger.kernel.org, kernel@pengutronix.de,
Shawn Guo <shawn.guo@linaro.org>
Subject: Re: i2c slave support für i.mx6
Date: Tue, 10 Nov 2015 09:59:55 +0100 [thread overview]
Message-ID: <20151110085955.GA1532@katana> (raw)
In-Reply-To: <CAH-Fpeogk6kFAX9NtE3kJvi97ag9utMhUe+S0-mSJBm3eQCpxw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1497 bytes --]
Hi Michael,
> Do I understand it right, I can set the Master in slave mode and the
> new slave get his own i2c-adresse?
Yes, you can have your own address then. Note that I recently gave a
talk about the slave framework. You can find the slides here:
http://elinux.org/ELCE_2015_Presentations
Search for my name there. And if you wait some more, the video will be
there, too, which will be much more helpful than the slides only. And
there is the regular documentation:
Documentation/i2c/slave-interface
> Say that, I can connect a Master from the outside, without this
> leading to problems?
> If the master switch to slave, then stops SCL? Or how does it work?
I suggest getting the I2C specifications from the web and read about
"multi master" and "bus arbitration" to understand how it works. Please
note that true multi-master busses can in practice be tricky. Shall your
mx6 also be master, or slave only?
> Is the EEPROM simulator only available if I rewrote "i2c-IMX" drivers
> to the slave support?
Yes.
> Does anyone know if anyone is working on this driver?
I don't know of; but I put some more people on CC who regularly work on
Freescale SoCs.
> Would it theoretically be enough to write 0x80 in the "I2Cx_I2CR"
> register to set MSTA Bit to
> slave mode. "Changing MSTA from 1 to 0 generates a Stop and selects Slave mode."
> Or then disturbs the old driver?
You need more to do this. You need to handle slave interrupts. See the
documentation.
Good luck,
Wolfram
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-11-10 9:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 8:06 i2c slave support für i.mx6 Michael Bachmeier
2015-11-10 8:59 ` Wolfram Sang [this message]
2015-11-16 6:47 ` Michael Bachmeier
2015-11-18 11:11 ` Wolfram Sang
2015-11-23 9:11 ` Michael Bachmeier
2015-11-24 8:08 ` Wolfram Sang
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=20151110085955.GA1532@katana \
--to=wsa@the-dreams.de \
--cc=kernel@pengutronix.de \
--cc=linux-i2c@vger.kernel.org \
--cc=michael.bachmeier.linux@gmail.com \
--cc=shawn.guo@linaro.org \
/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).