lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YkwkWgnDjMST72Tw@sirena.org.uk>
Date:   Tue, 5 Apr 2022 12:13:30 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@...inx.com>
Cc:     Rob Herring <robh+dt@...nel.org>, Pratyush Yadav <p.yadav@...com>,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        linux-spi@...r.kernel.org, Michal Simek <michal.simek@...inx.com>,
        git@...inx.com, saikrishna12468@...il.com, sgoud@...inx.com
Subject: Re: [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.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ