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


Groups > linux.kernel > #1367034

Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

From Peter Chen <hzpeterchen@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the usb gadget power negotation
Date 2016-03-30 11:30 +0200
Message-ID <rikBP-3eD-3@gated-at.bofh.it> (permalink)
References (4 earlier) <ri5CP-10E-23@gated-at.bofh.it> <ridK1-6VB-9@gated-at.bofh.it> <riiql-1QB-9@gated-at.bofh.it> <rij35-27H-25@gated-at.bofh.it> <rijZ9-2KA-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Mar 30, 2016 at 04:40:31PM +0800, Baolin Wang wrote:
> >> > - Third, since composite driver covers 500mA (and more for CDP) after set
> >> > configuration and 2mA after suspend, and vbus handler covers connect
> >> > and disconnect. I can't see any reasons we need to notify gadget state
> >> > for power driver, do we really need to have usb_charger_plug_by_gadget?
> >>
> >> In some solutions, gadget does not negotiate with the current. They
> >> just send out one signal to power driver to set the current when the
> >> gadget state is changed (plugin or not). So we need to check the
> >> charger state by the gadget state to notify the charger IC to set
> >> current.
> >>
> >
> > Would you give some examples?
> 
> OK. I explain it in detail. Now charger detection can be from gadget
> itself or PMIC, and we focus on gadget detection. Charger IC (charger
> driver) is separate with gadget.
> When the usb cable is plugin, we need to report the plugin event to
> charger driver to set current after setting configuration for gadget.
> The usb charger is responsible for reporting plugin event to charger
> driver. But how usb charger get the plugin event? It can get the
> plugin event from gadget state (if the gadget state is more than
> 'USB_STATE_ATTACHED', it means one cable plugin). So we need notify
> gadget state to usb charger.
> 

Ok, I see, it only changes current limit at function usb_gadget_vbus_draw
in your patch 2/4. Then, we need to make sure usb_charger_set_cur_limit_by_type
is called before calling usb_gadget_set_state(gadget, USB_STATE_CONFIGURED).

It seems you have not implemented usb_charger_plug_by_gadget in your patch set.

-- 
Best Regards,
Peter Chen

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


Thread

[PATCH v8 0/4] Introduce usb charger framework to deal with the usb gadget power negotation Baolin Wang <baolin.wang@linaro.org> - 2016-03-24 13:40 +0100
  [PATCH v8 2/4] gadget: Support for the usb charger framework Baolin Wang <baolin.wang@linaro.org> - 2016-03-24 13:40 +0100
  [PATCH v8 1/4] gadget: Introduce the usb charger framework Baolin Wang <baolin.wang@linaro.org> - 2016-03-24 13:40 +0100
  [PATCH v8 4/4] power: wm831x_power: Support USB charger current limit management Baolin Wang <baolin.wang@linaro.org> - 2016-03-24 13:40 +0100
    Re: [PATCH v8 4/4] power: wm831x_power: Support USB charger current  limit management Geert Uytterhoeven <geert@linux-m68k.org> - 2016-03-27 10:30 +0200
      Re: [PATCH v8 4/4] power: wm831x_power: Support USB charger current  limit management Baolin Wang <baolin.wang@linaro.org> - 2016-03-28 08:50 +0200
  [PATCH v8 3/4] gadget: Integrate with the usb gadget supporting for usb charger Baolin Wang <baolin.wang@linaro.org> - 2016-03-24 13:40 +0100
  Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Peter Chen <hzpeterchen@gmail.com> - 2016-03-25 08:20 +0100
    Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Baolin Wang <baolin.wang@linaro.org> - 2016-03-28 09:00 +0200
      Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Peter Chen <hzpeterchen@gmail.com> - 2016-03-28 09:20 +0200
        Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Baolin Wang <baolin.wang@linaro.org> - 2016-03-28 11:20 +0200
          RE: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Peter Chen <peter.chen@nxp.com> - 2016-03-29 02:50 +0200
            Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Baolin Wang <baolin.wang@linaro.org> - 2016-03-29 04:10 +0200
              Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Mark Brown <broonie@kernel.org> - 2016-03-29 19:20 +0200
        Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Mark Brown <broonie@kernel.org> - 2016-03-29 19:30 +0200
          Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Peter Chen <hzpeterchen@gmail.com> - 2016-03-30 04:10 +0200
            Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Baolin Wang <baolin.wang@linaro.org> - 2016-03-30 09:10 +0200
              Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Peter Chen <hzpeterchen@gmail.com> - 2016-03-30 09:50 +0200
                Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Baolin Wang <baolin.wang@linaro.org> - 2016-03-30 10:50 +0200
                Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Peter Chen <hzpeterchen@gmail.com> - 2016-03-30 11:30 +0200
                Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Baolin Wang <baolin.wang@linaro.org> - 2016-03-30 11:40 +0200
      RE: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Jun Li <jun.li@nxp.com> - 2016-03-29 11:20 +0200
        Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Baolin Wang <baolin.wang@linaro.org> - 2016-03-29 11:50 +0200
          RE: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Jun Li <jun.li@nxp.com> - 2016-03-30 05:00 +0200
            Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Baolin Wang <baolin.wang@linaro.org> - 2016-03-30 08:20 +0200
              RE: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Jun Li <jun.li@nxp.com> - 2016-03-30 10:50 +0200
                Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Baolin Wang <baolin.wang@linaro.org> - 2016-03-30 11:40 +0200
                RE: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Jun Li <jun.li@nxp.com> - 2016-03-30 13:00 +0200
                RE: [PATCH v8 0/4] Introduce usb charger framework to deal with the usb gadget power negotation Felipe Balbi <balbi@kernel.org> - 2016-03-30 13:30 +0200
                Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Baolin Wang <baolin.wang@linaro.org> - 2016-03-31 07:40 +0200
                Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the usb gadget power negotation Felipe Balbi <balbi@kernel.org> - 2016-03-31 08:30 +0200
                Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Baolin Wang <baolin.wang@linaro.org> - 2016-03-31 08:40 +0200
                Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Baolin Wang <baolin.wang@linaro.org> - 2016-03-31 07:30 +0200
                RE: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Jun Li <jun.li@nxp.com> - 2016-03-31 08:20 +0200
                Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Baolin Wang <baolin.wang@linaro.org> - 2016-03-31 08:40 +0200
                Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the usb gadget power negotation Felipe Balbi <balbi@kernel.org> - 2016-03-31 10:20 +0200
                Re: [PATCH v8 0/4] Introduce usb charger framework to deal with the  usb gadget power negotation Baolin Wang <baolin.wang@linaro.org> - 2016-03-31 10:30 +0200

csiph-web