lkml.org 
[lkml]   [2023]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v1 18/43] spi: ep93xx: add DT support for Cirrus EP93xx
Thu, Jun 01, 2023 at 08:34:09AM +0300, Nikita Shubin kirjoitti:
> - find register range from the device tree
> - provide clock access via of
> - use_dma as a DT node

...

> +static struct ep93xx_spi_info *ep93xx_spi_get_platdata(struct platform_device *pdev)
> +{
> + struct device_node *np = pdev->dev.of_node;

> + if (np && of_property_read_bool(np, "ep9301,use-dma"))

Excessive check for np to be NULL, this is implied by the _read_bool() anyway.

> + dt_spi_info.use_dma = 1;

> + return &dt_spi_info;
> +}

...

> + master->dev.of_node = pdev->dev.of_node;

device_set_node();

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-06-03 22:28    [W:1.181 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site