lkml.org 
[lkml]   [2022]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 7/7] spi: spi-zynqmp-gqspi: Add tap delay support for GQSPI controller on Versal platform
From
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

\
 
 \ /
  Last update: 2022-09-01 10:03    [W:0.486 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site