lkml.org 
[lkml]   [2020]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH 3/3] phy: sun4i-usb: Use power efficient workqueue for debounce and poll
    HI,
    On Wed, Nov 11, 2020 at 11:44 AM Samuel Holland <samuel@sholland.org> wrote:
    >
    > On 11/9/20 6:12 AM, Frank Lee wrote:
    > > From: Yangtao Li <frank@allwinnertech.com>
    > >
    > > The debounce and poll time is generally quite long and the work not
    > > performance critical so allow the scheduler to run the work anywhere
    > > rather than in the normal per-CPU workqueue.
    > >
    > > Signed-off-by: Yangtao Li <frank@allwinnertech.com>
    > > ---
    > > drivers/phy/allwinner/phy-sun4i-usb.c | 14 +++++++-------
    > > 1 file changed, 7 insertions(+), 7 deletions(-)
    > >
    > > diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
    > > index 651d5e2a25ce..4787ad13b255 100644
    > > --- a/drivers/phy/allwinner/phy-sun4i-usb.c
    > > +++ b/drivers/phy/allwinner/phy-sun4i-usb.c
    > > @@ -326,7 +326,7 @@ static int sun4i_usb_phy_init(struct phy *_phy)
    > > /* Force ISCR and cable state updates */
    > > data->id_det = -1;
    > > data->vbus_det = -1;
    > > - queue_delayed_work(system_wq, &data->detect, 0);
    > > + queue_delayed_work(system_power_efficient_wq, &data->detect, 0);
    > > }
    > >
    > > return 0;
    > > @@ -444,7 +444,7 @@ static int sun4i_usb_phy_power_on(struct phy *_phy)
    > >
    > > /* We must report Vbus high within OTG_TIME_A_WAIT_VRISE msec. */
    >
    > This doesn't sound like "not performance critical" to me. My understanding is
    > the debouncing has a deadline from the USB spec. Maybe this is more flexible
    > than the comment makes it sound?

    According to my understanding, the more meaning of performance here
    comes from cache locality.

    \
     
     \ /
      Last update: 2020-11-11 06:55    [W:4.280 / U:0.208 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site