Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754856AbdGVWHN (ORCPT ); Sat, 22 Jul 2017 18:07:13 -0400 Received: from mail-oi0-f52.google.com ([209.85.218.52]:33715 "EHLO mail-oi0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750921AbdGVWHL (ORCPT ); Sat, 22 Jul 2017 18:07:11 -0400 MIME-Version: 1.0 In-Reply-To: <90b3e14d-0077-9a25-9d90-ab340577af57@web.de> References: <90b3e14d-0077-9a25-9d90-ab340577af57@web.de> From: Andy Shevchenko Date: Sun, 23 Jul 2017 01:07:10 +0300 Message-ID: Subject: Re: [PATCH] spi: pxa2xx: Only claim CS GPIOs when the slave device is created To: Jan Kiszka Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Mark Brown , linux-spi , Linux Kernel Mailing List , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 872 Lines: 24 On Sat, Jul 8, 2017 at 11:41 AM, 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. Sorry for late reply, this patch makes impossible to use GPIO descriptors. Now it's broken in two ways as I can see. I fixed one, and is right now hunting another problem. P.S. Perhaps no need to revert, just heads up. (That's why would be better to have GPIO descriptors everywhere in this driver and tested) -- With Best Regards, Andy Shevchenko