linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: "Reizer, Eyal" <eyalr@ti.com>
Cc: Kalle Valo <kvalo@codeaurora.org>,
	Eyal Reizer <eyalreizer@gmail.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	linux-spi@vger.kernel.org
Subject: Re: [PATCHv2] wlcore: spi: add wl18xx support
Date: Mon, 18 Apr 2016 00:19:41 +0200	[thread overview]
Message-ID: <14313437.cDJIgY3kzo@wuerfel> (raw)
In-Reply-To: <8665E2433BC68541A24DFFCA87B70F5B360B6C90@DFRE01.ent.ti.com>

On Sunday 10 April 2016 07:37:23 Reizer, Eyal wrote:
> Add support for using with both wl12xx and wl18xx.
> 
> - all wilink family needs special init command for entering wspi mode.
>   extra clock cycles should be sent after the spi init command while the
>   cs pin is high.
> - switch to controling the cs pin from the spi driver for achieveing the
>   above.
> - the selected cs gpio is read from the spi device-tree node using the
>   cs-gpios field and setup as a gpio.
> - See the example below for specifying the cs gpio using the cs-gpios entry
> &spi0   {
>         ...
>         cs-gpios = <&gpio0 5 0>;
>         ...
>         wlcore: wlcore@0 {
>                 compatible = "ti,wl1835";
>         ...
>         ...
>         };
> };
> 
> Signed-off-by: Eyal Reizer <eyalr@ti.com>

I don't think this can work in general: not all SPI hosts uses GPIOs
for controlling CS, so the logic can't work, and it's also a layering
violation for the driver to look at the parent.

I would suggest fixing this using a new API function from the SPI
core, if we don't already have a generic way to do it.

	Arnd

       reply	other threads:[~2016-04-17 22:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1460273570-12298-1-git-send-email-eyalr@ti.com>
     [not found] ` <8665E2433BC68541A24DFFCA87B70F5B360B6C90@DFRE01.ent.ti.com>
2016-04-17 22:19   ` Arnd Bergmann [this message]
2016-04-18  5:55     ` [PATCHv2] wlcore: spi: add wl18xx support Reizer, Eyal
2016-04-18 14:57       ` Arnd Bergmann
2016-04-19  9:05         ` Reizer, Eyal
2016-04-19 14:21           ` Arnd Bergmann
2016-04-19 14:35             ` Reizer, Eyal
     [not found]           ` <8665E2433BC68541A24DFFCA87B70F5B360C0745-1tpBd5JUCm6IQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2016-04-19 17:12             ` Mark Brown
     [not found]               ` <sjdvun1fuj4nyi0bgf268g53.1461086401627@email.android.com>
     [not found]                 ` <sjdvun1fuj4nyi0bgf268g53.1461086401627-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
2016-04-19 17:27                   ` Mark Brown
     [not found]                     ` <oe8hqfknrcljrjawnrxlohvr.1461087275186@email.android.com>
     [not found]                       ` <oe8hqfknrcljrjawnrxlohvr.1461087275186-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
2016-04-19 17:54                         ` Mark Brown
     [not found]                           ` <us0dopt1inbrt0x47njgc2vy.1461089085965@email.android.com>
     [not found]                             ` <us0dopt1inbrt0x47njgc2vy.1461089085965-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
2016-04-19 18:46                               ` Mark Brown
     [not found]                                 ` <20160419184627.GG3217-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-04-21 11:07                                   ` Reizer, Eyal
     [not found]                                     ` <8665E2433BC68541A24DFFCA87B70F5B360C2E14-1tpBd5JUCm6IQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2016-04-21 11:11                                       ` Mark Brown
     [not found]       ` <8665E2433BC68541A24DFFCA87B70F5B360BF614-1tpBd5JUCm6IQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2016-04-19 17:07         ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14313437.cDJIgY3kzo@wuerfel \
    --to=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=eyalr@ti.com \
    --cc=eyalreizer@gmail.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).