From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH 3/9] spi: sunxi: check that transfer speed is non-zero Date: Thu, 20 Aug 2015 23:23:36 +0200 Message-ID: <20150820212336.GJ30520@lukather> References: <3688fab67e7cdc7bcbff73dfd6b0fcdcc4e79eb6.1440080122.git.hramrach@gmail.com> <20150820144836.GV30520@lukather> Reply-To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jcZk2Ix8j3PVOBnV" Return-path: Content-Disposition: inline In-Reply-To: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Michal Suchanek Cc: linux-sunxi , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Mark Brown , devicetree , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , Linux Kernel Mailing List , linux-spi List-Id: devicetree@vger.kernel.org --jcZk2Ix8j3PVOBnV Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline On Thu, Aug 20, 2015 at 09:45:07PM +0200, Michal Suchanek wrote: > On 20 August 2015 at 16:48, Maxime Ripard > wrote: > > On Thu, Aug 20, 2015 at 02:19:46PM -0000, Michal Suchanek wrote: > >> When the maximum transfer speed is not set for a SPI slave the value > >> remains 0 and the code in sunxi SPI divides by it. Use an arbitrary > >> speed instead in that case. > >> > >> Signed-off-by: Michal Suchanek > > > > spi->max_speed_hz is set using the spi-max-frequency property, and > > spi->will error out if that property isn't set. What am I missing? > > > > Spidev I guess. > > You can set the speed to arbitrary value from userspace at any time > using the spidev ioctls. Then why should it be fixed at the controller driver level? It looks more like an issue that impacts everyone and should be fixed either in spidev directly or in the framework. -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --jcZk2Ix8j3PVOBnV--