dmaengine: mmp: deprecate '#dma-channels'

The generic property, used in most of the drivers and defined in generic
dma-common DT bindings, is 'dma-channels'.  Switch to new property while
keeping backward compatibility.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220503065407.52188-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
Krzysztof Kozlowski 2022-05-03 08:54:06 +02:00 коммит произвёл Vinod Koul
Родитель d9cb0a4c0b
Коммит 607c04a044
1 изменённых файлов: 9 добавлений и 5 удалений

Просмотреть файл

@ -1043,13 +1043,17 @@ static int mmp_pdma_probe(struct platform_device *op)
return PTR_ERR(pdev->base); return PTR_ERR(pdev->base);
of_id = of_match_device(mmp_pdma_dt_ids, pdev->dev); of_id = of_match_device(mmp_pdma_dt_ids, pdev->dev);
if (of_id) if (of_id) {
of_property_read_u32(pdev->dev->of_node, "#dma-channels", /* Parse new and deprecated dma-channels properties */
&dma_channels); if (of_property_read_u32(pdev->dev->of_node, "dma-channels",
else if (pdata && pdata->dma_channels) &dma_channels))
of_property_read_u32(pdev->dev->of_node, "#dma-channels",
&dma_channels);
} else if (pdata && pdata->dma_channels) {
dma_channels = pdata->dma_channels; dma_channels = pdata->dma_channels;
else } else {
dma_channels = 32; /* default 32 channel */ dma_channels = 32; /* default 32 channel */
}
pdev->dma_channels = dma_channels; pdev->dma_channels = dma_channels;
for (i = 0; i < dma_channels; i++) { for (i = 0; i < dma_channels; i++) {