Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754533AbcDIQCI (ORCPT ); Sat, 9 Apr 2016 12:02:08 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:46115 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754352AbcDIQCF (ORCPT ); Sat, 9 Apr 2016 12:02:05 -0400 Date: Sat, 9 Apr 2016 18:01:56 +0200 From: Pavel Machek To: Felipe Balbi Cc: Baolin Wang , Greg KH , sre@kernel.org, dbaryshkov@gmail.com, dwmw2@infradead.org, peter.chen@freescale.com, stern@rowland.harvard.edu, r.baldyga@samsung.com, sojka@merica.cz, yoshihiro.shimoda.uh@renesas.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, sameo@linux.intel.com, lee.jones@linaro.org, ckeepax@opensource.wolfsonmicro.com, broonie@kernel.org, patches@opensource.wolfsonmicro.com, linux-pm@vger.kernel.org, device-mainlining@lists.linuxfoundation.org Subject: Re: [PATCH v4 1/5] gadget: Introduce the notifier functions Message-ID: <20160409160156.GF19362@xo-6d-61-c0.localdomain> References: <20151001172932.GG4469@saruman.tx.rr.com> <20151008155052.GH11776@xo-6d-61-c0.localdomain> <87oag7u4go.fsf@saruman.tx.rr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87oag7u4go.fsf@saruman.tx.rr.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1193 Lines: 32 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 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. > > this is a very valid point which I hadn't considered :-) > > Seems like kernel it is, no matter how easy or how difficult it gets. Basically yes. Note that for some bells & whistles, you can require userland help. For example it would probably be ok if it charged slower than usual... but I guess that does not really help in this case. Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html