From: Timur Tabi <timur@codeaurora.org>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] pinctrl: qcom: add get_direction function
Date: Tue, 14 Mar 2017 18:34:42 -0500 [thread overview]
Message-ID: <c40b0ee7-6d8c-8c5d-d4c5-9ecf8076e44f@codeaurora.org> (raw)
In-Reply-To: <20170314233040.GH10239@codeaurora.org>
Stephen Boyd wrote:
> I don't see any problem with failing msm_gpio_set() when the
> function is "not gpio", but I also wonder why it matters. Drivers
> shouldn't be doing that, because if the gpio is muxed to some
> other functionality they shouldn't be treating it as a gpio in
> the first place.
The idea is to notify drivers with an error code when they make a mistake.
Perhaps the device tree or the ACPI table has an error?
> Perhaps we can have some sort of gpio validation debug option
> that the check goes under. Then we could fail and print a big
> warning if this happens, but if we aren't debugging then we don't
> do any checking and rely on drivers to do the right thing.
I could add that, but I still think returning an error code is appropriate. On
the TLMM, we know for sure that the pin must be set to function 0 in order for
the read/write routines to operate correctly.
I guess I should propose a patch and we can vote on it.
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the
Code Aurora Forum, hosted by The Linux Foundation.
next prev parent reply other threads:[~2017-03-14 23:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-10 23:21 [PATCH] pinctrl: qcom: add get_direction function Timur Tabi
2017-02-10 23:25 ` Stephen Boyd
2017-02-11 21:32 ` Timur Tabi
2017-02-22 15:51 ` Linus Walleij
2017-02-22 15:49 ` Linus Walleij
2017-03-06 21:52 ` Timur Tabi
2017-03-14 21:41 ` Linus Walleij
2017-03-14 21:55 ` Timur Tabi
2017-03-14 23:30 ` Stephen Boyd
2017-03-14 23:34 ` Timur Tabi [this message]
2017-03-14 23:41 ` Stephen Boyd
2017-03-15 0:12 ` Timur Tabi
2017-03-15 5:08 ` Bjorn Andersson
2017-03-15 13:08 ` Linus Walleij
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=c40b0ee7-6d8c-8c5d-d4c5-9ecf8076e44f@codeaurora.org \
--to=timur@codeaurora.org \
--cc=bjorn.andersson@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=sboyd@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 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).