From: Johan Hovold <johan@kernel.org>
To: Nava kishore Manne <nava.manne@xilinx.com>
Cc: mdf@kernel.org, trix@redhat.com, robh+dt@kernel.org,
michal.simek@xilinx.com, linux-fpga@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, git@xilinx.com
Subject: Re: [PATCH 3/3] fpga: region: Adds runtime PM support
Date: Wed, 2 Jun 2021 15:02:48 +0200 [thread overview]
Message-ID: <YLeBeJjwki/9VVR2@hovoldconsulting.com> (raw)
In-Reply-To: <20210402092049.479-4-nava.manne@xilinx.com>
On Fri, Apr 02, 2021 at 02:50:49PM +0530, Nava kishore Manne wrote:
> Adds support to handle FPGA/PL power domain. With this patch,
> the PL power domain will be turned on before loading the bitstream
> and turned off while removing/unloading the bitstream using overlays.
> This can be achieved by adding the runtime PM support.
>
> Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
> ---
> drivers/fpga/of-fpga-region.c | 18 +++++++++++++++++-
> 1 file changed, 17 insertions(+), 1 deletion(-)
> /**
> @@ -411,9 +416,16 @@ static int of_fpga_region_probe(struct platform_device *pdev)
> goto eprobe_mgr_put;
> }
>
> + pm_runtime_enable(&pdev->dev);
> + ret = pm_runtime_get_sync(&pdev->dev);
> + if (ret < 0)
> + goto err_pm;
> +
> + pm_runtime_put(&pdev->dev);
> +
> ret = fpga_region_register(region);
> if (ret)
> - goto eprobe_mgr_put;
> + goto err_pm;
Just a drive-by comment: you have PM usage counter imbalance here
(double put).
> of_platform_populate(np, fpga_region_of_match, NULL, ®ion->dev);
> platform_set_drvdata(pdev, region);
> @@ -422,6 +434,9 @@ static int of_fpga_region_probe(struct platform_device *pdev)
>
> return 0;
>
> +err_pm:
> + pm_runtime_put(&pdev->dev);
> + pm_runtime_disable(&pdev->dev);
> eprobe_mgr_put:
> fpga_mgr_put(mgr);
> return ret;
Johan
prev parent reply other threads:[~2021-06-02 13:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-02 9:20 [PATCH 0/3]Enable PM generic domain support Nava kishore Manne
2021-04-02 9:20 ` [PATCH 1/3] dt-bindings: zynqmp: Add new PD_PL macro Nava kishore Manne
2021-04-09 14:47 ` Rob Herring
2021-04-02 9:20 ` [PATCH 2/3] fpga: region: Add fpga-region property 'power-domains' Nava kishore Manne
2021-04-02 17:15 ` Moritz Fischer
2021-04-05 8:46 ` Nava kishore Manne
2021-04-09 14:50 ` Rob Herring
2021-04-02 9:20 ` [PATCH 3/3] fpga: region: Adds runtime PM support Nava kishore Manne
2021-04-09 21:30 ` Moritz Fischer
2021-04-19 5:18 ` Nava kishore Manne
2021-06-02 10:48 ` Nava kishore Manne
2021-06-02 20:39 ` Tom Rix
2021-06-02 13:02 ` Johan Hovold [this message]
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=YLeBeJjwki/9VVR2@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=git@xilinx.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mdf@kernel.org \
--cc=michal.simek@xilinx.com \
--cc=nava.manne@xilinx.com \
--cc=robh+dt@kernel.org \
--cc=trix@redhat.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).