Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2016-04-09 Thread Pavel Machek
Hi! > >> Also, because soon enough we will have to support USB Power Delivery > >> with Type C connector, this is bound to change in the coming months. > >> > >> Frankly, I wanted all of this to be decided in userland with the > >> kernel just providing notification and basic safety checks (we do

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-12 Thread Mark Brown
On Fri, Oct 09, 2015 at 04:17:27PM -0500, Felipe Balbi wrote: > Mark, when can we try to have a discussion about how to get this > upstream ? It seems like designing everything in the mailing list will > just take forever. Any ideas ? Can we take this off-list? I'm in the UK, Baolin is in China

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-09 Thread Felipe Balbi
Hi, Pavel Machek writes: > HI! > >> > + int ret; >> > + >> > + mutex_lock(&gadget->lock); >> > + ret = raw_notifier_chain_unregister(&gadget->nh, nb); >> >> Greg, this is the kind of thing I wanted to avoid adding more of. >> >> I was wondering if you would accept subsystems using kdbus for

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-08 Thread Pavel Machek
Hi! > > What's the advantage of pushing this to userspace? By the time we > > provide enough discoverability to enable userspace to configure itself > > it seems like we'd have enough information to do the job anyway. > > you're going to be dealing with a setup where each vendor does one thing >

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-08 Thread Pavel Machek
HI! > > + int ret; > > + > > + mutex_lock(&gadget->lock); > > + ret = raw_notifier_chain_unregister(&gadget->nh, nb); > > Greg, this is the kind of thing I wanted to avoid adding more of. > > I was wondering if you would accept subsystems using kdbus for > this sort of notification. I'm ok

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-05 Thread Felipe Balbi
Hi, On Mon, Oct 05, 2015 at 05:18:33PM +0100, Mark Brown wrote: > On Mon, Oct 05, 2015 at 10:15:11AM -0500, Felipe Balbi wrote: > > On Sun, Oct 04, 2015 at 11:55:06PM +0100, Mark Brown wrote: > > > > The trouble is getting traction on adoption. Vendors have a habit of > > > doing > > > things l

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-05 Thread Mark Brown
On Mon, Oct 05, 2015 at 10:15:11AM -0500, Felipe Balbi wrote: > On Sun, Oct 04, 2015 at 11:55:06PM +0100, Mark Brown wrote: > > The trouble is getting traction on adoption. Vendors have a habit of doing > > things like finding problems and rather than reporting them deciding that > > the > > ope

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-05 Thread Felipe Balbi
On Sun, Oct 04, 2015 at 11:55:06PM +0100, Mark Brown wrote: > On Fri, Oct 02, 2015 at 02:11:25PM -0500, Felipe Balbi wrote: > > On Fri, Oct 02, 2015 at 07:49:09PM +0100, Mark Brown wrote: > > > On Fri, Oct 02, 2015 at 12:23:11PM -0500, Felipe Balbi wrote: > > > > > > Things more difficult, if noth

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-04 Thread Mark Brown
On Fri, Oct 02, 2015 at 02:11:25PM -0500, Felipe Balbi wrote: > On Fri, Oct 02, 2015 at 07:49:09PM +0100, Mark Brown wrote: > > On Fri, Oct 02, 2015 at 12:23:11PM -0500, Felipe Balbi wrote: > > > > Things more difficult, if nothing else it means we need to get whatever > > > > userspace component

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-02 Thread Felipe Balbi
On Fri, Oct 02, 2015 at 07:49:09PM +0100, Mark Brown wrote: > On Fri, Oct 02, 2015 at 12:23:11PM -0500, Felipe Balbi wrote: > > On Fri, Oct 02, 2015 at 05:47:43PM +0100, Mark Brown wrote: > > > > Can you elaborate on what the difficulties are and how punting to > > > userspace helps? If anything

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-02 Thread Mark Brown
On Fri, Oct 02, 2015 at 12:23:11PM -0500, Felipe Balbi wrote: > On Fri, Oct 02, 2015 at 05:47:43PM +0100, Mark Brown wrote: > > Can you elaborate on what the difficulties are and how punting to > > userspace helps? If anything I'd expect punting to userspace to make > the difficulty was mainly m

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-02 Thread Felipe Balbi
Hi, On Fri, Oct 02, 2015 at 07:41:07AM +0200, Greg KH wrote: > On Thu, Oct 01, 2015 at 12:29:32PM -0500, Felipe Balbi wrote: > > On Thu, Sep 24, 2015 at 10:39:23AM -0700, Baolin Wang wrote: > > > The usb charger framework is based on usb gadget. The usb charger > > > need to be notified the state

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-02 Thread Felipe Balbi
Hi, On Fri, Oct 02, 2015 at 05:47:43PM +0100, Mark Brown wrote: > On Thu, Oct 01, 2015 at 12:58:49PM -0500, Felipe Balbi wrote: > > On Thu, Oct 01, 2015 at 06:43:08PM +0100, Mark Brown wrote: > > > On Thu, Oct 01, 2015 at 12:29:32PM -0500, Felipe Balbi wrote: > > > > > Frankly, I wanted all of th

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-02 Thread Mark Brown
On Thu, Oct 01, 2015 at 12:58:49PM -0500, Felipe Balbi wrote: > On Thu, Oct 01, 2015 at 06:43:08PM +0100, Mark Brown wrote: > > On Thu, Oct 01, 2015 at 12:29:32PM -0500, Felipe Balbi wrote: > > > Frankly, I wanted all of this to be decided in userland with the > > > kernel just providing notificat

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-01 Thread Greg KH
On Thu, Oct 01, 2015 at 12:29:32PM -0500, Felipe Balbi wrote: > On Thu, Sep 24, 2015 at 10:39:23AM -0700, Baolin Wang wrote: > > The usb charger framework is based on usb gadget. The usb charger > > need to be notified the state changing of usb gadget to confirm the > > usb charger state. > > > >

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-01 Thread Felipe Balbi
On Thu, Oct 01, 2015 at 12:58:49PM -0500, Felipe Balbi wrote: > Hi, > > On Thu, Oct 01, 2015 at 06:43:08PM +0100, Mark Brown wrote: > > On Thu, Oct 01, 2015 at 12:29:32PM -0500, Felipe Balbi wrote: > > > > > Frankly, I wanted all of this to be decided in userland with the > > > kernel just provid

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-01 Thread Felipe Balbi
Hi, On Thu, Oct 01, 2015 at 06:43:08PM +0100, Mark Brown wrote: > On Thu, Oct 01, 2015 at 12:29:32PM -0500, Felipe Balbi wrote: > > > Frankly, I wanted all of this to be decided in userland with the > > kernel just providing notification and basic safety checks (we don't > > want to allow a bogus

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-01 Thread Mark Brown
On Thu, Oct 01, 2015 at 12:29:32PM -0500, Felipe Balbi wrote: > Frankly, I wanted all of this to be decided in userland with the > kernel just providing notification and basic safety checks (we don't > want to allow a bogus userspace daemon frying anybody's devices). What's the advantage of pushi

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions

2015-10-01 Thread Felipe Balbi
On Thu, Sep 24, 2015 at 10:39:23AM -0700, Baolin Wang wrote: > The usb charger framework is based on usb gadget. The usb charger > need to be notified the state changing of usb gadget to confirm the > usb charger state. > > Thus this patch adds a notifier mechanism for usb gadget to report a > eve