All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux I2C <linux-i2c@vger.kernel.org>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Simon Horman <horms@verge.net.au>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [RFC 2/2] i2c: sh_mobile: rework deferred probing
Date: Tue, 16 Dec 2014 12:35:23 +0100	[thread overview]
Message-ID: <20141216113523.GB10958@katana> (raw)
In-Reply-To: <CAMuHMdX2u4J2Dqb2ww23F4ED2QFWu4Ev2tF9Nr6o0PXRdpxSDA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1482 bytes --]

On Wed, Dec 10, 2014 at 02:44:58PM +0100, Geert Uytterhoeven wrote:
> Hi Wolfram,
> 
> On Wed, Dec 10, 2014 at 2:21 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> > DMA is opt-in for this driver. So, we can't use deferred probing in
> > probe, because our driver would get endlessly deferred if DMA support is
> > compiled in but only the DMA driver is missing. Because we can't know
> > when the DMA driver might show up, we always try again when a DMA
> > transfer would be possible. The downside is that there is more overhead
> > for setting up every DMA transfer.
> 
> ... for setting up every PIO transfer?
> 
> Once DMA is available, it's just one extra variable check.

ACK. Mixed that up.

> 
> > Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > ---
> >  drivers/i2c/busses/i2c-sh_mobile.c | 98 +++++++++++++++++++-------------------
> >  1 file changed, 48 insertions(+), 50 deletions(-)
> >
> > diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
> > index 636f2297143a..ea7b99212fa6 100644
> > --- a/drivers/i2c/busses/i2c-sh_mobile.c
> > +++ b/drivers/i2c/busses/i2c-sh_mobile.c
> > @@ -144,6 +144,7 @@ struct sh_mobile_i2c_data {
> >         int sr;
> >         bool send_stop;
> >
> > +       struct resource *res;
> 
> I thinkk you can just store dma_addr_t port_addr here.

Yes, but I liked the resource better :)


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@the-dreams.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux I2C <linux-i2c@vger.kernel.org>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Simon Horman <horms@verge.net.au>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [RFC 2/2] i2c: sh_mobile: rework deferred probing
Date: Tue, 16 Dec 2014 11:35:23 +0000	[thread overview]
Message-ID: <20141216113523.GB10958@katana> (raw)
In-Reply-To: <CAMuHMdX2u4J2Dqb2ww23F4ED2QFWu4Ev2tF9Nr6o0PXRdpxSDA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1482 bytes --]

On Wed, Dec 10, 2014 at 02:44:58PM +0100, Geert Uytterhoeven wrote:
> Hi Wolfram,
> 
> On Wed, Dec 10, 2014 at 2:21 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> > DMA is opt-in for this driver. So, we can't use deferred probing in
> > probe, because our driver would get endlessly deferred if DMA support is
> > compiled in but only the DMA driver is missing. Because we can't know
> > when the DMA driver might show up, we always try again when a DMA
> > transfer would be possible. The downside is that there is more overhead
> > for setting up every DMA transfer.
> 
> ... for setting up every PIO transfer?
> 
> Once DMA is available, it's just one extra variable check.

ACK. Mixed that up.

> 
> > Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > ---
> >  drivers/i2c/busses/i2c-sh_mobile.c | 98 +++++++++++++++++++-------------------
> >  1 file changed, 48 insertions(+), 50 deletions(-)
> >
> > diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
> > index 636f2297143a..ea7b99212fa6 100644
> > --- a/drivers/i2c/busses/i2c-sh_mobile.c
> > +++ b/drivers/i2c/busses/i2c-sh_mobile.c
> > @@ -144,6 +144,7 @@ struct sh_mobile_i2c_data {
> >         int sr;
> >         bool send_stop;
> >
> > +       struct resource *res;
> 
> I thinkk you can just store dma_addr_t port_addr here.

Yes, but I liked the resource better :)


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-12-16 11:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-10 13:21 [RFC 0/2] i2c: sh_mobile: don't regress on deferred probing Wolfram Sang
2014-12-10 13:21 ` Wolfram Sang
2014-12-10 13:21 ` [RFC 2/2] i2c: sh_mobile: rework " Wolfram Sang
2014-12-10 13:21   ` Wolfram Sang
2014-12-10 13:44   ` Geert Uytterhoeven
2014-12-10 13:44     ` Geert Uytterhoeven
2014-12-16 11:35     ` Wolfram Sang [this message]
2014-12-16 11:35       ` Wolfram Sang
     [not found] ` <1418217709-26392-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2014-12-10 13:21   ` [RFC 1/2] i2c: sh_mobile: refactor DMA setup Wolfram Sang
2014-12-10 13:21     ` Wolfram Sang
2014-12-10 19:06     ` Sergei Shtylyov
2014-12-10 19:06       ` Sergei Shtylyov
2014-12-16 11:34       ` Wolfram Sang
2014-12-16 11:34         ` Wolfram Sang
2014-12-16 21:06         ` Sergei Shtylyov
2014-12-16 21:06           ` Sergei Shtylyov
2014-12-10 13:49   ` [RFC 0/2] i2c: sh_mobile: don't regress on deferred probing Geert Uytterhoeven
2014-12-10 13:49     ` Geert Uytterhoeven
2014-12-10 14:19     ` Wolfram Sang
2014-12-10 14:19       ` 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=20141216113523.GB10958@katana \
    --to=wsa@the-dreams.de \
    --cc=geert@linux-m68k.org \
    --cc=horms@verge.net.au \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    /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.