Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp977223ybv; Thu, 20 Feb 2020 10:43:48 -0800 (PST) X-Google-Smtp-Source: APXvYqwDiw3HNxsTEsnd1QETa+4wAWTDDnrCoKxMg4frWP+DiNPLdOMOrAquH35jC7/mu5HZewel X-Received: by 2002:a9d:7e90:: with SMTP id m16mr23279809otp.227.1582224228016; Thu, 20 Feb 2020 10:43:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582224228; cv=none; d=google.com; s=arc-20160816; b=tgEPygjn3gSpwItFWV9oLYkhplpMpvgeupD00Tj1AwGDJ9RYrYZMk4ftz9RWFvm5z5 5QwHL0n5U2MjY0UHxWUhAJ7Khg+TdVBotO/X4cP+5WYdoJlqQR5CaUtpeL7YVMD4JoAr 2JZcRmcmt7Manqe4rJXneZ6cef1Dfk1iWCQHNoWDMjow883/8dh7masg/PopIB9Ib4qR TwoW0BCwMvwf0zDkcDJtixLNS77zdan34hRealyrDt1COiM0Ozucth7F5zSTk1ooHKRT FAly33/JX61efWEPqr95Iz4erGrwNmcUeQhI5ghXNP7v9Hp1l4Zqa5SqwV4vy2vIclEi h0+Q== 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; bh=lItGgZjLwVVBKaZ+GusL4cCe7ILfsJxrmcYt11ojqf4=; b=hBMeGFRdk0Ddd+cNoyf5SziHH7BCw4+m5MsUtR9DnBeEEEubiHA5vioLfSP4hYjlqA zMa3N4hvBIYs2jycu9SICtjuu69aMJZecvw/cJtNxV9tu4B3uBmxqbIW7V9unJ6+u1x7 PZXXONd1Oq6auhOZ5jwunN7xtJBnV+F//oVIngLzndNaeMxxE2KCkbP6B0TpL8FIIwul IzFygYWwCidF4WV2VpuvcTCPtzEaCAH+pAQ7HM+71xMmKnCY7O4Z3pKURl+SRz+myAR3 EG7jd3In4ybFYfedc3wjMhaw5TXxEM3qGowHmfjY03QT7iqbanblUf+ey15Hg6Qkhk14 artA== ARC-Authentication-Results: i=1; mx.google.com; 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 g26si97253otk.324.2020.02.20.10.43.33; Thu, 20 Feb 2020 10:43:48 -0800 (PST) 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; 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 S1728855AbgBTSmE (ORCPT + 99 others); Thu, 20 Feb 2020 13:42:04 -0500 Received: from foss.arm.com ([217.140.110.172]:49386 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728336AbgBTSmE (ORCPT ); Thu, 20 Feb 2020 13:42:04 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EC53730E; Thu, 20 Feb 2020 10:42:03 -0800 (PST) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 62B213F6CF; Thu, 20 Feb 2020 10:42:03 -0800 (PST) Date: Thu, 20 Feb 2020 18:42:01 +0000 From: Mark Brown To: Oleksandr Suvorov Cc: "linux-spi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Oleksandr Suvorov , Marcel Ziswiler , Igor Opanyuk , Philippe Schenker Subject: Re: [PATCH 2/2] spi: spidev: fix a max speed setting Message-ID: <20200220184201.GE3926@sirena.org.uk> References: <20200220141143.3902922-1-oleksandr.suvorov@toradex.com> <20200220141143.3902922-3-oleksandr.suvorov@toradex.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ey/N+yb7u/X9mFhi" Content-Disposition: inline In-Reply-To: <20200220141143.3902922-3-oleksandr.suvorov@toradex.com> X-Cookie: You are number 6! Who is number one? 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 --ey/N+yb7u/X9mFhi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Feb 20, 2020 at 02:11:51PM +0000, Oleksandr Suvorov wrote: > SPI_IOC_WR_MAX_SPEED_HZ command always sets spi->max_speed_hz > to the initial value come from DT. This is intentional. It's doing a call to spi_setup() then restoring the original value, the goal being just to run spi_setup() with the new value - it's not really a good idea to change the maximum speed in the first place. > It leads to set a wrong max speed with IOCTL call. In what way does it lead to the wrong speed being set? > Fix the logic of a max speed assignment. If the expectation is that the default speed should be changed for the device this should be handled at the spidev level rather than in the core. --ey/N+yb7u/X9mFhi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl5O0vgACgkQJNaLcl1U h9CHKAf/SBwTBBlMx+ka5Ypwl270AEXWAyIyvIekkMZzI/QmE0TkpWpCeBaVyVsK alxy6DfOGTWecBIn8m/uvMxa/05NxIqlN3PNtXySaEVuMwMePIACJXMNQeg744tu 7iVPnBD94Cdoc7aLsRp8qFBV4FY2xTt2ZaEWNR/5uruIYpfCu/fQpuTG2bPhuO+1 jXGkR4iZLHsHeijEXllLPSOFUMtuqdpPu10rtclYM9gXLDgDxGasdMSkn6MZbm1A Tj8EPQmque2xnm/YCmqJLE3CsKiknqG6p3DoAaZHS8y1njbvzpAmQ77oinV1XrH2 JyGnqCRwyKIcxuGjeugW2NmUMmQQ3Q== =D9Fo -----END PGP SIGNATURE----- --ey/N+yb7u/X9mFhi--