From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: "Reizer, Eyal" <eyalr-l0cyMroinI0@public.gmane.org>
Cc: Kalle Valo <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Eyal Reizer <eyalreizer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCHv2] wlcore: spi: add wl18xx support
Date: Tue, 19 Apr 2016 18:07:31 +0100 [thread overview]
Message-ID: <20160419170731.GB3217@sirena.org.uk> (raw)
In-Reply-To: <8665E2433BC68541A24DFFCA87B70F5B360BF614-1tpBd5JUCm6IQmiDNMet8wC/G2K4zDHf@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1175 bytes --]
On Mon, Apr 18, 2016 at 05:55:51AM +0000, Reizer, Eyal wrote:
> > 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.
> Originally this is what I have done until I was pointed to the generic cs-gpio mechanism
> in the SPI core.
> It is a generic mechanism already in the SPI core driver.
> See: Documentation/devicetree/bindings/spi/spi-bus.txt
> 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.
No! This is a *terrible* and broken idea. Client drivers should *not*
be peering inside controller implementations like this, and they should
especially not be trying to change the chip select without the core
knowing about it. This is at best going to be fragile, at worst it will
actively break some systems. Whatever you are trying to do needs to go
through the SPI core with some degree of abstraction, the core needs to
know what's going on and the driver needs to support systems that don't
or can't mux the chip select out as a GPIO.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2016-04-19 17:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1460273570-12298-1-git-send-email-eyalr@ti.com>
[not found] ` <1460273570-12298-1-git-send-email-eyalr-l0cyMroinI0@public.gmane.org>
2016-04-10 7:37 ` [PATCHv2] wlcore: spi: add wl18xx support Reizer, Eyal
2016-04-17 22:19 ` Arnd Bergmann
2016-04-18 5:55 ` 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 [this message]
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=20160419170731.GB3217@sirena.org.uk \
--to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=eyalr-l0cyMroinI0@public.gmane.org \
--cc=eyalreizer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).