All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Sergei Shtylyov
	<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>,
	"horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org"
	<horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>,
	"magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
	<magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
	<robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"pawel.moll-5wv7dgnIgG8@public.gmane.org"
	<pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	"mark.rutland-5wv7dgnIgG8@public.gmane.org"
	<mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	"ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org"
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	"galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org"
	<galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	"linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org"
	<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
Cc: "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 2/2] arm: shmobile: lager: enable HS-USB
Date: Tue, 07 Oct 2014 07:03:25 +0000	[thread overview]
Message-ID: <5433903D.5050108@renesas.com> (raw)
In-Reply-To: <54335D0E.6070606-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>

Hello.

(2014/10/07 12:25), Yoshihiro Shimoda wrote:
> Hello.
> 
> (2014/10/06 9:59), Yoshihiro Shimoda wrote:
>> Hello.
>>
>> (2014/10/04 4:50), Sergei Shtylyov wrote:
>>> On 10/02/2014 12:04 PM, Yoshihiro Shimoda wrote:
>>>
< snip >
>>>> +&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.
>>
>> 	/* 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;
>> 		}
>> 	}
> 
> I am confusing about the gpio_get_value()...
> In case of ARM, gpio_get_value() will call gpiod_get_raw_value() finally.
> 
> gpio_get_value() in arch/arm/include/asm/gpio.h
>  --> __gpio_get_value() in include/asm-generic/gpio.h
>   --> gpiod_get_raw_value() in drivers/gpio/gpiolib.c
> 
> The gpiod_get_raw_value() doesn't care of the GPIO_ACTIVE_{HIGH,LOW}.
> So, should I add gpiod_is_active_low() or someting in the renesas_usbhs driver?
> Or, Do I misunderstand something?

I looked at the gpio-keys driver, and then I understand the renesas_usbhs driver should
have the gpio flags from of_get_named_gpio_flags().

So, I will try to modify the renesas_usbhs driver.

Best regards,
Yoshihiro Shimoda

> Best regards,
> Yoshihiro Shimoda
> 
>> Best regards,
>> Yoshihiro Shimoda
>>
>>> WBR, Sergei
>>>

WARNING: multiple messages have this Message-ID (diff)
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
To: Sergei Shtylyov
	<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>,
	"horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org"
	<horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>,
	"magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
	<magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
	<robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"pawel.moll-5wv7dgnIgG8@public.gmane.org"
	<pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	"mark.rutland-5wv7dgnIgG8@public.gmane.org"
	<mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	"ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org"
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	"galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org"
	<galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	"linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org"
	<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
Cc: "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 2/2] arm: shmobile: lager: enable HS-USB
Date: Tue, 7 Oct 2014 16:03:25 +0900	[thread overview]
Message-ID: <5433903D.5050108@renesas.com> (raw)
In-Reply-To: <54335D0E.6070606-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>

Hello.

(2014/10/07 12:25), Yoshihiro Shimoda wrote:
> Hello.
> 
> (2014/10/06 9:59), Yoshihiro Shimoda wrote:
>> Hello.
>>
>> (2014/10/04 4:50), Sergei Shtylyov wrote:
>>> On 10/02/2014 12:04 PM, Yoshihiro Shimoda wrote:
>>>
< snip >
>>>> +&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.
>>
>> 	/* 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;
>> 		}
>> 	}
> 
> I am confusing about the gpio_get_value()...
> In case of ARM, gpio_get_value() will call gpiod_get_raw_value() finally.
> 
> gpio_get_value() in arch/arm/include/asm/gpio.h
>  --> __gpio_get_value() in include/asm-generic/gpio.h
>   --> gpiod_get_raw_value() in drivers/gpio/gpiolib.c
> 
> The gpiod_get_raw_value() doesn't care of the GPIO_ACTIVE_{HIGH,LOW}.
> So, should I add gpiod_is_active_low() or someting in the renesas_usbhs driver?
> Or, Do I misunderstand something?

I looked at the gpio-keys driver, and then I understand the renesas_usbhs driver should
have the gpio flags from of_get_named_gpio_flags().

So, I will try to modify the renesas_usbhs driver.

Best regards,
Yoshihiro Shimoda

> Best regards,
> Yoshihiro Shimoda
> 
>> Best regards,
>> Yoshihiro Shimoda
>>
>>> WBR, Sergei
>>>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-10-07  7:03 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
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 [this message]
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=5433903D.5050108@renesas.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
    --cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.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.