dmaengine: pxa: deprecate '#dma-channels' and '#dma-requests'

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

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220503065407.52188-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
Krzysztof Kozlowski 2022-05-03 08:54:05 +02:00 committed by Vinod Koul
parent bd1eca7b2c
commit d9cb0a4c0b

View file

@ -1365,10 +1365,17 @@ static int pxad_probe(struct platform_device *op)
of_id = of_match_device(pxad_dt_ids, &op->dev);
if (of_id) {
of_property_read_u32(op->dev.of_node, "#dma-channels",
&dma_channels);
ret = of_property_read_u32(op->dev.of_node, "#dma-requests",
/* Parse new and deprecated dma-channels properties */
if (of_property_read_u32(op->dev.of_node, "dma-channels",
&dma_channels))
of_property_read_u32(op->dev.of_node, "#dma-channels",
&dma_channels);
/* Parse new and deprecated dma-requests properties */
ret = of_property_read_u32(op->dev.of_node, "dma-requests",
&nb_requestors);
if (ret)
ret = of_property_read_u32(op->dev.of_node, "#dma-requests",
&nb_requestors);
if (ret) {
dev_warn(pdev->slave.dev,
"#dma-requests set to default 32 as missing in OF: %d",