Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3597165imm; Mon, 8 Oct 2018 06:39:59 -0700 (PDT) X-Google-Smtp-Source: ACcGV60VmTjvkg6SN4UCCWNWuUJW5SqEEis5V+dLqFYUAZg2ehVptnd4xPKjX4xwOKIIuWs3Mozd X-Received: by 2002:a17:902:368:: with SMTP id 95-v6mr19258005pld.319.1539005999739; Mon, 08 Oct 2018 06:39:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539005999; cv=none; d=google.com; s=arc-20160816; b=EJDCFU0PWY7h9tqzEuHW6Dg8x/dUc5WcL0EkRAb+J1x14tE0N+lyjP3befdN8kIFi2 yOUkj9E0iDV8+XWOZcu0idur60RGwAkU4TnK9qgVKK/9iQYg0cF8shzn8PEH4iamGXki 74UkUU8oONgJfL1Bzxf7pwxXbit/C/H6zxpaKSYujs0tkPvhguhkSb+kx6vdfN+I8BJu 0UxSMspUD6AWfH3AzVKrHA3DPv3yobKH88BdCLQT+DrH8ixlwtoB3lFGZxbQ5ZEM17RN LBkpRodrSrgOcGVQA6ConwrvgMfpBOiueoiqtjbgh/7WY6lna3JbSUJf/Kv3kOkB/IeK WssQ== 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=KRLGvdgV7yJaJM/2A9dS7h4FdA9IzgGl5Wq7tpW7wrg=; b=mM75V8IxgMAbRQfnG+BC2ERjQYFQXM7+smnTC0L0WRaSHpVQKvJibl4M26St0RDSqY D8KoooQL29D82S0DQxCrAmB4CWps2WRz/TMxSAjiWrR/G/HdeSsdHhW1rU0jXP9wlUic 8nQEqvpvh1NdfxiH66M843C2qGQlTLgLjey354rH5wfUr5hbwPvZWRP7lqPhG4KeY+VA WoVqJa56dwBvEPlGQSxHdXiZsR5JFxwHXDts2cZgv95VcZ31tmigQpfiPorc+s5G6vD7 30VjqUrpyBOIYZ8eEs9GM32Y0JNwH4qhMX7Icjr+H6WeRZtBxTXQY2uEQcaAjCijR4GE mJhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=tguOTfT1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18-v6si17044543plo.191.2018.10.08.06.39.44; Mon, 08 Oct 2018 06:39:59 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=tguOTfT1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726663AbeJHUtq (ORCPT + 99 others); Mon, 8 Oct 2018 16:49:46 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:33900 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726434AbeJHUtp (ORCPT ); Mon, 8 Oct 2018 16:49:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KRLGvdgV7yJaJM/2A9dS7h4FdA9IzgGl5Wq7tpW7wrg=; b=tguOTfT15qwDR5m1OXvNTcrKP HvfZod27X83TsuIRDoDZzZuU7sXk3MI5O+r5/3/ND/JGi0ZZYWxf3mmXh9XHcVwcbJFZbtmrmNo6N 74khElosi4CFRVp/AS5XnWhwI5tF4r1tWOU1AOOs6T/ov0GuYp+hSuF8jLMtOnIsozz8Y=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1g9VjN-0002ek-CP; Mon, 08 Oct 2018 13:37:53 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id F100E1122339; Mon, 8 Oct 2018 14:37:52 +0100 (BST) Date: Mon, 8 Oct 2018 14:37:52 +0100 From: Mark Brown To: Boris Brezillon Cc: masonccyang@mxic.com.tw, tpiepho@impinj.com, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, juliensu@mxic.com.tw, zhengxunli@mxic.com.tw Subject: Re: [PATCH v4 1/2] spi: Add MXIC controller driver Message-ID: <20181008133752.GF5684@sirena.org.uk> References: <1538965532-8908-1-git-send-email-masonccyang@mxic.com.tw> <1538965532-8908-2-git-send-email-masonccyang@mxic.com.tw> <20181008103812.106389c1@bbrezillon> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vA66WO2vHvL/CRSR" Content-Disposition: inline In-Reply-To: <20181008103812.106389c1@bbrezillon> X-Cookie: There's no time like the pleasant. 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 --vA66WO2vHvL/CRSR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Oct 08, 2018 at 10:38:12AM +0200, Boris Brezillon wrote: > This is wrong, ->cur_speed_hz should be updated in > mxic_prepare_transfer_hardware() or mxic_spi_clk_check(), not when > ->setup() is called. Also, you seem to ignore the xfer->speed_hz value, > which might be different from spi->max_speed_hz. Maybe the > ->prepare_transfer() hook is not the right place to do this > ->cur_speed_hz selection in the end. xfer->speed_hz should always be filled in so it's the only one you need to pay attention to (as the code Boris proposed does). --vA66WO2vHvL/CRSR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlu7XbAACgkQJNaLcl1U h9Azggf+KEqx8zCV97yIui9BQiy+hHtNztRjvGmyBDUh20puENxqOTeWCYwoat8g tnlAllUGejF3B1Dfv3sgGinOrXrvfpLexIL59YZp76X9DN+sEliRyR98dvvgKp2L 38b5xMG1+gzHS0Agv+8cGVuWocAVCyr2jH++siOVJZ/liJEatZl/jtvGNsAztDeg /sHLWbdckRtd/63c43o6sXbn3jAA06lyto1EFauYt4V63beRC3p8OXasmPU/fwn5 i0N7MX1Zs3xx4hJENMgGAMF/e8Vrj7bD5cVH4YEd+sRAAd2/njTBdf1AVrk5/7dj /V8SPMbNr4Y+RwHIodVt8hs2KvUY5w== =XY4n -----END PGP SIGNATURE----- --vA66WO2vHvL/CRSR--