From: thomas.petazzoni@bootlin.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] PCI: armada8k: add support for gpio controlled reset signal
Date: Thu, 22 Nov 2018 15:45:23 +0100 [thread overview]
Message-ID: <20181122154523.5aa652d4@windsurf> (raw)
In-Reply-To: <405efb21a4600efad10413fcf4c72aacce180125.1538570983.git.baruch@tkos.co.il>
Hello Baruch,
Sorry for the delayed review.
On Wed, 3 Oct 2018 15:49:43 +0300, Baruch Siach wrote:
> #define PCIE_VENDOR_REGS_OFFSET 0x8000
> @@ -137,6 +139,12 @@ static int armada8k_pcie_host_init(struct pcie_port *pp)
> struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
> struct armada8k_pcie *pcie = to_armada8k_pcie(pci);
>
> + if (pcie->reset_gpio) {
This should be:
if (!IS_ERR(pcie->reset_gpio))
Indeed, in the case of an error, pcie->reset_gpio will be non-NULL,
with the error encoded as a ERR_PTR().
> + /* assert and then deassert the reset signal */
> + gpiod_set_value_cansleep(pcie->reset_gpio, 1);
> + msleep(100);
> + gpiod_set_value_cansleep(pcie->reset_gpio, 0);
> + }
> dw_pcie_setup_rc(pp);
An empty new line here would be good before the dw_pcie_setup_rc() call.
If you send a new iteration with those two issues fixed, you can
directly add my
Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2018-11-22 14:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-03 12:49 [PATCH] PCI: armada8k: add support for gpio controlled reset signal Baruch Siach
2018-10-03 13:28 ` Andrew Lunn
2018-10-03 13:35 ` Baruch Siach
2018-11-16 12:10 ` Lorenzo Pieralisi
2018-11-21 7:09 ` Baruch Siach
2018-11-21 7:47 ` Thomas Petazzoni
2018-11-22 14:45 ` Thomas Petazzoni [this message]
2018-11-22 14:46 ` Thomas Petazzoni
2018-11-22 15:23 ` Lorenzo Pieralisi
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=20181122154523.5aa652d4@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).