From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752477AbcGARRc (ORCPT ); Fri, 1 Jul 2016 13:17:32 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:34338 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751699AbcGARRa (ORCPT ); Fri, 1 Jul 2016 13:17:30 -0400 Date: Fri, 1 Jul 2016 19:17:08 +0200 From: Mark Brown To: Doug Anderson Cc: apronin@chromium.org, "linux-kernel@vger.kernel.org" , linux-spi Message-ID: <20160701171708.GC6247@sirena.org.uk> References: <1467258867-117727-1-git-send-email-apronin@chromium.org> <20160701082101.GD6247@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="U/fatWn3w9i48dtV" Content-Disposition: inline In-Reply-To: X-Cookie: You are always busy. User-Agent: Mutt/1.6.0 (2016-04-01) X-SA-Exim-Connect-IP: 137.158.23.187 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 1/4] spi: Add option to wake a device by toggling CS X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --U/fatWn3w9i48dtV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --U/fatWn3w9i48dtV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXdqWTAAoJECTWi3JdVIfQpPcH/1RqynNoVoaPwW+/duV91Qd2 Q7QjYYWLqYiUI+5RcRjw21/gL58brlYLWwvXpexrr8IjSc4HAkkrM4UbjMFuy7H0 skrCzk6Wz/3Att+ajLr9PFELMBQBlA90tLyIqDUkKzLq8kgGyXfZeIpaIRQxLBX8 xy9GfaZnxWTxoDu2mQNkuwlXnKKlflmEpS/QNCUKmu4GtCSNv9TXbHB8E+iO1CwP O2FyqVQwlsB+K4/46Ey6TjN/LEO9y6KbQeLXjHJZpLwF2gmm4F1hMOE04qVUj0Ze NnR+EO5VNmTyzLBToO9ikg65BMiOWTApLla+d7brOpbW3suwnEjqz0T+xbkNxSM= =6xhk -----END PGP SIGNATURE----- --U/fatWn3w9i48dtV--