[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMz4ku+cJ85wn71sf==2UkaaLK_U_GXZGBZy34m0hVuVaKojdg@mail.gmail.com>
Date: Mon, 18 Apr 2016 16:57:24 +0800
From: Baolin Wang <baolin.wang@...aro.org>
To: Jun Li <jun.li@....com>
Cc: "balbi@...nel.org" <balbi@...nel.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"sre@...nel.org" <sre@...nel.org>,
"dbaryshkov@...il.com" <dbaryshkov@...il.com>,
"dwmw2@...radead.org" <dwmw2@...radead.org>,
"peter.chen@...escale.com" <peter.chen@...escale.com>,
"stern@...land.harvard.edu" <stern@...land.harvard.edu>,
"r.baldyga@...sung.com" <r.baldyga@...sung.com>,
"yoshihiro.shimoda.uh@...esas.com" <yoshihiro.shimoda.uh@...esas.com>,
"lee.jones@...aro.org" <lee.jones@...aro.org>,
"broonie@...nel.org" <broonie@...nel.org>,
"ckeepax@...nsource.wolfsonmicro.com"
<ckeepax@...nsource.wolfsonmicro.com>,
"patches@...nsource.wolfsonmicro.com"
<patches@...nsource.wolfsonmicro.com>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"device-mainlining@...ts.linuxfoundation.org"
<device-mainlining@...ts.linuxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v10 1/4] gadget: Introduce the usb charger framework
Hi Jun,
On 18 April 2016 at 16:27, Jun Li <jun.li@....com> wrote:
>> >>
>> >> But another issue is some users may need to get the charger type from
>> >> power supply by "power_supply_get_property()" function, we need to
>> >> integrate with the power supply things in the usb charger framework,
>> >> not user to implement that.
>> >
>> > Why this user(your case) can't put the charger type get by
>> > "power_supply_get_property()" in its uchger->charger_detect(), any
>> > special reason prevent you doing it? I am not sure if this case is
>> > very common, even if it is, you also can put it in
>> > usb_charger_detect_type()
>> >
>> > usb_charger_detect_type()
>> > {
>> > If can get from power_supply_get_property()
>> > ...
>> > else if uchger->charger_detect
>> > uchger->charger_detect();
>> > ...
>> > }
>>
>> If user want to implement above method, they need to get the
>> 'power_supply' structure to do this action, which maybe can not get in
>> some contexts. So we need to integrate with the power supply things to
>> avoid this situation. IIRC, Felipe suggested me to flesh out the charger
>> getting method.
>>
>
> Okay, then I agree with you to let user do that with more flexibility,
> I tried to enable usb charger detection on one NXP i.mx platform based on
> this framework, works fine, thanks!
That's great. Thanks.
--
Baolin.wang
Best Regards
Powered by blists - more mailing lists