devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
Cc: Rob Herring <robh+dt@kernel.org>, Pratyush Yadav <p.yadav@ti.com>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-spi@vger.kernel.org, Michal Simek <michal.simek@xilinx.com>,
	git@xilinx.com, saikrishna12468@gmail.com, sgoud@xilinx.com
Subject: Re: [PATCH 2/2] spi: cadence-quadspi: Add support for OSPI device reset
Date: Tue, 5 Apr 2022 12:13:30 +0100	[thread overview]
Message-ID: <YkwkWgnDjMST72Tw@sirena.org.uk> (raw)
In-Reply-To: <1649156437-15609-3-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com>

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-04-05 13:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-05 11:00 [PATCH 0/2] spi: cadence-quadspi: Add OSPI device reset support Sai Krishna Potthuri
2022-04-05 11:00 ` [PATCH 1/2] dt-bindings: spi: cadence-quadspi: Add reset-gpios for Xilinx Versal OSPI Sai Krishna Potthuri
2022-04-06 18:23   ` Rob Herring
2022-04-05 11:00 ` [PATCH 2/2] spi: cadence-quadspi: Add support for OSPI device reset Sai Krishna Potthuri
2022-04-05 11:13   ` Mark Brown [this message]
2022-04-05 19:17   ` Pratyush Yadav
2022-05-31  8:12     ` Sai Krishna Potthuri
2022-06-21  8:24       ` Potthuri, Sai Krishna
2022-06-21  9:16       ` Pratyush Yadav
2022-07-05 11:31         ` Potthuri, Sai Krishna

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YkwkWgnDjMST72Tw@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=git@xilinx.com \
    --cc=lakshmi.sai.krishna.potthuri@xilinx.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=p.yadav@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=saikrishna12468@gmail.com \
    --cc=sgoud@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).