From: Heiko Stuebner <heiko@sntech.de>
To: Bjorn Helgaas <helgaas@kernel.org>, Shawn Lin <shawn.lin@rock-chips.com>
Cc: Fabio Estevam <festevam@gmail.com>,
bhelgaas@google.com, linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: rockchip: Use gpiod_set_value_cansleep() to allow reset via expanders
Date: Thu, 24 Aug 2017 18:37:02 +0200 [thread overview]
Message-ID: <1690109.dqujpfY2W8@phil> (raw)
In-Reply-To: <20170824163323.GG31858@bhelgaas-glaptop.roam.corp.google.com>
Am Donnerstag, 24. August 2017, 11:33:23 CEST schrieb Bjorn Helgaas:
> On Sat, Aug 19, 2017 at 09:07:14PM -0300, Fabio Estevam wrote:
> > The reset GPIO can be connected to a I2C or SPI IO expander, which may
> > sleep, so it is safer to use the gpiod_set_value_cansleep() variant
> > instead.
> >
> > Signed-off-by: Fabio Estevam <festevam@gmail.com>
>
> Waiting for Shawn's ack...
we might want to include him then, as I'm not sure if he patrols the
linux-pci list :-) . [I've added him]
>
> > ---
> > drivers/pci/host/pcie-rockchip.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c
> > index 2eccd53..124b280 100644
> > --- a/drivers/pci/host/pcie-rockchip.c
> > +++ b/drivers/pci/host/pcie-rockchip.c
> > @@ -537,7 +537,7 @@ static int rockchip_pcie_init_port(struct rockchip_pcie *rockchip)
> > int err, i;
> > u32 status;
> >
> > - gpiod_set_value(rockchip->ep_gpio, 0);
> > + gpiod_set_value_cansleep(rockchip->ep_gpio, 0);
> >
> > err = reset_control_assert(rockchip->aclk_rst);
> > if (err) {
> > @@ -682,7 +682,7 @@ static int rockchip_pcie_init_port(struct rockchip_pcie *rockchip)
> > rockchip_pcie_write(rockchip, PCIE_CLIENT_LINK_TRAIN_ENABLE,
> > PCIE_CLIENT_CONFIG);
> >
> > - gpiod_set_value(rockchip->ep_gpio, 1);
> > + gpiod_set_value_cansleep(rockchip->ep_gpio, 1);
> >
> > /* 500ms timeout value should be enough for Gen1/2 training */
> > err = readl_poll_timeout(rockchip->apb_base + PCIE_CLIENT_BASIC_STATUS1,
>
>
next prev parent reply other threads:[~2017-08-24 16:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-20 0:07 [PATCH] PCI: rockchip: Use gpiod_set_value_cansleep() to allow reset via expanders Fabio Estevam
2017-08-24 16:33 ` Bjorn Helgaas
2017-08-24 16:37 ` Heiko Stuebner [this message]
2017-08-28 0:27 ` Fabio Estevam
2017-08-28 0:46 ` Shawn Lin
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=1690109.dqujpfY2W8@phil \
--to=heiko@sntech.de \
--cc=bhelgaas@google.com \
--cc=festevam@gmail.com \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=shawn.lin@rock-chips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.