All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Timur Tabi <timur@codeaurora.org>
Cc: andy.gross@linaro.org, david.brown@linaro.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	linux-gpio@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] pinctrl: qcom: disable GPIO groups with no pins
Date: Fri, 14 Jul 2017 14:46:48 -0700	[thread overview]
Message-ID: <20170714214648.GL22780@codeaurora.org> (raw)
In-Reply-To: <8eaeefc0-2f2c-a488-283f-80e26f4d13f5@codeaurora.org>

On 07/14, Timur Tabi wrote:
> On 07/14/2017 12:11 PM, Stephen Boyd wrote:
> >gpiochips also have a request() hook. Can we use that before
> >initializing direction to make sure the GPIO is accessible?
> 
> So I tried it, and it didn't work:
> 
> static int msm_gpio_request(struct gpio_chip *chip, unsigned int offset)
> {
> 	pr_info("%s:%u offset=%u\n", __func__, __LINE__, offset);
> 
> 	return 0;
> }
> 
> static struct gpio_chip msm_gpio_template = {
> 	.request          = msm_gpio_request,
> 	...
> 
> msm_gpio_request() is never called when the driver loads.  In fact,
> I can't figure out when it would be called.
> 

Right, the gpiolib core would need to be updated to request the
gpio in gpiochip_add_data() around the loop where it goes and
configures things. And it could ignore ones that it can't request
there.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

WARNING: multiple messages have this Message-ID (diff)
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] pinctrl: qcom: disable GPIO groups with no pins
Date: Fri, 14 Jul 2017 14:46:48 -0700	[thread overview]
Message-ID: <20170714214648.GL22780@codeaurora.org> (raw)
In-Reply-To: <8eaeefc0-2f2c-a488-283f-80e26f4d13f5@codeaurora.org>

On 07/14, Timur Tabi wrote:
> On 07/14/2017 12:11 PM, Stephen Boyd wrote:
> >gpiochips also have a request() hook. Can we use that before
> >initializing direction to make sure the GPIO is accessible?
> 
> So I tried it, and it didn't work:
> 
> static int msm_gpio_request(struct gpio_chip *chip, unsigned int offset)
> {
> 	pr_info("%s:%u offset=%u\n", __func__, __LINE__, offset);
> 
> 	return 0;
> }
> 
> static struct gpio_chip msm_gpio_template = {
> 	.request          = msm_gpio_request,
> 	...
> 
> msm_gpio_request() is never called when the driver loads.  In fact,
> I can't figure out when it would be called.
> 

Right, the gpiolib core would need to be updated to request the
gpio in gpiochip_add_data() around the loop where it goes and
configures things. And it could ignore ones that it can't request
there.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2017-07-14 21:46 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-13 21:52 [PATCH 0/2] pinctrl: qcom: add support for sparse GPIOs Timur Tabi
2017-07-13 21:52 ` Timur Tabi
2017-07-13 21:52 ` [PATCH 1/2] pinctrl: qcom: disable GPIO groups with no pins Timur Tabi
2017-07-13 21:52   ` Timur Tabi
2017-07-14 16:44   ` Bjorn Andersson
2017-07-14 16:44     ` Bjorn Andersson
2017-07-14 17:01     ` Timur Tabi
2017-07-14 17:01       ` Timur Tabi
2017-07-14 17:35       ` Bjorn Andersson
2017-07-14 17:35         ` Bjorn Andersson
2017-07-14 17:11   ` Stephen Boyd
2017-07-14 17:11     ` Stephen Boyd
2017-07-14 17:17     ` Timur Tabi
2017-07-14 17:17       ` Timur Tabi
2017-07-14 17:23       ` Bjorn Andersson
2017-07-14 17:23         ` Bjorn Andersson
2017-07-14 21:43     ` Timur Tabi
2017-07-14 21:43       ` Timur Tabi
2017-07-14 21:46       ` Stephen Boyd [this message]
2017-07-14 21:46         ` Stephen Boyd
2017-07-14 22:01         ` Timur Tabi
2017-07-14 22:01           ` Timur Tabi
2017-07-14 22:04           ` Stephen Boyd
2017-07-14 22:04             ` Stephen Boyd
2017-07-13 21:52 ` [PATCH 2/2] pinctrl: qcom: qdf2xxx: add support for new ACPI HID QCOM8002 Timur Tabi
2017-07-13 21:52   ` Timur Tabi
2017-07-14 17:21   ` Bjorn Andersson
2017-07-14 17:21     ` Bjorn Andersson
2017-07-14 18:30     ` Timur Tabi
2017-07-14 18:30       ` Timur Tabi
  -- strict thread matches above, loose matches on Subject: below --
2017-06-30  0:42 [PATCH 1/2] pinctrl: qcom: disable GPIO groups with no pins Timur Tabi
2017-06-30  0:42 ` Timur Tabi

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=20170714214648.GL22780@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=david.brown@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=timur@codeaurora.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 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.