Thread (9 messages) 9 messages, 3 authors, 2016-04-19

Re: [PATCHv2] wlcore: spi: add wl18xx support

From: Mark Brown <hidden>
Date: 2016-04-19 17:07:46
Also in: linux-devicetree, linux-spi, linux-wireless, lkml

Possibly related (same subject, not in this thread)

On Mon, Apr 18, 2016 at 05:55:51AM +0000, Reizer, Eyal wrote:
quoted
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.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help