From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932121AbcDSOVs (ORCPT ); Tue, 19 Apr 2016 10:21:48 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:53380 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753077AbcDSOVq (ORCPT ); Tue, 19 Apr 2016 10:21:46 -0400 From: Arnd Bergmann To: "Reizer, Eyal" Cc: Kalle Valo , Eyal Reizer , "linux-wireless@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-spi@vger.kernel.org" Subject: Re: [PATCHv2] wlcore: spi: add wl18xx support Date: Tue, 19 Apr 2016 16:21:35 +0200 Message-ID: <4133521.UUI3B1RTyv@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <8665E2433BC68541A24DFFCA87B70F5B360C0745@DFRE01.ent.ti.com> References: <1460273570-12298-1-git-send-email-eyalr@ti.com> <1463330011.BhWEcYYuGD@wuerfel> <8665E2433BC68541A24DFFCA87B70F5B360C0745@DFRE01.ent.ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:SpBK0oBBXXTSVAFnJY35eg0AL8Rzj5pKQRBUZJcuUxFwk+kX+sg s3lKKcvsGN+kFrI0T/a1kCbMkJ6nyADFPnq6SCz7bfGC8SEQaJQChILE41RAFTiG6Pd+CVd dzrs0TLIZSLDFQg52i9eLZ9N3c3RB5Y2v9RAskzdOwsUw5hoviUX8De1ExWUAcewiROeO+8 Fy1VPvFyMJpInpa34bi6A== X-UI-Out-Filterresults: notjunk:1;V01:K0:1b/v5vZfepk=:l66cbVlBvxlfw0iO2mUGUD nijdHgWbOBqEze+RWUdi3rrxpmK7wsSu5itu92ZmB8F0rDjzNgXydxCFE+KnAsCZjZIbni6I5 C2tUDLLCIdLC3w0YobB6sBeBJTlHJ5lbcHt3ZuHFk7zKK0sEXTB6WNogM6/QlJvgDxgn1VZpD 0CD4pny2sGBJ1ERiI5eMU0qq0ZctaQnZr9TN0xvtPow7P9KJ+SUSw3bnXg2416Jb2QiT5+iww Cll4MbzcO33W8yiUxdgnVyvVzl/s7kRwzhmxVyJNok4hwJ0gOtNXYAuMjix4gfSBYW+OZayyv g+9m2GLdk7+8V81QIL1qToRkeHlPHdW9M6pb0UidrszmPRjH5SSveC4ZlwuukZeLdo81EIQRj bb+3YFiajkK1rXsz9+u47t1g3ADzvvQAgxS0zr5aYg3dtJVJ+H6yLV0f3Us7lhLqWtJQX4/YX bSEwwAg7D5KObXEk9L8COe3b+1Qxo7ILNbGX0p+gWzS7Ze4WBcAqRkHIINpi+A/rPcQN4DgY5 VdVPZ8lySuFiqEbT8po2aFmtNul78mqUPVIhd+QuGMOGKu6keFKRPOuaTyR56CZLofe76dPbm n3sjgQbdM6JlfWswXPaLjNbTF5QeB4A2YS8wb6Den/22DkyxG1fFiMmsiHX/WhnaF75L4A8L6 rnwKoGol8VbSuFcs3IjBDukkEvB5UQyIR4CDOr5E+UMB63iVObFQBuVyXmjlHlLDw+dYTdOiX ko6G5chvZyRukXOt Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 19 April 2016 09:05:45 Reizer, Eyal wrote: > > > It is also part of the generic spi.h (include/Linux/spi/spi.h), > > > already part of " struct spi_device" So it seemed redundant adding > > > another mechanism for implementing the same. > > > Platform that interact with a wilink need to use it, and platforms > > > that don't have this capability will probably not interact with a wilink device > > using SPI. > > > > The cs_gpio field in spi_device belongs to the spi host controller, no other > > slave driver uses it. > > > > I wasn't asking for a duplication of this mechanism, but an interface to use it > > properly. Internally, the spi core uses the spi_set_cs() function to pick a CS. > > Find a way to use that rather than reimplementing it incorrectly. > > > > Understood. As this special CS manipulation is unique to wspi (wilink spi) I think the > best option is to move this gpio allocation into wlcore_spi as a new device tree entry > used only by this driver. > If you agree I will submit a v3. I don't think that can work either: aside of not solving the problem of wilink devices on spi controllers that don't use gpio, it also doesn't solve the problem of what happens when the driver manually triggers the gpio to hold the CS signal while another driver talks to a different device using another CS on the same controller. Arnd