From: Simon Horman <horms@verge.net.au>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
"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>,
"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 01:47:12 +0000 [thread overview]
Message-ID: <20141006014712.GA22040@verge.net.au> (raw)
In-Reply-To: <5431E984.6000203@renesas.com>
On Mon, Oct 06, 2014 at 09:59:48AM +0900, Yoshihiro Shimoda wrote:
> Hello.
>
> (2014/10/04 4:50), Sergei Shtylyov wrote:
> > On 10/02/2014 12:04 PM, 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...
> However, the code is unreadable, I think. So, I will modify the code.
It seems to me that would be best.
As far as possible the bindings and their use should
describe the hardware rather than the software.
> /* 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) {
> 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
> >
>
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@verge.net.au>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
"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>,
"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, 6 Oct 2014 10:47:12 +0900 [thread overview]
Message-ID: <20141006014712.GA22040@verge.net.au> (raw)
In-Reply-To: <5431E984.6000203@renesas.com>
On Mon, Oct 06, 2014 at 09:59:48AM +0900, Yoshihiro Shimoda wrote:
> Hello.
>
> (2014/10/04 4:50), Sergei Shtylyov wrote:
> > On 10/02/2014 12:04 PM, 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...
> However, the code is unreadable, I think. So, I will modify the code.
It seems to me that would be best.
As far as possible the bindings and their use should
describe the hardware rather than the software.
> /* 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) {
> 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 1:47 UTC|newest]
Thread overview: 44+ 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
2014-10-02 8:04 ` 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 8:04 ` Yoshihiro Shimoda
2014-10-02 9:58 ` Sergei Shtylyov
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 11:40 ` Yoshihiro Shimoda
2014-10-02 12:08 ` Sergei Shtylyov
2014-10-02 12:08 ` Sergei Shtylyov
2014-10-02 9:59 ` 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
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-02 22:43 ` Sergei Shtylyov
2014-10-03 14:34 ` Sergei Shtylyov
2014-10-03 14:34 ` Sergei Shtylyov
2014-10-06 0:49 ` Yoshihiro Shimoda
2014-10-06 0:49 ` Yoshihiro Shimoda
2014-10-02 8:04 ` [PATCH 2/2] arm: shmobile: lager: enable HS-USB Yoshihiro Shimoda
2014-10-02 8:04 ` 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-03 19:50 ` Sergei Shtylyov
2014-10-06 0:59 ` Yoshihiro Shimoda
2014-10-06 0:59 ` Yoshihiro Shimoda
2014-10-06 1:47 ` Simon Horman [this message]
2014-10-06 1:47 ` Simon Horman
2014-10-06 10:32 ` Sergei Shtylyov
2014-10-06 10:32 ` Sergei Shtylyov
[not found] ` <5431E984.6000203-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-10-07 3:25 ` Yoshihiro Shimoda
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 7:03 ` Yoshihiro Shimoda
2014-10-07 9:46 ` Sergei Shtylyov
2014-10-07 9:46 ` Sergei Shtylyov
2014-10-07 11:01 ` Yoshihiro Shimoda
2014-10-07 11:01 ` Yoshihiro Shimoda
2014-10-06 21:38 ` Sergei Shtylyov
2014-10-06 21:38 ` Sergei Shtylyov
[not found] ` <54330BC4.2050501-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2014-10-07 0:20 ` Yoshihiro Shimoda
2014-10-07 0:20 ` Yoshihiro Shimoda
[not found] ` <543331C4.90608-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-10-07 9:42 ` Sergei Shtylyov
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=20141006014712.GA22040@verge.net.au \
--to=horms@verge.net.au \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--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=sergei.shtylyov@cogentembedded.com \
--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 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.