From 3b96e4f71c7187816d2f0a8433bdcba873b4497c Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Mon, 20 Apr 2020 16:11:20 -0500 Subject: [PATCH] include/devicetree: dma: cleanup params to DT_*DMAS_CELL_BY_NAME The params in the macro's were a bit confused in what was cell_name and what was name. The order was correct and matched other _BY_NAME macros. Rename the params to just 'name' and 'cell' to match other macro's and fix any other minor issues associated with this confusion. Signed-off-by: Kumar Gala --- include/devicetree/dma.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/include/devicetree/dma.h b/include/devicetree/dma.h index d7447a5946e..ceeab889da9 100644 --- a/include/devicetree/dma.h +++ b/include/devicetree/dma.h @@ -186,31 +186,29 @@ extern "C" { * * Example usage: * - * DT_DMAS_CELL_BY_NAME(DT_NODELABEL(n), channel, tx) // 1 - * DT_DMAS_CELL_BY_NAME(DT_NODELABEL(n), config, rx) // 0x404 + * DT_DMAS_CELL_BY_NAME(DT_NODELABEL(n), tx, channel) // 1 + * DT_DMAS_CELL_BY_NAME(DT_NODELABEL(n), rx, config) // 0x404 * * @param node_id node identifier - * @param cell_name binding's cell name within the specifier referenced - * as "name" * @param name lowercase-and-underscores dma channel specifier name + * @param cell binding's cell name within the specifier referenced as "name" * @return the value of "cell" inside the dma channel specifier * @see DT_PHA_PHANDLE_IDX() */ -#define DT_DMAS_CELL_BY_NAME(node_id, cell_name, name) \ - DT_PHA_BY_NAME(node_id, dmas, cell_name, name) +#define DT_DMAS_CELL_BY_NAME(node_id, name, cell) \ + DT_PHA_BY_NAME(node_id, dmas, name, cell) /** * @brief Get dma channel specifier cell value by name * (see @ref DT_DMAS_CELL_BY_NAME) * @param inst instance number * @param name lowercase-and-underscores dma channel specifier name - * @param cell_name binding's cell name within the specifier referenced - * as "name" + * @param cell binding's cell name within the specifier referenced as "name" * @return the value of "cell" inside the specifier */ -#define DT_INST_DMAS_CELL_BY_NAME(inst, cell_name, name) \ - DT_DMAS_CELL_BY_NAME(DT_DRV_INST(inst), cell_name, name) +#define DT_INST_DMAS_CELL_BY_NAME(inst, name, cell) \ + DT_DMAS_CELL_BY_NAME(DT_DRV_INST(inst), name, cell) /** * @brief Does a DMA client have a channel specifier at an index?