[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <56f54ab7-4c4a-45fc-9d43-c15c1ac07fd9@rowland.harvard.edu>
Date: Mon, 29 May 2023 20:42:31 -0400
From: Alan Stern <stern@...land.harvard.edu>
To: Badhri Jagan Sridharan <badhri@...gle.com>
Cc: gregkh@...uxfoundation.org, colin.i.king@...il.com,
xuetao09@...wei.com, quic_eserrao@...cinc.com,
water.zhangjiantao@...wei.com, peter.chen@...escale.com,
francesco@...cini.it, alistair@...stair23.me, stephan@...hold.net,
bagasdotme@...il.com, luca@...tu.xyz, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org,
Francesco Dolcini <francesco.dolcini@...adex.com>
Subject: Re: [PATCH v2] usb: gadget: udc: core: Offload usb_udc_vbus_handler
processing
On Mon, May 29, 2023 at 04:32:29PM -0700, Badhri Jagan Sridharan wrote:
> On Sat, May 27, 2023 at 9:36 AM Alan Stern <stern@...land.harvard.edu> wrote:
> >
> > I think it would be better just to merge the new material into
> > usb_gadget_connect() and usb_gadget_disconnect().
>
> I ended up merging them into usb_gadget_pullup_update_locked() so that
> each of the individual helper function can call
> usb_gadget_pullup_update_locked() while holding the connect_lock. I
> actually had usb_gadget_(dis)connect() set udc->vbus.
What? No, that's not right. They are two completely separate concepts.
The host controls VBUS and the gadget controls the pullup.
> It appears to me
> that both usb_gadget_(dis)connect() and usb_udc_vbus_handler() are
> meant to be called based on vbus presence and hence seem to be
> redundant.
They are not. We need to support turning off the pullup while VBUS is
on.
> Wondering if we could get rid of usb_gadget_(dis)connect()
> given that drivers/power/supply/isp1704_charger.c is only call it and
> instead make it call usb_udc_vbus_handler() instead ?
In short, no.
Alan Stern
Powered by blists - more mailing lists