Re: [PATCH 7/7] spi: spi-zynqmp-gqspi: Add tap delay support for GQSPI controller on Versal platform

From: Krzysztof Kozlowski
Date: Thu Sep 01 2022 - 04:02:06 EST


On 01/09/2022 08:47, Amit Kumar Mahapatra wrote:
> @@ -1165,6 +1214,7 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
> struct spi_controller *ctlr;
> struct zynqmp_qspi *xqspi;
> struct device *dev = &pdev->dev;
> + const struct of_device_id *match;
> struct device_node *np = dev->of_node;
>
> ctlr = spi_alloc_master(&pdev->dev, sizeof(*xqspi));
> @@ -1176,6 +1226,13 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
> xqspi->ctlr = ctlr;
> platform_set_drvdata(pdev, xqspi);
>
> + match = of_match_node(zynqmp_qspi_of_match, pdev->dev.of_node);
> + if (match) {
> + const struct qspi_platform_data *p_data = match->data;

There is a helper for that. Use it.

Best regards,
Krzysztof