linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: NeilBrown <neilb@suse.com>
Cc: Baolin Wang <baolin.wang@linaro.org>,
	Felipe Balbi <balbi@kernel.org>,
	Greg KH <gregkh@linuxfoundation.org>,
	Sebastian Reichel <sre@kernel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	robh@kernel.org, Jun Li <jun.li@nxp.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Ruslan Bilovol <ruslan.bilovol@gmail.com>,
	Peter Chen <peter.chen@freescale.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	grygorii.strashko@ti.com,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Lee Jones <lee.jones@linaro.org>,
	John Stultz <john.stultz@linaro.org>,
	Charles Keepax <ckeepax@opensource.wolfsonmicro.com>,
	patches@opensource.wolfsonmicro.com,
	Linux PM list <linux-pm@vger.kernel.org>,
	USB <linux-usb@vger.kernel.org>,
	device-mainlining@lists.linuxfoundation.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v18 0/4] Introduce usb charger framework to deal with the usb gadget power negotation
Date: Fri, 25 Nov 2016 13:00:35 +0000	[thread overview]
Message-ID: <20161125130035.xf57xe5ajx6zfnqq@sirena.org.uk> (raw)
In-Reply-To: <87y40ccv94.fsf@notabene.neil.brown.name>

[-- Attachment #1: Type: text/plain, Size: 3142 bytes --]

On Tue, Nov 22, 2016 at 09:40:07AM +1100, NeilBrown wrote:

> I agree that the question of where the responsibility for information
> aggregation lies is open for discussion. If fact all details on how
> things should work are always open for discussion.
> I don't agree that this is the main different between our positions,
> though I can see how you might get that impression.

> You could even fix them so they look *exactly* like the notifiers that
> Baolin is proposing.  This is my key point.  It is not the end result
> that I particularly object to (though I do object to some details).  It

Ah, OK.  This really hadn't been at all clear - both Baolin and I had
the impression that the it was both that were blockers for you.  What
were the details here?

> is the process of getting to the end result that I don't like.  If the
> current system doesn't work and something different is needed, then the
> correct thing to do is to transform the existing system into something
> new that works better.  This should be a clear series of steps.  Each

Sometimes there's something to be said for working out what we want
things to look like before setting out to make these gradual
refactorings and sometimes the refactorings are just more pain than
they're worth, especially when they go across subsystems.  In this case
I do worry about the cross subsystem aspect causing hassle, it may be
more practical to do anything that represents an interface change by
adding the new interface, converting the users to it and then removing
the old interface.

At the very least the series should grow to incorporate conversion of
the existing users though.  Baolin, I think this does need adding to the
series but probably best to think about how to do it - some of Neil's
suggestions for incremental steps do seem like they should be useful
for organizing things here, probably we can get some things that can be
done internally within individual drivers merged while everything else
is under discussion.

> But I think here my key point got lost too, in part because it was hard
> to refer to an actual instance.
> My point was that in the present patch set, the "usb charger" is given
> a name which is dependant on discovery order, and only supports
> lookup-by-name.  This cannot work.

There's two bits here: one is the way names are assigned and the other
is the lookup by name.  I agree that the lookup by name isn't
particularly useful as things stand, that could just be dropped until
some naming mechanism is added.  We'd be more likely to use phandles in
DT systems, I don't know what ACPI systems would look like but I guess
it'd be something similar.

> If they supported lookup by phy-name or lookup-by-active (i.e. "find me
> any usb-charger which has power available"), or look up by some other
> attribute, then discover-order naming could work.  But the only
> lookup-mechanism is by-name, and the names aren't reliably stable.  So
> the name/lookup system proposed cannot possibly do anything useful
> with more than one usb_charger.

Baolin, I think adding a DT binding and lookup mechanism makes sense
here - do you agree?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

  reply	other threads:[~2016-11-25 13:01 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19  2:37 [PATCH v18 0/4] Introduce usb charger framework to deal with the usb gadget power negotation Baolin Wang
2016-10-19  2:37 ` [PATCH v18 1/4] usb: gadget: Introduce the usb charger framework Baolin Wang
2016-10-19  2:37 ` [PATCH v18 2/4] usb: gadget: Support for " Baolin Wang
2016-10-19  2:37 ` [PATCH v18 3/4] usb: gadget: Integrate with the usb gadget supporting for usb charger Baolin Wang
2016-10-19  2:37 ` [PATCH v18 4/4] power: wm831x_power: Support USB charger current limit management Baolin Wang
2016-10-27  7:33 ` [PATCH v18 0/4] Introduce usb charger framework to deal with the usb gadget power negotation Baolin Wang
2016-10-27 22:00   ` NeilBrown
2016-10-28 12:51     ` Baolin Wang
2016-10-28 17:03       ` Mark Brown
2016-10-31 11:25         ` Baolin Wang
2016-10-31  0:00       ` NeilBrown
2016-11-01 12:54         ` Baolin Wang
2016-11-03  1:25           ` NeilBrown
2016-11-07  8:14             ` Baolin Wang
2016-11-07 20:36               ` NeilBrown
2016-11-10  9:42                 ` Baolin Wang
2016-11-14  4:21                   ` NeilBrown
2016-11-14 12:04                     ` Mark Brown
2016-11-14 21:35                       ` NeilBrown
2016-11-15  5:03                         ` Peter Chen
2016-11-16 16:16                         ` Mark Brown
2016-11-17  6:46                           ` NeilBrown
2016-11-21 17:17                             ` Mark Brown
2016-11-21 22:40                               ` NeilBrown
2016-11-25 13:00                                 ` Mark Brown [this message]
2016-11-26  0:44                                   ` NeilBrown
2016-11-28  7:15                                   ` Baolin Wang
2016-11-14 12:36                     ` Baolin Wang
2016-11-08  8:41             ` Peter Chen
2016-11-08 20:38               ` NeilBrown
2016-11-09  1:33                 ` Peter Chen
2016-12-20  7:05             ` Baolin Wang
2016-12-20 22:07               ` NeilBrown
2016-12-21  2:54                 ` Baolin Wang
2016-12-21  3:48                   ` NeilBrown
2016-12-21  9:07                     ` Baolin Wang
2016-12-21 23:47                       ` NeilBrown
2016-12-22  7:06                         ` Baolin Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161125130035.xf57xe5ajx6zfnqq@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=balbi@kernel.org \
    --cc=baolin.wang@linaro.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=dbaryshkov@gmail.com \
    --cc=device-mainlining@lists.linuxfoundation.org \
    --cc=dwmw2@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=grygorii.strashko@ti.com \
    --cc=john.stultz@linaro.org \
    --cc=jun.li@nxp.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=neilb@suse.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=peter.chen@freescale.com \
    --cc=robh@kernel.org \
    --cc=ruslan.bilovol@gmail.com \
    --cc=sre@kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).