From: Linus Walleij <linus.walleij@linaro.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-pci <linux-pci@vger.kernel.org>
Subject: Re: [PATCH] pci: host: dra7xx: use GPIO descriptor
Date: Sat, 11 Feb 2017 14:29:59 +0100 [thread overview]
Message-ID: <CACRpkdbboyr-1-fRxnQHfMT2daZ97Edd9wOBvyJwSqkZ7stXMg@mail.gmail.com> (raw)
In-Reply-To: <20170210204500.GK29169@bhelgaas-glaptop.roam.corp.google.com>
On Fri, Feb 10, 2017 at 9:45 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> Kishon's is slightly different because it uses devm_gpiod_get_optional()
> instead of devm_gpiod_get().
Fair enough.
> They both look slightly funny because we throw away the struct gpio_desc *
> that's returned, without ever using it anywhere (except to test for error).
> I *assume* that's what you want, since that's the way it was before the
> patch, too.
It's a hog-type usecase: when you request the GPIO it is set to a value
that you never want to change.
When the module is .exit():ed the descriptor will be garbage collected
thanks to using the devm_* accessor.
Yours,
Linus Walleij
prev parent reply other threads:[~2017-02-11 13:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-26 13:27 [PATCH] pci: host: dra7xx: use GPIO descriptor Linus Walleij
2017-02-10 20:07 ` Bjorn Helgaas
2017-02-10 20:45 ` Bjorn Helgaas
2017-02-11 13:29 ` Linus Walleij [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=CACRpkdbboyr-1-fRxnQHfMT2daZ97Edd9wOBvyJwSqkZ7stXMg@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=kishon@ti.com \
--cc=linux-pci@vger.kernel.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).