mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrey Pronin <apronin@chromium.org>
To: Mark Brown <broonie@kernel.org>
Cc: Doug Anderson <dianders@chromium.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-spi <linux-spi@vger.kernel.org>
Subject: Re: [PATCH 1/4] spi: Add option to wake a device by toggling CS
Date: Fri, 1 Jul 2016 19:02:17 -0700	[thread overview]
Message-ID: <20160702020216.GA31918@apronin0.mtv.corp.google.com> (raw)
In-Reply-To: <20160701171708.GC6247@sirena.org.uk>

On Fri, Jul 01, 2016 at 07:17:08PM +0200, Mark Brown wrote:
> On Fri, Jul 01, 2016 at 10:05:50AM -0700, Doug Anderson wrote:
> 
> > I'm curious why you you need a timer at all.  Can't you just keep
> > track of the jiffies that you last sent and do subtraction?  ...or you
> > could get even more accurate and use a ktime_t.  That avoids a whole
> > lot of synchronization / locking issues too...
> 
> Yeah, that'd be a lot better.
> 
> > Also: presumably you'll need to make sure that there's some margin in
> > this whole thing.  I'd imagine that if the timeout is 10000
> > nanoseconds and you do the calculation and you last sent 9999
> > nanoseconds ago then you might decide that the other side isn't asleep
> > yet.  ...but by the time the transfer starts it might be asleep...
> 
> Indeed.

Lots of godd points in the feedback. Let me re-visit the whole idea.
And may be I'll move it to a more device-specific driver.

  reply	other threads:[~2016-07-02  2:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30  3:54 apronin
2016-06-30  3:54 ` [PATCH 2/4] spi: Document " apronin
2016-06-30  7:12   ` Geert Uytterhoeven
2016-07-01  4:32     ` Doug Anderson
2016-06-30  3:54 ` [PATCH 3/4] spi: Add option to insert delay between transactions apronin
2016-07-01  4:44   ` Doug Anderson
2016-07-01  8:16   ` Mark Brown
2016-06-30  3:54 ` [PATCH 4/4] spi: Document " apronin
2016-06-30  7:12   ` Geert Uytterhoeven
2016-07-01  4:45     ` Doug Anderson
2016-07-01  4:23 ` [PATCH 1/4] spi: Add option to wake a device by toggling CS Doug Anderson
2016-07-01  8:21   ` Mark Brown
2016-07-01 17:05     ` Doug Anderson
2016-07-01 17:17       ` Mark Brown
2016-07-02  2:02         ` Andrey Pronin [this message]
2016-07-01  8:02 ` Mark Brown
2016-07-02  1:45   ` Andrey Pronin

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=20160702020216.GA31918@apronin0.mtv.corp.google.com \
    --to=apronin@chromium.org \
    --cc=broonie@kernel.org \
    --cc=dianders@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.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

all inboxes | Powered by JetHome®