Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752046AbdHDK3f (ORCPT ); Fri, 4 Aug 2017 06:29:35 -0400 Received: from mga05.intel.com ([192.55.52.43]:59040 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751291AbdHDK3e (ORCPT ); Fri, 4 Aug 2017 06:29:34 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,320,1498546800"; d="scan'208";a="119693800" Date: Fri, 4 Aug 2017 13:29:29 +0300 From: Mika Westerberg To: Jan Kiszka Cc: Mark Brown , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Andy Shevchenko , linux-spi , Linux Kernel Mailing List , linux-arm-kernel Subject: Re: [PATCH RFC 2/2] spi: pxa2xx: Only claim CS GPIOs when the slave device is created Message-ID: <20170804102929.GY2369@lahna.fi.intel.com> References: <5a691263ccf9d61134d6184861b37eaf37b13b77.1501760433.git.jan.kiszka@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5a691263ccf9d61134d6184861b37eaf37b13b77.1501760433.git.jan.kiszka@siemens.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 627 Lines: 15 On Thu, Aug 03, 2017 at 01:40:33PM +0200, Jan Kiszka wrote: > From: Jan Kiszka > > Avoid hogging chip select GPIOs just because they are listed for the > master. They might be mulitplexed and, if no slave device is attached, > used for different purposes. Moreover, this strategy avoids having to > allocate a cs_gpiods structure. > > Tested on the IOT2000 where the second SPI bus is connected to an > Arduino-compatible connector and multiplexed between SPI, GPIO and PWM > usage. > > Signed-off-by: Jan Kiszka Acked-by: Mika Westerberg