Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3588569ybi; Mon, 29 Jul 2019 09:06:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMoSUj7eRIvD/gt4iFJSvRjXTwC5akSSVjuJx2XAkQIAoTc0Z23rUXSu9Uv0tOjoTKPBS3 X-Received: by 2002:a63:5b52:: with SMTP id l18mr105270301pgm.21.1564416370043; Mon, 29 Jul 2019 09:06:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564416370; cv=none; d=google.com; s=arc-20160816; b=hreZEUI64MJGCW8e6xA8tpwiJEtpoKlT+LTWptTOVe64hSIIXDM4f5dYequXAxr2/t yjqeqWbWlsKXrAQ92pIqpyxBJ0Xwv7EVpcdVwRhozWG6s6pDdRegkFe+F6rGnShPYEop ngzAPHyP0I+WwKX3LGea1HtvumI73tAON6TDnsORIH0lci2sjpGlE0/gZU/EIloljLDG f3L0YjBOMSeWv3SsMhvOFAleiy73KljDkjbUaFqjvzyHsStlIK4vsFu6tnRPwsiof0Ce jlYvV7+AEmOjaVTG7E/62NHiqmP6qmOeBDMYYa+DAyBc8vQkhmbsiCpOXQwNoLU4rCLE v6ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vzLD2iW6uYsbIT0oPIQPOII/1STR8lKUywRD1hVm9Ws=; b=h2tvPZ4gyy7dsoRtNE2ZQgy5l8nqHtWIiPNgu+a8jObsuGgS67ohZC2DZpQ2vXM5gJ qou/NKC+BIW1E08NOe71hQwF0gRvpnrutFvV2Np37fdMIIIzrYsVQavT0b/D6ASZh16m 2YtoKHu1qM5R75Pj6pVV0LaHC4h5lh/kDB2o4UlMnLdKaO4xMS/hp8w7J8qvpzVBsILT 5fb9a4xnV3CLX0zm0ej5sfieT8H47C8+Pwy5zgqTiBg4xWQN2hlA/Q2/BnO66ESkCUAY /5Xewl+f/KsWWEHyeyW4E8Al0MDsbAQ8Jc0zYU6q4ggBACJwSrF4eeJxJydUcIFKvVCV IGAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Kvbooi9h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m128si26071858pfm.97.2019.07.29.09.05.53; Mon, 29 Jul 2019 09:06:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Kvbooi9h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387454AbfG2NWY (ORCPT + 99 others); Mon, 29 Jul 2019 09:22:24 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:39078 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387413AbfG2NWY (ORCPT ); Mon, 29 Jul 2019 09:22:24 -0400 Received: by mail-io1-f66.google.com with SMTP id f4so119937769ioh.6; Mon, 29 Jul 2019 06:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=vzLD2iW6uYsbIT0oPIQPOII/1STR8lKUywRD1hVm9Ws=; b=Kvbooi9hS7TpZtc5jFcX5PRvKHvgvbySDxOdPNmd6gpDPiNcAlamrAZrG8gFqhFsUA LJB/9aVGl1zFn71NgI8QOz0JVeC873/494ALaAuQ95RyBaA2MbDO4KHBmj/eePkbT5oX 5uRnjkZ4BFqoMqy1/62sMqXQ8CrfBt+VWz5jhAzmX8LKu7hofqCX9oYQD42ybccxf+2x IpBCbE21sCuCn/PCxMQ5nZcq9qDDiuZOLxJoznJuTyuYP7EL+7wo/bjq6ExhCLQEFYTX 4asN+xx2/PVIaekt5ux8AGz6JMSCTLjRcAFUFtqkSgKxQTeS019KHPP9Id1vgD4BYa38 uU+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=vzLD2iW6uYsbIT0oPIQPOII/1STR8lKUywRD1hVm9Ws=; b=DESzfwEu64SiwrblxdRA8HHqQSl45nSA3aa/lVxZoAhCikig886nGEAWeoTXyQn9MC GAcaVv5p+VzPVTAEA11pNX3kCVZdzWA8Uc/NPIvPagbLlO7euGHR5PLA0PoamCzxmqJ/ KsKkElUFy1+oYk3UvKsqBgrtTvyZF1EZ4i3//U6uH+B9ZCpKTTiUzahwy+Bvq/MBqpqt RkG+iUcZrCs2MTPd6NE7LO6t/o62PEBFQi9alD4NcH8tGSu0Ax43AAkMVzSnnUtkxpU8 cKVHVCiT7xqnuEO9N4QcvB49JnqzBpc4R7I0qd6r41GizBhQrceMHYlpPYmaDoPLnQv5 41lg== X-Gm-Message-State: APjAAAUEyfyxqPbvgLn+DmYqjuPp48CH3MmXU/jJUCp5QDluo4RHNQu5 SjRoAGi2j/B1OC0MJ3fFCHg= X-Received: by 2002:a5d:834f:: with SMTP id q15mr30847950ior.59.1564406542921; Mon, 29 Jul 2019 06:22:22 -0700 (PDT) Received: from localhost ([8.46.76.96]) by smtp.gmail.com with ESMTPSA id u4sm59826788iol.59.2019.07.29.06.22.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2019 06:22:21 -0700 (PDT) Date: Mon, 29 Jul 2019 15:22:03 +0200 From: Dmitry Torokhov To: Ronald =?iso-8859-1?Q?Tschal=E4r?= Cc: Andy Shevchenko , Mao Wenan , Federico Lorenzi , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] Input: applespi - register touchpad device synchronously in probe Message-ID: <20190729132203.GB1201@penguin> References: <20190721070523.24695-1-ronald@innovation.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190721070523.24695-1-ronald@innovation.ch> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ronald, On Sun, Jul 21, 2019 at 12:05:23AM -0700, Ronald Tschal?r wrote: > This allows errors during registration to properly fail the probe > function. > > Doing this requires waiting for a response from the device inside the > probe function. While this generally takes about 15ms, in case of errors > it could be arbitrarily long, and hence a 3 second timeout is used. > > This also adds 3 second timeouts to the drain functions to avoid the > potential for suspend or remove hanging forever. Question: is it possible to read command response synchronously as well? I.e. I was wondering if we could add 2 (or 1?) more read xfers for the actual result that is coming after the status response, and then we could use spi_sync() to send the command and read the whole thing. Thanks. -- Dmitry