Re: [PATCH RFC v2 3/8] spi: add support for hardware triggered offload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Drive by comment inline.

> diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
> index a8fc16c6bf37..ec8d875d31ff 100644
> --- a/include/linux/spi/spi.h
> +++ b/include/linux/spi/spi.h
> @@ -632,6 +632,9 @@ struct spi_controller {
>  	/* Flag indicating that the SPI bus is locked for exclusive use */
>  	bool			bus_lock_flag;
>  
> +	/* Flag indicating the bus is reserved for use by hardware trigger */
> +	bool			offload_hw_trigger_enabled;
> +
>  	/*
>  	 * Setup mode and clock, etc (SPI driver may call many times).
>  	 *
> @@ -1594,12 +1597,26 @@ struct spi_controller_offload_ops {
>  	 * @unprepare: Callback to release any resources used by prepare().
>  	 */
>  	void (*unprepare)(struct spi_device *spi, unsigned int id);
> +
> +	/**
> +	 * @hw_trigger_enable: Callback to enable the hardware trigger for the
> +	 * given offload instance.
> +	 */
> +
Blank line in odd place..

> +	int (*hw_trigger_enable)(struct spi_device *spi, unsigned int id);
> +	/**
> +	 * @hw_trigger_disable: Callback to disable the hardware trigger for the
> +	 * given offload instance.
> +	 */
> +	void (*hw_trigger_disable)(struct spi_device *spi, unsigned int id);
>  };
>  
>  extern int spi_offload_prepare(struct spi_device *spi, unsigned int id,
>  			       struct spi_message *msg);
>  extern void spi_offload_unprepare(struct spi_device *spi, unsigned int id,
>  				  struct spi_message *msg);
> +extern int spi_offload_hw_trigger_enable(struct spi_device *spi, unsigned int id);
> +extern void spi_offload_hw_trigger_disable(struct spi_device *spi, unsigned int id);
>  
>  /*---------------------------------------------------------------------------*/
>  
> 





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux