Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp704173pxa; Wed, 5 Aug 2020 10:43:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/E75sWc09YSOdptUNkD8xbmlyAAn95DmD/rHTGONp7ShrjnfYxy5cL09e1Su/9WxBP+hi X-Received: by 2002:a05:6402:b87:: with SMTP id cf7mr360655edb.131.1596649419375; Wed, 05 Aug 2020 10:43:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596649419; cv=none; d=google.com; s=arc-20160816; b=jtMcQzwGhQRgNeVWNCbXD2HvxCt493f6JHL4rtPqDbYITDKH/G/x9HRUagO486b1LI 9LwPd5tuqmZ60k2+i3UDLA+gtsv2jQGlmxq+0mTBo+MJN+a4H+YahfcJ6zOgnr8IXv+v J3rdfOubVWriGGOCg7y70ps/WeQcB7jicfS/LoB3iysBLIsKgzKdWA6+jE2x12o3yOzA A9adnVxX0LuUG2/BUVV2OPXu+Fsmq8Cc1t/qPFsk0ltNWyYLKiHKsBMkP5tngfPhAXae C4/kOonsqimZk2EGkaGTysmb5KBf3RGpVhveFO0pE4dIXoU2ybr7OAQgkCdgHDfNfTcv jLZQ== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=TbS7iRaTXW6gIF2moNt9P9j9iuYEa5/AfNJvDr+nAF0=; b=pi26lDCd6BL+jXYWt3JpoJRdTnvn4WOvOwurwqdRoLDGZUAPUIRcbO5/bctC/aWHSl PNDnmYoeQt0TRBTcTVueds66FINHaB3JMnXIWJwKr5uPnFNmYxzUMtWS+rjzj67KVSk8 WXSidr+KP36TvbOdpXKh1KFW8OWqLCVi+2k4sKPWQSjScSxdX8zzTqaThi55I0dtjglz OqBUVoZVPBXZRh6XjCjgGJgGwxovgM2kO0miBe+95KQt6mEpOuBsLTqy/rg1KW8BSOJU SA4YB/GgGf2RTK54NCypNmrKTZS8KbhuS3SutALVyiGt6oiV5uHJ0ge3UtKXtxpO3t9q Dyrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vjiEPe14; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w1si1589899eds.83.2020.08.05.10.43.01; Wed, 05 Aug 2020 10:43:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vjiEPe14; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728856AbgHERmn (ORCPT + 99 others); Wed, 5 Aug 2020 13:42:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:42146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728900AbgHERkV (ORCPT ); Wed, 5 Aug 2020 13:40:21 -0400 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1020622CAE; Wed, 5 Aug 2020 11:01:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596625308; bh=E48uURU/e4C3y5TjlfnNrUSBQnpVCadc+z+Vd9h/kdU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vjiEPe14+OtcSgTUe6IvKe9v7YtFnMHcqLyu1+yzJV2lHJlinrgdZttz+o/8wF2Pn kjWCfnTxkN2Yt08lbE1MOKOyiYlxVVYDwGj7fNWqJoh2bRTgpr9ZnCA1QsL5FJRKXD 2Qe0hIMyvTa1JtLSs+tAhtngoaoynx1LzvqEakcg= Date: Wed, 5 Aug 2020 12:01:25 +0100 From: Mark Brown To: Alain Volmat Cc: amelie.delaunay@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, linux-spi@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, fabrice.gasnier@st.com Subject: Re: [PATCH 12/18] spi: stm32: move spi disable out of irq handler Message-ID: <20200805110125.GG5556@sirena.org.uk> References: <1596610933-32599-1-git-send-email-alain.volmat@st.com> <1596610933-32599-13-git-send-email-alain.volmat@st.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KR/qxknboQ7+Tpez" Content-Disposition: inline In-Reply-To: <1596610933-32599-13-git-send-email-alain.volmat@st.com> X-Cookie: Fast, cheap, good: pick two. 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 --KR/qxknboQ7+Tpez Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 05, 2020 at 09:02:07AM +0200, Alain Volmat wrote: > From: Antonio Borneo >=20 > The spi disable could potentially require some time to finish. > It has to be executed at the end of a transfer, but there is > no reason to call it in the irq handler. >=20 > Simplify the irq handler by moving out the spi disable. The > synchronization through xfer_completion is used to defer the > execution of spi disable. Should this be an unprepare_transfer_hardware() operation? That would allow the framework to take care of scheduling this in an appropriate context with the added advantage of not needing to do it when there's another message scheduled immediately. --KR/qxknboQ7+Tpez Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl8qkYUACgkQJNaLcl1U h9Amcwf/Z9jbsoaJGZe0lTnEB+ZN1x7Xo629kRG1It/WXDUx01vXa/0BIFFomSB8 5z4skhqGXkfncS+6lCZzBW1dJjVMTxJTXztD4zCbb45cYbGA+rjWIn2JPMvHLLxO swSm5Poy0PDGddU6aVh9PrZgMJXe6z5+hogGuIfxuPIdDi0gudqZ6mxH1N7emcQh 52kzLDjvPtfeYESQYhtaCyD/MDbrAvSPC/946BHXzIcDWpWeHJIsdNUQCghTUHHg D3dpBhZhYrJfaE8Iv81hlGdlEbzrRDsmdJLi918xEECHBPWEoKItosC0DRKFVo2q /gSifjQBt0a6jA65RbRP4i8WXRUTNA== =6vOj -----END PGP SIGNATURE----- --KR/qxknboQ7+Tpez--