From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
"horms@verge.net.au" <horms@verge.net.au>,
"magnus.damm@gmail.com" <magnus.damm@gmail.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"pawel.moll@arm.com" <pawel.moll@arm.com>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"ijc+devicetree@hellion.org.uk" <ijc+devicetree@hellion.org.uk>,
"galak@codeaurora.org" <galak@codeaurora.org>,
"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>
Subject: Re: [PATCH 2/2] arm: shmobile: lager: enable HS-USB
Date: Mon, 06 Oct 2014 10:32:48 +0000 [thread overview]
Message-ID: <54326FD0.8030106@cogentembedded.com> (raw)
In-Reply-To: <5431E984.6000203@renesas.com>
Hello.
On 10/6/2014 4:59 AM, Yoshihiro Shimoda wrote:
>>> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
>>> ---
>>> arch/arm/boot/dts/r8a7790-lager.dts | 5 +++++
>>> 1 file changed, 5 insertions(+)
>>> diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
>>> index 1698591..4badd0a 100644
>>> --- a/arch/arm/boot/dts/r8a7790-lager.dts
>>> +++ b/arch/arm/boot/dts/r8a7790-lager.dts
>>> @@ -445,3 +445,8 @@
>>> };
>>> };
>>> };
>>> +
>>> +&hsusb {
>>> + status = "okay";
>>> + renesas,enable-gpio = <&gpio5 18 GPIO_ACTIVE_LOW>;
>> It's certainly active-high.
> Since the current code has the following, we have to set the active_low...
Exactly opposite conclusion follows from this code.
> However, the code is unreadable, I think. So, I will modify the code.
There's no dire need, I think.
> /* check GPIO determining if USB function should be enabled */
> if (priv->dparam.enable_gpio) {
> gpio_request_one(priv->dparam.enable_gpio, GPIOF_IN, NULL);
> ret = !gpio_get_value(priv->dparam.enable_gpio);
> gpio_free(priv->dparam.enable_gpio);
> if (ret) {
'ret' is non-zero here if gpio_get_value() returned 0, so 0 means "host"
and 1 means "gadget", i.e. GPIO is active-high.
> dev_warn(&pdev->dev,
> "USB function not selected (GPIO %d)\n",
> priv->dparam.enable_gpio);
> ret = -ENOTSUPP;
> goto probe_end_mod_exit;
> }
> }
> Best regards,
> Yoshihiro Shimoda
WBR, Sergei
next prev parent reply other threads:[~2014-10-06 10:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-02 8:04 [PATCH 0/2] arm: shimobile: add HS-USB device node on r8a7790 Yoshihiro Shimoda
[not found] ` <1412237073-1288-1-git-send-email-yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-10-02 8:04 ` [PATCH 1/2] arm: shimobile: r8a7790: add HS-USB device node Yoshihiro Shimoda
2014-10-02 9:58 ` Sergei Shtylyov
[not found] ` <542D21BD.8020709-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2014-10-02 11:40 ` Yoshihiro Shimoda
2014-10-02 12:08 ` Sergei Shtylyov
2014-10-02 9:59 ` Sergei Shtylyov
[not found] ` <542D2214.9050803-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2014-10-02 11:41 ` Yoshihiro Shimoda
[not found] ` <1412237073-1288-2-git-send-email-yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-10-02 22:43 ` Sergei Shtylyov
2014-10-03 14:34 ` Sergei Shtylyov
2014-10-06 0:49 ` Yoshihiro Shimoda
2014-10-02 8:04 ` [PATCH 2/2] arm: shmobile: lager: enable HS-USB Yoshihiro Shimoda
[not found] ` <1412237073-1288-3-git-send-email-yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-10-03 19:50 ` Sergei Shtylyov
2014-10-06 0:59 ` Yoshihiro Shimoda
2014-10-06 1:47 ` Simon Horman
2014-10-06 10:32 ` Sergei Shtylyov [this message]
[not found] ` <5431E984.6000203-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-10-07 3:25 ` Yoshihiro Shimoda
[not found] ` <54335D0E.6070606-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-10-07 7:03 ` Yoshihiro Shimoda
2014-10-07 9:46 ` Sergei Shtylyov
2014-10-07 11:01 ` Yoshihiro Shimoda
2014-10-06 21:38 ` Sergei Shtylyov
[not found] ` <54330BC4.2050501-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2014-10-07 0:20 ` Yoshihiro Shimoda
[not found] ` <543331C4.90608-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-10-07 9:42 ` Sergei Shtylyov
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=54326FD0.8030106@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=horms@verge.net.au \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-sh@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=magnus.damm@gmail.com \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=yoshihiro.shimoda.uh@renesas.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 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).