From: Radu Nicolae Pirea <radu_nicolae.pirea@upb.ro>
To: Shubhrajyoti Datta <shubhrajyoti.datta@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Michal Simek <michal.simek@xilinx.com>,
linux-i2c <linux-i2c@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
Wolfram Sang <wsa@the-dreams.de>
Subject: Re: [PATCH] i2c: cadence: Added slave support
Date: Sat, 21 Dec 2019 19:58:50 +0200 [thread overview]
Message-ID: <0a09d9ed5fc5ae6c651491dead5f81bfecdbca4b.camel@upb.ro> (raw)
In-Reply-To: <CAKfKVtFqbtovQGQuzgCYzTu4bHOmAOmTz-tZMD89iUkMPc8awA@mail.gmail.com>
On Fri, 2019-12-20 at 14:55 +0530, Shubhrajyoti Datta wrote:
> Hi ,
>
> On Thu, Dec 19, 2019 at 7:00 PM Radu Pirea <radu_nicolae.pirea@upb.ro
> > wrote:
> > On Thu, 2019-12-19 at 14:05 +0100, Wolfram Sang wrote:
> > > > +/**
> > > > + * enum cdns_i2c_mode - I2C Controller current operating mode
> > > > + *
> > > > + * @CDNS_I2C_MODE_SLAVE: I2C controller operating in
> > > > slave
> > > > mode
> > > > + * @CDNS_I2C_MODE_MASTER: I2C Controller operating in
> > > > master
> > > > mode
> > > > + */
> > >
> > > Can't the hardware operate as master and slave at the same time?
> > >
> >
> > Of course, it can. If the driver has a slave registered wait and
> > listens and if the subsystem needs to use the controller as master,
> > the
> > driver changes the state of the controller to master, sends and
> > reads
> > data from the bus and after this change the state of the controller
> > to
> > slave.
>
> However that should be done only if no master is talking to the slave
> right?
Yes. The state of the slave must be IDLE, otherwise
cdns_i2c_master_xfer will return -EAGAIN.
>
> > In cdns_i2c_master_xfer is done all the magic.
next prev parent reply other threads:[~2019-12-21 17:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-19 12:41 [PATCH] i2c: cadence: Added slave support Radu Pirea
2019-12-19 13:05 ` Wolfram Sang
2019-12-19 13:29 ` Radu Pirea
2019-12-20 9:25 ` Shubhrajyoti Datta
2019-12-21 17:58 ` Radu Nicolae Pirea [this message]
2019-12-20 9:17 ` Michal Simek
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=0a09d9ed5fc5ae6c651491dead5f81bfecdbca4b.camel@upb.ro \
--to=radu_nicolae.pirea@upb.ro \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=shubhrajyoti.datta@gmail.com \
--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