Re: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver

2020-09-17 Thread Matthias Kaehlcke
On Thu, Sep 17, 2020 at 01:24:30AM +, Peter Chen wrote: > > > > > > > > > > You may need both (glue & xhci), it depends on system design, and > > > usually, these two kinds of wakeup setting isn't conflict. > > > > Ok, thanks. So if I understand correctly the onboard hub driver should > >

RE: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver

2020-09-16 Thread Peter Chen
> > > > > > > You may need both (glue & xhci), it depends on system design, and > > usually, these two kinds of wakeup setting isn't conflict. > > Ok, thanks. So if I understand correctly the onboard hub driver should check > the > wakeup state of the xHCI to determine if remote wakeup is

Re: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver

2020-09-16 Thread Matthias Kaehlcke
On Thu, Sep 17, 2020 at 12:27:29AM +, Peter Chen wrote: > On 20-09-16 12:16:07, Matthias Kaehlcke wrote: > > Hi Peter, > > > > On Wed, Sep 16, 2020 at 08:19:07AM +, Peter Chen wrote: > > > On 20-09-15 16:03:45, Matthias Kaehlcke wrote: > > > > Hi Peter, > > > > > > > > On Tue, Sep 15,

Re: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver

2020-09-16 Thread Peter Chen
On 20-09-16 12:16:07, Matthias Kaehlcke wrote: > Hi Peter, > > On Wed, Sep 16, 2020 at 08:19:07AM +, Peter Chen wrote: > > On 20-09-15 16:03:45, Matthias Kaehlcke wrote: > > > Hi Peter, > > > > > > On Tue, Sep 15, 2020 at 07:05:38AM +, Peter Chen wrote: > > > > > > > > > > > +

Re: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver

2020-09-16 Thread Matthias Kaehlcke
On Tue, Sep 15, 2020 at 10:14:21PM -0400, Alan Stern wrote: > On Tue, Sep 15, 2020 at 04:03:45PM -0700, Matthias Kaehlcke wrote: > > Hi Peter, > > > > On Tue, Sep 15, 2020 at 07:05:38AM +, Peter Chen wrote: > > > > Whether or not it is a wakeup_source, it could get through its or its > > >

Re: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver

2020-09-16 Thread Matthias Kaehlcke
Hi Peter, On Wed, Sep 16, 2020 at 08:19:07AM +, Peter Chen wrote: > On 20-09-15 16:03:45, Matthias Kaehlcke wrote: > > Hi Peter, > > > > On Tue, Sep 15, 2020 at 07:05:38AM +, Peter Chen wrote: > > > > > > > > > + hub->cfg.power_off_in_suspend = > > > >

Re: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver

2020-09-16 Thread Peter Chen
On 20-09-15 16:03:45, Matthias Kaehlcke wrote: > Hi Peter, > > On Tue, Sep 15, 2020 at 07:05:38AM +, Peter Chen wrote: > > > > > > > + hub->cfg.power_off_in_suspend = > > > of_property_read_bool(dev->of_node, "power-off-in-suspend"); > > > > > + hub->cfg.wakeup_source =

Re: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver

2020-09-15 Thread Alan Stern
On Tue, Sep 15, 2020 at 04:03:45PM -0700, Matthias Kaehlcke wrote: > Hi Peter, > > On Tue, Sep 15, 2020 at 07:05:38AM +, Peter Chen wrote: > > Whether or not it is a wakeup_source, it could get through its or its > > children's > > /sys/../power/wakeup value, you have already used > >

Re: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver

2020-09-15 Thread Matthias Kaehlcke
Hi Peter, On Tue, Sep 15, 2020 at 07:05:38AM +, Peter Chen wrote: > > > > > + hub->cfg.power_off_in_suspend = > > of_property_read_bool(dev->of_node, "power-off-in-suspend"); > > > > + hub->cfg.wakeup_source = of_property_read_bool(dev->of_node, > > > > +"wakeup-source"); > > >

RE: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver

2020-09-15 Thread Peter Chen
> > > + hub->cfg.power_off_in_suspend = > of_property_read_bool(dev->of_node, "power-off-in-suspend"); > > > + hub->cfg.wakeup_source = of_property_read_bool(dev->of_node, > > > +"wakeup-source"); > > > > Do you really need these two properties? If the device (and its > > children if existed)

Re: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver

2020-09-14 Thread Matthias Kaehlcke
Hi Peter, thanks for your comments! On Tue, Sep 15, 2020 at 02:55:06AM +, Peter Chen wrote: > On 20-09-14 11:27:49, Matthias Kaehlcke wrote: > > The main issue this driver addresses is that a USB hub needs to be > > powered before it can be discovered. For onboard hubs this is often > >

Re: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver

2020-09-14 Thread Peter Chen
On 20-09-14 11:27:49, Matthias Kaehlcke wrote: > The main issue this driver addresses is that a USB hub needs to be > powered before it can be discovered. For onboard hubs this is often > solved by supplying the hub with an 'always-on' regulator, which is > kind of a hack. Some onboard hubs may

Re: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver

2020-09-14 Thread Matthias Kaehlcke
Hi Alan, thanks for your feedback! On Mon, Sep 14, 2020 at 04:14:03PM -0400, Alan Stern wrote: > On Mon, Sep 14, 2020 at 11:27:49AM -0700, Matthias Kaehlcke wrote: > > The main issue this driver addresses is that a USB hub needs to be > > powered before it can be discovered. For onboard hubs

Re: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver

2020-09-14 Thread Alan Stern
On Mon, Sep 14, 2020 at 11:27:49AM -0700, Matthias Kaehlcke wrote: > The main issue this driver addresses is that a USB hub needs to be > powered before it can be discovered. For onboard hubs this is often > solved by supplying the hub with an 'always-on' regulator, which is > kind of a hack. Some

Re: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver

2020-09-14 Thread Matthias Kaehlcke
Hi, I just noticed that building this results in a compilation error, due to a missing brace. I tested this patch, but with another patch on top with debug logs, the other patch adds the brace. I'll still hold off a bit before sending v2, for if others have comments. On Mon, Sep 14, 2020 at

[PATCH 2/2] USB: misc: Add onboard_usb_hub driver

2020-09-14 Thread Matthias Kaehlcke
The main issue this driver addresses is that a USB hub needs to be powered before it can be discovered. For onboard hubs this is often solved by supplying the hub with an 'always-on' regulator, which is kind of a hack. Some onboard hubs may require further initialization steps, like changing the