From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932116AbcGBBp4 (ORCPT ); Fri, 1 Jul 2016 21:45:56 -0400 Received: from mail-pf0-f170.google.com ([209.85.192.170]:33303 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752014AbcGBBpz (ORCPT ); Fri, 1 Jul 2016 21:45:55 -0400 Date: Fri, 1 Jul 2016 18:45:52 -0700 From: Andrey Pronin To: Mark Brown Cc: linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org Subject: Re: [PATCH 1/4] spi: Add option to wake a device by toggling CS Message-ID: <20160702014551.GB27937@apronin0.mtv.corp.google.com> References: <1467258867-117727-1-git-send-email-apronin@chromium.org> <20160701080230.GB6247@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160701080230.GB6247@sirena.org.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 01, 2016 at 09:02:30AM +0100, Mark Brown wrote: > On Wed, Jun 29, 2016 at 08:54:24PM -0700, apronin@chromium.org wrote: > > From: Andrey Pronin > > > > Some SPI devices may go to sleep after a period of inactivity > > on SPI. For such devices, if enough time has passed since the > > last SPI transaction, toggle CS and wait for the device to > > start before communicating with it. > > This seems incredibly specialist, I can imagine someone might implement > something like this but it really feels like something I'd expect the > driver for the device to be doing rather than the core. Is it really a > bounce that's needed and not something like putting a small delay after > asserting chip select? Yes, I agree it's quite device-specific, though, I guess, more than a single device can benefit from that. I'm playing with it now to see if I can indeed move it to a more device-specific driver from generic spi. It is indeed a bounce and a rather long delay to let the device actually wake from a long sleep, go through internal startup, test, etc.