From: Juergen Fitschen <me@jue.yt>
To: Ludovic Desroches <ludovic.desroches@microchip.com>
Cc: Wolfram Sang <wsa@the-dreams.de>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 3/4] i2c: at91: added slave mode support
Date: Wed, 1 Nov 2017 12:35:05 +0100 [thread overview]
Message-ID: <20171101113505.GB17565@jfi-dev> (raw)
In-Reply-To: <20171031155542.rsy7gtpa5notpwcd@rfolt0960.corp.atmel.com>
Hello Ludovic,
On Tue, Oct 31, 2017 at 04:55:42PM +0100, Ludovic Desroches wrote:
> On Fri, Oct 27, 2017 at 05:12:00PM +0200, Juergen Fitschen wrote:
> > Slave mode driver is based on the concept of i2c-designware driver.
> >
> > Signed-off-by: Juergen Fitschen <me@jue.yt>
> > ---
> > drivers/i2c/busses/Makefile | 3 +
> > drivers/i2c/busses/i2c-at91-core.c | 13 +++-
> > drivers/i2c/busses/i2c-at91-slave.c | 147 ++++++++++++++++++++++++++++++++++++
> > drivers/i2c/busses/i2c-at91.h | 30 +++++++-
> > 4 files changed, 189 insertions(+), 4 deletions(-)
> > create mode 100644 drivers/i2c/busses/i2c-at91-slave.c
> >
>
> Adding an example in Documentation/devicetree/bindings/i2c/i2c-at91.txt
> could be useful.
I will add this.
> > diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
> > index 2a79c3d..b38fb8e9 100644
> > --- a/drivers/i2c/busses/Makefile
> > +++ b/drivers/i2c/busses/Makefile
> > @@ -34,6 +34,9 @@ obj-$(CONFIG_I2C_ALTERA) += i2c-altera.o
> > obj-$(CONFIG_I2C_ASPEED) += i2c-aspeed.o
> > obj-$(CONFIG_I2C_AT91) += i2c-at91.o
> > i2c-at91-objs := i2c-at91-core.o i2c-at91-master.o
> > +ifeq ($(CONFIG_I2C_SLAVE),y)
> > + i2c-at91-objs += i2c-at91-slave.o
> > +endif
>
> As Designware driver, I would add an entry in 'I2C Hardware Bus
> Support'.
>
> If a user wants to use the I2C GPIO driver as the I2C slave (once it has
> the slave support), it's not useful to embed i2c-at91-slave code.
Good point.
> > +void at91_init_twi_bus_slave(struct at91_twi_dev *dev)
> > +{
> > + at91_twi_write(dev, AT91_TWI_CR, AT91_TWI_MSDIS);
> > + if (dev->slave_detected && dev->smr) {
>
> slave_detected has been checked in the caller. smr has been set just
> before calling at91_init_twi_bus().
Whoops! Better safe than sorry ;) I will remove that check.
Thank you for testing everything! I am curious about how the other MPUs will
perform with the patchset. I have a SAMA5D35 at hand and can test everything on
this MPU in the next days.
Best regards
Juergen
next prev parent reply other threads:[~2017-11-01 11:35 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-27 15:10 [PATCH RFC 0/4] i2c: at91: slave mode support Juergen Fitschen
2017-10-27 15:10 ` Juergen Fitschen
2017-10-27 15:11 ` [PATCH RFC 1/4] i2c: at91: segregate master mode specific code from probe and init func Juergen Fitschen
2017-10-31 15:03 ` Ludovic Desroches
2017-10-31 15:03 ` Ludovic Desroches
2017-10-27 15:11 ` [PATCH RFC 2/4] i2c: at91: split driver into core and master file Juergen Fitschen
2017-10-31 15:04 ` Ludovic Desroches
2017-10-31 15:04 ` Ludovic Desroches
2017-10-27 15:12 ` [PATCH RFC 3/4] i2c: at91: added slave mode support Juergen Fitschen
2017-10-31 15:55 ` Ludovic Desroches
2017-10-31 15:55 ` Ludovic Desroches
2017-11-01 11:35 ` Juergen Fitschen [this message]
2017-11-01 13:04 ` Juergen Fitschen
2017-11-02 14:53 ` Ludovic Desroches
2017-11-02 14:53 ` Ludovic Desroches
2017-10-27 15:12 ` [PATCH RFC 4/4] i2c: at91: take slave mode capabilities of hardware into account Juergen Fitschen
2017-10-31 15:22 ` Ludovic Desroches
2017-10-31 15:22 ` Ludovic Desroches
2017-11-01 11:16 ` Juergen Fitschen
2017-11-02 14:47 ` Ludovic Desroches
2017-11-02 14:47 ` Ludovic Desroches
2017-11-03 8:46 ` Ludovic Desroches
2017-11-03 8:46 ` Ludovic Desroches
2017-11-03 14:07 ` Juergen Fitschen
2017-11-03 14:26 ` Ludovic Desroches
2017-11-03 14:26 ` Ludovic Desroches
2017-10-31 14:07 ` [PATCH RFC 0/4] i2c: at91: slave mode support Ludovic Desroches
2017-10-31 14:07 ` Ludovic Desroches
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=20171101113505.GB17565@jfi-dev \
--to=me@jue.yt \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.desroches@microchip.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.