Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1242561

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

From Pavel Machek <pavel@ucw.cz>
Newsgroups linux.kernel
Subject Re: [PATCH v4 1/5] gadget: Introduce the notifier functions
Date 2015-10-08 18:00 +0200
Message-ID <qhlLP-81t-9@gated-at.bofh.it> (permalink)
References <qciOB-1BH-7@gated-at.bofh.it> <qciOC-1BH-13@gated-at.bofh.it> <qePZL-2Ya-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 okay waiting for kdbus for another
> couple merge windows (if we have to) before that's merged, but
> if we take this raw notifier approach now, we will end up having
> to support it forever.
> 
> 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 don't
> want to allow a bogus userspace daemon frying anybody's devices).
> 
> How would you feel about that ?

So init=/bin/bash boot no longer provides machine that charges itself?

That would be bad. Traditionally, hardware controls battery charging,
and if hardware needs some help, we should do it in kernel, to mask
the difference from userspace.
								Pavel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH v4 1/5] gadget: Introduce the notifier functions Pavel Machek <pavel@ucw.cz> - 2015-10-08 18:00 +0200
  Re: [PATCH v4 1/5] gadget: Introduce the notifier functions Felipe Balbi <balbi@ti.com> - 2015-10-09 23:20 +0200
    Re: [PATCH v4 1/5] gadget: Introduce the notifier functions Mark Brown <broonie@kernel.org> - 2015-10-12 19:00 +0200

csiph-web