dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Vinod Koul <vkoul@kernel.org>, <dmaengine@vger.kernel.org>
Subject: Re: [PATCH 1/4] dmaengine: move enums in interface to use peripheral term
Date: Mon, 19 Oct 2020 11:54:54 +0300	[thread overview]
Message-ID: <84995bc9-9e77-1e4b-efc2-7284a25f292d@ti.com> (raw)
In-Reply-To: <20201015073132.3571684-2-vkoul@kernel.org>



On 15/10/2020 10.31, Vinod Koul wrote:
> dmaengine history has a non inclusive terminology of dmaengine slave, I
> feel it is time to replace that. Start with moving enums in dmaengine
> interface with replacement of slave to peripheral which is an
> appropriate term for dmaengine peripheral devices
> 
> Since the change of name can break users, the new names have been added
> with old enums kept as macro define for new names. Once the users have
> been migrated, these macros will be dropped.
> 
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> ---
>  include/linux/dmaengine.h | 44 ++++++++++++++++++++++++++-------------
>  1 file changed, 29 insertions(+), 15 deletions(-)
> 
> diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
> index dd357a747780..f7f420876d21 100644
> --- a/include/linux/dmaengine.h
> +++ b/include/linux/dmaengine.h
> @@ -59,7 +59,7 @@ enum dma_transaction_type {
>  	DMA_INTERRUPT,
>  	DMA_PRIVATE,
>  	DMA_ASYNC_TX,
> -	DMA_SLAVE,
> +	DMA_PERIPHERAL,
>  	DMA_CYCLIC,
>  	DMA_INTERLEAVE,
>  	DMA_COMPLETION_NO_ORDER,
> @@ -69,12 +69,14 @@ enum dma_transaction_type {
>  	DMA_TX_TYPE_END,
>  };
>  
> +#define DMA_SLAVE DMA_PERIPHERAL
> +
>  /**
>   * enum dma_transfer_direction - dma transfer mode and direction indicator
>   * @DMA_MEM_TO_MEM: Async/Memcpy mode
> - * @DMA_MEM_TO_DEV: Slave mode & From Memory to Device
> - * @DMA_DEV_TO_MEM: Slave mode & From Device to Memory
> - * @DMA_DEV_TO_DEV: Slave mode & From Device to Device
> + * @DMA_MEM_TO_DEV: Peripheral mode & From Memory to Device
> + * @DMA_DEV_TO_MEM: Peripheral mode & From Device to Memory
> + * @DMA_DEV_TO_DEV: Peripheral mode & From Device to Device
>   */
>  enum dma_transfer_direction {
>  	DMA_MEM_TO_MEM,
> @@ -364,22 +366,34 @@ struct dma_chan_dev {
>  	int dev_id;
>  };
>  
> +#define	DMA_SLAVE_BUSWIDTH_UNDEFINED	DMA_PERIPHERAL_BUSWIDTH_UNDEFINED
> +#define	DMA_SLAVE_BUSWIDTH_1_BYTE	DMA_PERIPHERAL_BUSWIDTH_1_BYTE
> +#define	DMA_SLAVE_BUSWIDTH_2_BYTES	DMA_PERIPHERAL_BUSWIDTH_2_BYTES
> +#define	DMA_SLAVE_BUSWIDTH_3_BYTES	DMA_PERIPHERAL_BUSWIDTH_3_BYTES
> +#define	DMA_SLAVE_BUSWIDTH_4_BYTES	DMA_PERIPHERAL_BUSWIDTH_4_BYTES
> +#define	DMA_SLAVE_BUSWIDTH_8_BYTES	DMA_PERIPHERAL_BUSWIDTH_8_BYTES
> +#define	DMA_SLAVE_BUSWIDTH_16_BYTES	DMA_PERIPHERAL_BUSWIDTH_16_BYTES
> +#define	DMA_SLAVE_BUSWIDTH_32_BYTES	DMA_PERIPHERAL_BUSWIDTH_32_BYTES
> +#define	DMA_SLAVE_BUSWIDTH_64_BYTES	DMA_PERIPHERAL_BUSWIDTH_64_BYTES

Probably move the defines after the enum dma_peripheral_buswidth block
as well?

> +
>  /**
> - * enum dma_slave_buswidth - defines bus width of the DMA slave
> + * enum dma_peripheral_buswidth - defines bus width of the DMA peripheral
>   * device, source or target buses
>   */
> -enum dma_slave_buswidth {
> -	DMA_SLAVE_BUSWIDTH_UNDEFINED = 0,
> -	DMA_SLAVE_BUSWIDTH_1_BYTE = 1,
> -	DMA_SLAVE_BUSWIDTH_2_BYTES = 2,
> -	DMA_SLAVE_BUSWIDTH_3_BYTES = 3,
> -	DMA_SLAVE_BUSWIDTH_4_BYTES = 4,
> -	DMA_SLAVE_BUSWIDTH_8_BYTES = 8,
> -	DMA_SLAVE_BUSWIDTH_16_BYTES = 16,
> -	DMA_SLAVE_BUSWIDTH_32_BYTES = 32,
> -	DMA_SLAVE_BUSWIDTH_64_BYTES = 64,
> +enum dma_peripheral_buswidth {
> +	DMA_PERIPHERAL_BUSWIDTH_UNDEFINED = 0,
> +	DMA_PERIPHERAL_BUSWIDTH_1_BYTE = 1,
> +	DMA_PERIPHERAL_BUSWIDTH_2_BYTES = 2,
> +	DMA_PERIPHERAL_BUSWIDTH_3_BYTES = 3,
> +	DMA_PERIPHERAL_BUSWIDTH_4_BYTES = 4,
> +	DMA_PERIPHERAL_BUSWIDTH_8_BYTES = 8,
> +	DMA_PERIPHERAL_BUSWIDTH_16_BYTES = 16,
> +	DMA_PERIPHERAL_BUSWIDTH_32_BYTES = 32,
> +	DMA_PERIPHERAL_BUSWIDTH_64_BYTES = 64,
>  };
>  
> +#define dma_slave_buswidth dma_peripheral_buswidth
> +
>  /**
>   * struct dma_slave_config - dma slave channel runtime config
>   * @direction: whether the data shall go in or out on this slave
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

  reply	other threads:[~2020-10-19  8:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15  7:31 [PATCH 0/4] dmaengine: use inclusive terminology Vinod Koul
2020-10-15  7:31 ` [PATCH 1/4] dmaengine: move enums in interface to use peripheral term Vinod Koul
2020-10-19  8:54   ` Peter Ujfalusi [this message]
2020-10-27 17:11     ` Vinod Koul
2020-10-15  7:31 ` [PATCH 2/4] dmaengine: move struct " Vinod Koul
2020-10-19  9:04   ` Peter Ujfalusi
2020-10-27 17:16     ` Vinod Koul
2020-10-15  7:31 ` [PATCH 3/4] dmaengine: move APIs " Vinod Koul
2020-10-19  9:17   ` Peter Ujfalusi
2020-10-28  4:33     ` Vinod Koul
2020-10-15  7:31 ` [PATCH 4/4] dmaengine: core: update " Vinod Koul

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=84995bc9-9e77-1e4b-efc2-7284a25f292d@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=vkoul@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).