From mboxrd@z Thu Jan 1 00:00:00 1970 From: gregkh@linuxfoundation.org (Greg KH) Date: Tue, 27 Mar 2018 11:00:04 +0200 Subject: [RFC usb-next v3 1/2] usb: core: split usb_phy_roothub_{init,alloc} In-Reply-To: <05b749dc-c8e6-260f-287d-7b3e8f599d13@ti.com> References: <20180326203846.7248-1-martin.blumenstingl@googlemail.com> <20180326203846.7248-2-martin.blumenstingl@googlemail.com> <05b749dc-c8e6-260f-287d-7b3e8f599d13@ti.com> Message-ID: <20180327090004.GA6649@kroah.com> To: linus-amlogic@lists.infradead.org List-Id: linus-amlogic.lists.infradead.org On Tue, Mar 27, 2018 at 11:24:08AM +0300, Roger Quadros wrote: > On 26/03/18 23:38, Martin Blumenstingl wrote: > > Before this patch usb_phy_roothub_init served two purposes (from a > > caller's point of view - like hcd.c): > > - parsing the PHYs and allocating the list entries > > - calling phy_init on each list entry > > > > While this worked so far it has one disadvantage: if we need to call > > phy_init for each PHY instance then the existing code cannot be re-used. > > Solve this by splitting off usb_phy_roothub_alloc which only parses the > > PHYs and allocates the list entries. > > usb_phy_roothub_init then gets a struct usb_phy_roothub and only calls > > phy_init on each PHY instance (along with the corresponding cleanup if > > that failed somewhere). > > > > This is a preparation step for adding proper suspend support for some > > hardware that requires phy_exit to be called during suspend and phy_init > > to be called during resume. > > > > Signed-off-by: Martin Blumenstingl > > I don't think we need RFC in subject. As I don't apply series with RFC in the subject, that might be a good idea :) From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Subject: Re: [RFC usb-next v3 1/2] usb: core: split usb_phy_roothub_{init,alloc} Date: Tue, 27 Mar 2018 11:00:04 +0200 Message-ID: <20180327090004.GA6649@kroah.com> References: <20180326203846.7248-1-martin.blumenstingl@googlemail.com> <20180326203846.7248-2-martin.blumenstingl@googlemail.com> <05b749dc-c8e6-260f-287d-7b3e8f599d13@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <05b749dc-c8e6-260f-287d-7b3e8f599d13-l0cyMroinI0@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+glpam-linux-mediatek=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Roger Quadros Cc: d-gerlach-l0cyMroinI0@public.gmane.org, Martin Blumenstingl , j-keerthy-l0cyMroinI0@public.gmane.org, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kishon-l0cyMroinI0@public.gmane.org, chunfeng.yun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org, linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: linux-mediatek@lists.infradead.org On Tue, Mar 27, 2018 at 11:24:08AM +0300, Roger Quadros wrote: > On 26/03/18 23:38, Martin Blumenstingl wrote: > > Before this patch usb_phy_roothub_init served two purposes (from a > > caller's point of view - like hcd.c): > > - parsing the PHYs and allocating the list entries > > - calling phy_init on each list entry > > > > While this worked so far it has one disadvantage: if we need to call > > phy_init for each PHY instance then the existing code cannot be re-used. > > Solve this by splitting off usb_phy_roothub_alloc which only parses the > > PHYs and allocates the list entries. > > usb_phy_roothub_init then gets a struct usb_phy_roothub and only calls > > phy_init on each PHY instance (along with the corresponding cleanup if > > that failed somewhere). > > > > This is a preparation step for adding proper suspend support for some > > hardware that requires phy_exit to be called during suspend and phy_init > > to be called during resume. > > > > Signed-off-by: Martin Blumenstingl > > I don't think we need RFC in subject. As I don't apply series with RFC in the subject, that might be a good idea :) From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Subject: [RFC,usb-next,v3,1/2] usb: core: split usb_phy_roothub_{init,alloc} From: Greg Kroah-Hartman Message-Id: <20180327090004.GA6649@kroah.com> Date: Tue, 27 Mar 2018 11:00:04 +0200 To: Roger Quadros Cc: Martin Blumenstingl , linux-usb@vger.kernel.org, matthias.bgg@gmail.com, stern@rowland.harvard.edu, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, j-keerthy@ti.com, d-gerlach@ti.com, kishon@ti.com, chunfeng.yun@mediatek.com List-ID: T24gVHVlLCBNYXIgMjcsIDIwMTggYXQgMTE6MjQ6MDhBTSArMDMwMCwgUm9nZXIgUXVhZHJvcyB3 cm90ZToKPiBPbiAyNi8wMy8xOCAyMzozOCwgTWFydGluIEJsdW1lbnN0aW5nbCB3cm90ZToKPiA+ IEJlZm9yZSB0aGlzIHBhdGNoIHVzYl9waHlfcm9vdGh1Yl9pbml0IHNlcnZlZCB0d28gcHVycG9z ZXMgKGZyb20gYQo+ID4gY2FsbGVyJ3MgcG9pbnQgb2YgdmlldyAtIGxpa2UgaGNkLmMpOgo+ID4g LSBwYXJzaW5nIHRoZSBQSFlzIGFuZCBhbGxvY2F0aW5nIHRoZSBsaXN0IGVudHJpZXMKPiA+IC0g Y2FsbGluZyBwaHlfaW5pdCBvbiBlYWNoIGxpc3QgZW50cnkKPiA+IAo+ID4gV2hpbGUgdGhpcyB3 b3JrZWQgc28gZmFyIGl0IGhhcyBvbmUgZGlzYWR2YW50YWdlOiBpZiB3ZSBuZWVkIHRvIGNhbGwK PiA+IHBoeV9pbml0IGZvciBlYWNoIFBIWSBpbnN0YW5jZSB0aGVuIHRoZSBleGlzdGluZyBjb2Rl IGNhbm5vdCBiZSByZS11c2VkLgo+ID4gU29sdmUgdGhpcyBieSBzcGxpdHRpbmcgb2ZmIHVzYl9w aHlfcm9vdGh1Yl9hbGxvYyB3aGljaCBvbmx5IHBhcnNlcyB0aGUKPiA+IFBIWXMgYW5kIGFsbG9j YXRl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