All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
To: Robert Jarzmik <robert.jarzmik-GANU6spQydw@public.gmane.org>
Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>,
	Philipp Zabel
	<philipp.zabel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v1 2/3] usb: phy: convert gpio-vbus to gpio_desc
Date: Wed, 5 Nov 2014 14:09:42 -0600	[thread overview]
Message-ID: <20141105200942.GW6548@saruman> (raw)
In-Reply-To: <87oasl1kn7.fsf-GANU6spQydw@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2124 bytes --]

Hi,

On Wed, Nov 05, 2014 at 09:02:04PM +0100, Robert Jarzmik wrote:
> Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> writes:
> 
> > On Wed, Nov 05, 2014 at 08:46:58PM +0100, Robert Jarzmik wrote:
> > Well, let's add that :-) Just make it optional. It's pointless to have
> > 80% duplicated code just because of 20% missing in phy-generic :-)
> >
> > Then we avoid adding gpio-vbus specific DT properties too.
> OK, got it.
> 
> It will take me a couple of days. Philipp, am I missing something apart the
> detection and connect stuff ? While I'm at making my board work with
> phy-generic, let's thing ahead.
> 
> Felipe, that will mean at least this for phy-generic :
>  - usb_phy_gen_create_phy() will be enhanced
>    => struct usb_phy_generic_platform_data will get a :
>      - int gpio_vbus field (or whatever name you wish)
>      - int gpio_vbus_inverted (or maybe we could go directly for gpio desc)

Actually, you might want to first convert phy-generic to gpio_desc and
avoid the inverted field.

>      - int gpio_pullup field (I'm not sure here, maybe we should just drop that)
>      - bool wakeup field (or another name)

sonds good to me.

>    => device tree will get :
>      - a vbus-gpio (or another name)
>      - a pullup-gpio (or nothing if we drop)

fine by me, as long as their all optional and agreed with devicetree
folks. I think we still have time for v3.19 if you manage to finish this
before next week's end.

>  - there will be a request_irq() and a workqueue (mostly taken from gpio-vbus)
>    => will call usb_gadget_vbus_connect()
>    => will call usb_gadget_vbus_disconnect()

the workqueue should be unnecessary if you use
devm_request_threaded_irq() without a top half.

> I'm writing all this just to be sure I have the good picture before I
> start coding.

sounds good to me :-)

When it comes to DT, let's try to keep things as generic as possible so
we can just move phy-generic.c into drivers/phy/ later on without much
effort ;-)

I guess everything that you need already has existent bindings.

cheers

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2014-11-05 20:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-02 18:11 [PATCH v1 1/3] usb: phy: device-tree documentation for gpio-vbus Robert Jarzmik
     [not found] ` <1414951910-16075-1-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
2014-11-02 18:11   ` [PATCH v1 2/3] usb: phy: convert gpio-vbus to gpio_desc Robert Jarzmik
     [not found]     ` <1414951910-16075-2-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
2014-11-04  8:01       ` Philipp Zabel
2014-11-05 19:29       ` Felipe Balbi
2014-11-05 19:46         ` Robert Jarzmik
     [not found]           ` <87sihx1lcd.fsf-GANU6spQydw@public.gmane.org>
2014-11-05 19:50             ` Felipe Balbi
2014-11-05 20:02               ` Robert Jarzmik
     [not found]                 ` <87oasl1kn7.fsf-GANU6spQydw@public.gmane.org>
2014-11-05 20:09                   ` Felipe Balbi [this message]
2014-11-08 17:45                     ` Robert Jarzmik
     [not found]                       ` <87a941wppk.fsf-GANU6spQydw@public.gmane.org>
2014-11-08 18:06                         ` Felipe Balbi
2014-11-02 18:11   ` [PATCH v1 3/3] usb: phy: add device-tree support for gpio-vbus Robert Jarzmik
     [not found]     ` <1414951910-16075-3-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
2014-11-04  8:28       ` Philipp Zabel
2014-11-05 19:31       ` Felipe Balbi
2014-11-04  8:20   ` [PATCH v1 1/3] usb: phy: device-tree documentation " Philipp Zabel
     [not found]     ` <CA+gwMcco4-aOHd4tQRFkUts+C9G5+ymxEhGXYB_FaeuBLQSBrw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-04 21:27       ` Robert Jarzmik
2014-11-05 12:59   ` 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=20141105200942.GW6548@saruman \
    --to=balbi-l0cymroini0@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=philipp.zabel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=robert.jarzmik-GANU6spQydw@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.