lkml.org 
[lkml]   [2019]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed
On Fri, Jan 18, 2019 at 06:11:31PM +0100, kernel@martin.sperl.org wrote:

> Does something like this looks acceptable?

> diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
> index ec210286567c..677fc5025033 100644
> --- a/include/linux/spi/spi.h
> +++ b/include/linux/spi/spi.h
> @@ -288,6 +288,21 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
> module_driver(__spi_driver, spi_register_driver, \
> spi_unregister_driver)
>
> +/* define SPI Controller states in the state machine */
> +enum spi_controller_state {
> + SPI_CONTROLLER_STATE_SHUTDOWN = 0,
> + SPI_CONTROLLER_STATE_IDLE = 1,
> + SPI_CONTROLLER_STATE_IN_PROCESS = 2,
> + SPI_CONTROLLER_STATE_IN_TRANSFER = 3,
> +};

Yes, it does!

> SPI_CONTROLLER_MODE_EXCLUSIVE could replace the bus_lock_flag.
> I am also not sure of the “convention” of memory mode (i.e
> using mem_ops). Is it maybe implicitly spi_bus_locked - i.e
> typically only a single device?

Yes, it does - we're basically handing over the entire SPI bus to
another bit of hardware that will do memory mapped flash access so we
can't really have anything else trying to do SPI operations at the same
time.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-01-18 20:12    [W:0.085 / U:15.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site