[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMz4kuKXGxpk=2Z9K9QHzK=+6unsxvn-ifx=rTy2YW8bBvn=4A@mail.gmail.com>
Date: Tue, 21 Jun 2016 19:57:56 +0800
From: Baolin Wang <baolin.wang@...aro.org>
To: Felipe Balbi <balbi@...nel.org>
Cc: Mark Brown <broonie@...nel.org>,
Greg KH <gregkh@...uxfoundation.org>,
Sebastian Reichel <sre@...nel.org>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
David Woodhouse <dwmw2@...radead.org>, robh@...nel.org,
Jun Li <jun.li@....com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Ruslan Bilovol <ruslan.bilovol@...il.com>,
Peter Chen <peter.chen@...escale.com>,
Alan Stern <stern@...land.harvard.edu>, r.baldyga@...sung.com,
grygorii.strashko@...com,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
Lee Jones <lee.jones@...aro.org>,
Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>,
patches@...nsource.wolfsonmicro.com,
Linux PM list <linux-pm@...r.kernel.org>,
USB <linux-usb@...r.kernel.org>,
device-mainlining@...ts.linuxfoundation.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v12 4/4] power: wm831x_power: Support USB charger current
limit management
On 21 June 2016 at 19:53, Felipe Balbi <balbi@...nel.org> wrote:
>
> Hi,
>
> Baolin Wang <baolin.wang@...aro.org> writes:
>> On 21 June 2016 at 19:03, Mark Brown <broonie@...nel.org> wrote:
>>> On Tue, Jun 21, 2016 at 01:30:49PM +0300, Felipe Balbi wrote:
>>>> Baolin Wang <baolin.wang@...aro.org> writes:
>>>> > @@ -607,8 +647,31 @@ static int wm831x_power_probe(struct platform_device *pdev)
>>>> > }
>>>> > }
>>>
>>>> > + if (wm831x_pdata && wm831x_pdata->usb_gadget) {
>>>> > + power->usb_charger =
>>>> > + usb_charger_find_by_name(wm831x_pdata->usb_gadget);
>>>
>>>> the fact that you rely on strings and pass them via pdata is an
>>>> indication that you don't have enough description of the HW. Seems like
>>>> we need to come up with a set of DT properties which tie a charger to a
>>>> UDC.
>>>
>>>> I'm thinking a phandle would be enough?
>>>
>>> The wm831x has no DT support currently.
>>
>> Another hand I suppose the usb charger is one virtual device and does
>> not need be described from DT.
>
> Right, I don't think that should be a device at all. But you can pass a
> phandle to the UDC controller and use that to get to struct usb_gadget
> from which you could reach ->charger.
Ah, make sense.
--
Baolin.wang
Best Regards
Powered by blists - more mailing lists