Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2944778imm; Thu, 24 May 2018 19:36:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqzrtTlld6oWMi+m/YEgJ/8NuH+h8172l/1Xiq17IYOPJj8qWN9HscVf3FqyltSJ5YWYyvf X-Received: by 2002:a17:902:1e2:: with SMTP id b89-v6mr574491plb.279.1527215813493; Thu, 24 May 2018 19:36:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527215813; cv=none; d=google.com; s=arc-20160816; b=NqutDJ98K/1F3+DyMSTZf9OoLRfH6GrOLrpTrbXenKNleDnzBpkycJBBoePni8EveZ SmI8YFcneIYoeU11EbE9Qu4LGgT5LRSszLB524tvsryUFft9mDR24zHiepd7g4iteYiL yPIDC2n6W3xfp46PMRmfIPZ7yTuYrVBtE+L8PQ2DeHWXH9QXVceMU708C44bsfl7V2qN CwcliwIiXjTCK7smagCBJcLg+tSbKgi246qZiO82BSbHpEeKHdDeLkdeEM7lyly7SWrd KC0FxKtt0IzV9IJaGAg+SKSsc0WvvUYYxuuSh5arjD7RJUSDjtVrxwBtNhBDNA6jZfYs pXJw== 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:arc-authentication-results; bh=aPvvEsWkAPzBTzhyd6RC60eU3xV67lYX/ATdJv3Tizk=; b=sw11XSm1BZ1U/jk484/HYxoN/eN1eRPeSV+qmjj66rMCuXgWDPp0vTE1NqMRZrDM9q kwnitdO79FZbVDCR/1Btb9iJMDhCoXDdK4fLxz/KOkQcWMFpSJS6ahrsib542p5IzqxX xYTCBybhG+omcmr/IhCZNU19QO0c8gmyRCc3kv3caIwOixiU23n5xuvOXNrvUxV+bvU3 kb4f5Cu2dlUO8kCaHHotyU7SuPRkF3NIKTuulfbCD4AGtCa9D4A76sZcvN/geeRLvod8 AnIxxc2lf3eBZnotMZGz6MCurATiAwUidNGDHuRUSuidQft6DMkhvEbnrMF8ldBayCD+ /FtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=vK/Now6K; 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 x7-v6si23936339plo.303.2018.05.24.19.36.38; Thu, 24 May 2018 19:36:53 -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=vK/Now6K; 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 S1034212AbeEXSPN (ORCPT + 99 others); Thu, 24 May 2018 14:15:13 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:41650 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030579AbeEXSPK (ORCPT ); Thu, 24 May 2018 14:15:10 -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=aPvvEsWkAPzBTzhyd6RC60eU3xV67lYX/ATdJv3Tizk=; b=vK/Now6KhKvDd7zVBMvuwahZ8 tJFw3L2PMZQ0sBdJ1pbWiQ6jT8M9u2ZFwQC525tdQlZZrBZJssgzGquNq+Q3iZ3FPnRWKdR1jlba3 gkGpEnHsChaujedxuX+9/pDZcGjVkPgBPWT/nR7QX+uqVG69h/TbWkEvx1We01OTjxV8Y=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fLulV-0006Iu-9u; Thu, 24 May 2018 18:15:05 +0000 Received: from broonie by debutante with local (Exim 4.91) (envelope-from ) id 1fLulU-00058h-Ch; Thu, 24 May 2018 19:15:04 +0100 Date: Thu, 24 May 2018 19:15:04 +0100 From: Mark Brown To: Radu Pirea Cc: Andy Shevchenko , devicetree , "open list:SERIAL DRIVERS" , Linux Kernel Mailing List , linux-arm Mailing List , linux-spi , Mark Rutland , Rob Herring , Lee Jones , Greg Kroah-Hartman , Jiri Slaby , Richard Genoud , alexandre.belloni@bootlin.com, Nicolas Ferre Subject: Re: [PATCH v3 5/6] spi: at91-usart: add driver for at91-usart as spi Message-ID: <20180524181504.GD4828@sirena.org.uk> References: <20180511103822.31698-1-radu.pirea@microchip.com> <20180511103822.31698-6-radu.pirea@microchip.com> <5a3930b867cf8c279953d08c5d5dd1d93113a43b.camel@microchip.com> <20180517045437.GE20254@sirena.org.uk> <0e6e71e2-f8ac-7889-0d81-8d8a4c15223d@microchip.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nM4qzG6nHdnn/sXd" Content-Disposition: inline In-Reply-To: <0e6e71e2-f8ac-7889-0d81-8d8a4c15223d@microchip.com> X-Cookie: Excellent day to have a rotten day. User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --nM4qzG6nHdnn/sXd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 24, 2018 at 07:04:11PM +0300, Radu Pirea wrote: > if (ctlr->cs_gpios){ > spi->cs_gpio =3D ctlr->cs_gpios[spi->chip_select]; > if(gpio_is_valid(spi->cs_gpio)) > gpio_direction_output(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH= )); >=20 > } You're expected to request the GPIOs in your driver using one of the modern request functions like gpio_request_one() (or ideally the GPIO descriptor APIs now) which combine the direction setting and request into a single operation. --nM4qzG6nHdnn/sXd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlsHAScACgkQJNaLcl1U h9BqxAf/S0gGqu0IMSK130ze8IY89SOLEGlgGuLh/vwkkGxSCgPr0mICv9ACiGpT OHwxAY3B5/c4pNaBy+fxG9lbX9ICC9h0KXlI8rR77QoswXGhgpJRPRHOQXMJM+jC xhqikX6tCNqY63QiW4RcVD8VwXZcD3oXZxCFxGuIOGApc/Rr9wEHnYixQALYVVLJ pYMXKkH5QPAjT8AhNVT0WP5kWKTdy1RGrxQUeDDfx3+sG/qon5/wsi0sv94/k2Mg JR4o9b3106ixUzdQg1unGL+yIJ1FXRuaAScxr40oxvTyq2g9Y3lSCeOM3mQ9As86 oTBXd72yVK8/rlDeP+58c6MCOeXOyg== =BBrr -----END PGP SIGNATURE----- --nM4qzG6nHdnn/sXd--