lkml.org 
[lkml]   [2022]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] spi: cadence-quadspi: Add support for OSPI device reset
On Tue, Apr 05, 2022 at 04:30:37PM +0530, Sai Krishna Potthuri wrote:

> +static int cqspi_versal_device_reset(struct cqspi_st *cqspi)
> +{
> + struct platform_device *pdev = cqspi->pdev;
> + int ret;
> + int gpio;
> + enum of_gpio_flags flags;
> +
> + gpio = of_get_named_gpio_flags(pdev->dev.of_node,
> + "reset-gpios", 0, &flags);
> + if (!gpio_is_valid(gpio))
> + return gpio;
> +
> + ret = devm_gpio_request_one(&pdev->dev, gpio, flags,
> + "flash-reset");

You should use the gpiod APIs here which should mean you don't need any
DT specific code to parse the flags. At some point the old GPIO APIs
will be removed.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-04-06 02:51    [W:0.110 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site