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

2016-07-10 Thread Baolin Wang
Hi Felipe, On 1 July 2016 at 14:05, Baolin Wang <baolin.w...@linaro.org> wrote: > Currently the Linux kernel does not provide any standard integration of this > feature that integrates the USB subsystem with the system power regulation > provided by PMICs meaning that either v

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-07 Thread Baolin Wang
On 7 July 2016 at 20:51, Michal Nazarewicz <min...@mina86.com> wrote: > On Thu, Jul 07 2016, Baolin Wang wrote: >> Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size >> attribute, which means it need to align the request buffer's size to an

[PATCH] usb: core: Add runtime resume checking

2016-08-09 Thread Baolin Wang
, if it failed we should clear the runtime errors by pm_runtime_set_suspended() function to avoid runtime resume failure. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/core/driver.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/us

Re: [PATCH v14 1/4] usb: gadget: Introduce the usb charger framework

2016-06-30 Thread Baolin Wang
Hi Felipe, On 30 June 2016 at 18:30, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> +static ssize_t charger_state_show(struct device *dev, >> + struct device_attribute *attr, >

[PATCH] usb: gadget: Add the gserial port checking in gs_start_tx()

2016-06-30 Thread Baolin Wang
Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/function/u_serial.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c index 3580f19..66a0910 100644 --- a/

[PATCH v15 1/4] usb: gadget: Introduce the usb charger framework

2016-07-01 Thread Baolin Wang
or usb gadget state. This patch doesn't yet integrate with the gadget code, so some functions which rely on the 'gadget' are not completed, that will be implemented in the following patches. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Reviewed-by: Li Jun <jun...@nxp.com> Tested-by:

[PATCH v15 4/4] power: wm831x_power: Support USB charger current limit management

2016-07-01 Thread Baolin Wang
-by: Mark Brown <broo...@kernel.org> Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Acked-by: Lee Jones <lee.jo...@linaro.org> Acked-by: Charles Keepax <ckee...@opensource.wolfsonmicro.com> Acked-by: Peter Chen <peter.c...@freescale.com> Acked-by: Seba

[PATCH v15 2/4] usb: gadget: Support for the usb charger framework

2016-07-01 Thread Baolin Wang
For supporting the usb charger, it adds the usb_charger_init() and usb_charger_exit() functions for usb charger initialization and exit. It will report to the usb charger when the gadget state is changed, then the usb charger can do the power things. Signed-off-by: Baolin Wang <baoli

[PATCH v15 3/4] usb: gadget: Integrate with the usb gadget supporting for usb charger

2016-07-01 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger can implement the usb_charger_plug_by_gadget() function, usb_charger_exit() function and dev_to_uchger() function by getting 'struct usb_charger' from 'struct gadget'. Signed-off-by: Baolin Wang <baolin.w...@linaro.

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

2016-07-01 Thread Baolin Wang
n to check charger state. - Remove the mutex lock in usb_charger_set_cur_limit_by_type() function in case will be issued in atomic context. Baolin Wang (4): usb: gadget: Introduce the usb charger framework usb: gadget: Support for the usb charger framework usb: gadget: Integrate with the

[PATCH v14 1/4] usb: gadget: Introduce the usb charger framework

2016-06-29 Thread Baolin Wang
or usb gadget state. This patch doesn't yet integrate with the gadget code, so some functions which rely on the 'gadget' are not completed, that will be implemented in the following patches. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Reviewed-by: Li Jun <jun...@nxp.com> Tested-by:

[PATCH v14 4/4] power: wm831x_power: Support USB charger current limit management

2016-06-29 Thread Baolin Wang
-by: Mark Brown <broo...@kernel.org> Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Acked-by: Lee Jones <lee.jo...@linaro.org> Acked-by: Charles Keepax <ckee...@opensource.wolfsonmicro.com> Acked-by: Peter Chen <peter.c...@freescale.com> Acked-by: Seba

[PATCH v14 2/4] usb: gadget: Support for the usb charger framework

2016-06-29 Thread Baolin Wang
For supporting the usb charger, it adds the usb_charger_init() and usb_charger_exit() functions for usb charger initialization and exit. It will report to the usb charger when the gadget state is changed, then the usb charger can do the power things. Signed-off-by: Baolin Wang <baoli

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

2016-06-29 Thread Baolin Wang
be issued in atomic context. Baolin Wang (4): usb: gadget: Introduce the usb charger framework usb: gadget: Support for the usb charger framework usb: gadget: Integrate with the usb gadget supporting for usb charger power: wm831x_power: Support USB charger current limit management dri

[PATCH v14 3/4] usb: gadget: Integrate with the usb gadget supporting for usb charger

2016-06-29 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger can implement the usb_charger_plug_by_gadget() function, usb_charger_exit() function and dev_to_uchger() function by getting 'struct usb_charger' from 'struct gadget'. Signed-off-by: Baolin Wang <baolin.w...@linaro.

Re: [PATCH v12 2/4] gadget: Support for the usb charger framework

2016-06-29 Thread Baolin Wang
Hi Felipe, On 29 June 2016 at 20:06, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >>>>>>>> For supporting the usb charger, it adds the usb_charger_init() and >>>>>>>&

Re: [PATCH] usb: dwc3: gadget: Add the suspend state checking when stopping gadget

2016-06-20 Thread Baolin Wang
On 20 June 2016 at 16:15, Felipe Balbi <ba...@kernel.org> wrote: > Baolin Wang <baolin.w...@linaro.org> writes: > >> It will be crash to stop gadget when the dwc3 device had been into suspend >> state, thus we need to check if the dwc3 device had been into suspend

[PATCH v2] usb: dwc3: gadget: Add the suspend state checking when stopping gadget

2016-06-20 Thread Baolin Wang
It will be crash to stop gadget when the dwc3 device had been into suspend state, thus we need to check if the dwc3 device had been into suspend state when UDC try to stop gadget. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/gadget.c |3 +++ 1 file chan

Re: [PATCH v5 1/2] usb: host: plat: Enable xhci plat runtime PM

2017-02-05 Thread Baolin Wang
Hi Mathias, On 31 January 2017 at 21:14, Mathias Nyman <mathias.ny...@linux.intel.com> wrote: > On 16.01.2017 12:56, Baolin Wang wrote: >> >> Hi Mathias, > > > Hi > > Sorry about the long review delay > CC Alan in case my pm assumptions need to be corrected

Re: [PATCH v5 1/2] usb: host: plat: Enable xhci plat runtime PM

2017-02-05 Thread Baolin Wang
Hi Robert, On 26 January 2017 at 01:30, Robert Foss wrote: > Looks good to me. > > Feel free to add my r-b. OK, thanks for your reviewing. -- Baolin.wang Best Regards

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-02-21 Thread Baolin Wang
On 17 February 2017 at 16:04, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >>>> (One possible approach would be to have the setup routine return >>>> different values for explicit and impl

Re: [PATCH v19 2/4] usb: gadget: Support for the usb charger framework

2017-02-20 Thread Baolin Wang
te to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Baolin-Wang/Introduce-usb-charger-framework-to-deal-with-the-usb-gadget-power-negotation/20170220-173051 > config: i386-randconfig-x015-201708 (attached as .config) > compiler: gcc-6 (Deb

Re: [PATCH v5 1/2] usb: host: plat: Enable xhci plat runtime PM

2017-02-20 Thread Baolin Wang
On 20 February 2017 at 23:10, Mathias Nyman <mathias.ny...@linux.intel.com> wrote: > On 20.02.2017 04:47, Baolin Wang wrote: >> >> Hi Mathias, >> >> On 6 February 2017 at 13:26, Baolin Wang <baolin.w...@linaro.org> wrote: >>> >>> Hi Ma

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-02-16 Thread Baolin Wang
nsaction: token, data, and >> handshake. >> >> Also, data stages are already explicit. So your temporary flag might >> better be called "wants_explicit_status_stages". > > I stand corrected ;-) > >>> Then add support for that to each UDC and set

Re: [PATCH v5 1/2] usb: host: plat: Enable xhci plat runtime PM

2017-02-19 Thread Baolin Wang
Hi Mathias, On 6 February 2017 at 13:26, Baolin Wang <baolin.w...@linaro.org> wrote: > Hi Mathias, > > On 31 January 2017 at 21:14, Mathias Nyman > <mathias.ny...@linux.intel.com> wrote: >> On 16.01.2017 12:56, Baolin Wang wrote: >>> >>> Hi Mathia

Re: [PATCH RESEND v7 1/1] usb: xhci: plat: Enable async suspend/resume

2017-02-19 Thread Baolin Wang
enable(>dev); > + device_enable_async_suspend(>dev); > > return 0; > > -- > 2.11.0.453.g787f75f05 > Reviewed-by: Baolin Wang <baolin.w...@linaro.org> -- Baolin.wang Best Regards

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-02-19 Thread Baolin Wang
On 17 February 2017 at 16:04, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >>>> (One possible approach would be to have the setup routine return >>>> different values for explicit and impl

[PATCH v19 1/4] usb: gadget: Introduce the usb charger framework

2017-02-20 Thread Baolin Wang
or usb gadget state. This patch doesn't yet integrate with the gadget code, so some functions which rely on the 'gadget' are not completed, that will be implemented in the following patches. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Reviewed-by: Li Jun <jun...@nxp.com> Tested-by:

[PATCH v19 3/4] usb: gadget: Integrate with the usb gadget supporting for usb charger

2017-02-20 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger can implement the usb_charger_plug_by_gadget() function, usb_charger_exit() function and dev_to_uchger() function by getting 'struct usb_charger' from 'struct gadget'. Signed-off-by: Baolin Wang <baolin.w...@linaro.

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

2017-02-20 Thread Baolin Wang
ur_limit_by_type() function in case will be issued in atomic context. Baolin Wang (4): usb: gadget: Introduce the usb charger framework usb: gadget: Support for the usb charger framework usb: gadget: Integrate with the usb gadget supporting for usb charger power: wm831x_power: Support USB

[PATCH v19 4/4] power: wm831x_power: Support USB charger current limit management

2017-02-20 Thread Baolin Wang
-by: Mark Brown <broo...@kernel.org> Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Acked-by: Lee Jones <lee.jo...@linaro.org> Acked-by: Charles Keepax <ckee...@opensource.wolfsonmicro.com> Acked-by: Peter Chen <peter.c...@freescale.com> Acked-by: Seba

[PATCH v19 2/4] usb: gadget: Support for the usb charger framework

2017-02-20 Thread Baolin Wang
For supporting the usb charger, it adds the usb_charger_init() and usb_charger_exit() functions for usb charger initialization and exit. It will report to the usb charger when the gadget state is changed, then the usb charger can do the power things. Signed-off-by: Baolin Wang <baoli

[RFC PATCH 3/3] usb: phy: fsl: Remove the set_power callback

2017-01-18 Thread Baolin Wang
Since the set_power callback did not do anything for power setting, then remove it. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/phy/phy-fsl-usb.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/p

[RFC PATCH 1/3] usb: phy: ab8500: Remove the set_power callback

2017-01-18 Thread Baolin Wang
There are no users will use the vbus_draw variable set by set_power() callback to set the vbus current. Thus we can remove it. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/phy/phy-ab8500-usb.c | 20 1 file changed, 20 deletions(-) diff

[RFC PATCH 2/3] usb: phy: msm: Remove the set_power callback

2017-01-18 Thread Baolin Wang
Since it will not set the PMIC current drawn from USB configuration by set_power callback, then remove it. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/phy/phy-msm-usb.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/usb/phy/phy-msm

[RFC PATCH 0/3] Remove some dummy set_power callbacks

2017-01-18 Thread Baolin Wang
In future we plan to introduce USB charger to set PMIC current drawn from USB configuration, instead of using set_power callback in phy driver. Moreover in these 3 phy drivers, the set_power callback did not implement anything to set PMIC current, thus we should remove them. Baolin Wang (3

Re: [PATCH] usb: dwc3: core: Disable USB2.0 phy suspend when dwc3 acts as host role

2017-01-18 Thread Baolin Wang
Hi John, On 19 January 2017 at 11:31, John Youn <john.y...@synopsys.com> wrote: > On 1/18/2017 7:12 PM, Baolin Wang wrote: >> Hi John, >> >> On 19 January 2017 at 09:33, John Youn <john.y...@synopsys.com> wrote: >>> On 1/16/2017 2:38 AM, Felipe Balb

Re: [PATCH] usb: dwc3: core: Disable USB2.0 phy suspend when dwc3 acts as host role

2017-01-18 Thread Baolin Wang
Hi John, On 19 January 2017 at 09:33, John Youn <john.y...@synopsys.com> wrote: > On 1/16/2017 2:38 AM, Felipe Balbi wrote: >> >> Hi, >> >> John Youn <john.y...@synopsys.com> writes: >>>> Baolin Wang <baolin.w...@linaro.org> writes: >>

Re: [PATCH v5 1/2] usb: host: plat: Enable xhci plat runtime PM

2017-01-16 Thread Baolin Wang
Hi Mathias, On 13 December 2016 at 15:49, Baolin Wang <baolin.w...@linaro.org> wrote: > Enable the xhci plat runtime PM for parent device to suspend/resume xhci. > Also call pm_runtime_get_noresume() in probe() function in case the parent > device doesn't call suspend/resume call

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-16 Thread Baolin Wang
Hi, On 16 January 2017 at 19:29, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> Hi, >> >> On 16 January 2017 at 18:56, Felipe Balbi <ba...@kernel.org> wrote: >>> >>> Hi, >

Re: [PATCH v5 2/2] usb: dwc3: core: Support the dwc3 host suspend/resume

2017-01-16 Thread Baolin Wang
Hi, On 16 January 2017 at 18:28, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> For some mobile devices with strict power management, we also want to suspend >> the host when the slave is detached fo

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-16 Thread Baolin Wang
Hi, On 16 January 2017 at 18:56, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> When handing the SETUP packet by composite_setup(), we will release the >> dwc->lock. If we get the 'USB_GADGET_DELAYED_STATU

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-16 Thread Baolin Wang
Hi, On 16 January 2017 at 20:06, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> Hi, >> >> On 16 January 2017 at 19:29, Felipe Balbi <ba...@kernel.org> wrote: >>> >>>

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-17 Thread Baolin Wang
Hi, On 17 January 2017 at 18:39, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >>>>>>> Baolin Wang <baolin.w...@linaro.org> writes: >>>>>>>> When handing the SETUP pac

[PATCH v3] time: alarmtimer: Add the trcepoints for alarmtimer

2016-08-21 Thread Baolin Wang
off-by: Baolin Wang <baolin.w...@linaro.org> --- Changes since v2: - Add TRACE_DEFINE_ENUM() macros. - Change the time variables type to save space in the ring buffer. - Add trace_alarmtimer_suspend_enabled() in case of tracing is not enabled. Changes since v1: - Fix the kbuild error.

Re: [PATCH v2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-08-19 Thread Baolin Wang
Hi Steven, On 18 August 2016 at 22:33, Steven Rostedt <rost...@goodmis.org> wrote: > On Thu, 18 Aug 2016 16:47:39 +0800 > Baolin Wang <baolin.w...@linaro.org> wrote: > since v1: >> - Fix the kbuild error. >> - Modify the changelog with adding trace log

Re: [PATCH 2/4] usb: host: xhci: Introduce one new 'usb3_slow_suspend' member for xhci private data

2016-08-19 Thread Baolin Wang
Hi Felipe, On 18 August 2016 at 21:42, Felipe Balbi <ba...@kernel.org> wrote: > > Hi Baolin, > > Baolin Wang <baolin.w...@linaro.org> writes: >>>>>> diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c >>>>>> inde

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-03-02 Thread Baolin Wang
Hi, On 28 February 2017 at 06:11, Alan Stern <st...@rowland.harvard.edu> wrote: > On Tue, 21 Feb 2017, Baolin Wang wrote: > >> On 17 February 2017 at 16:04, Felipe Balbi <ba...@kernel.org> wrote: >> > >> > Hi, >> > >> > Baolin Wang <

[PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-05 Thread Baolin Wang
In order to clean up the mmc_erase() function and do some optimization for erase size alignment, factor out the guts of erase size alignment into mmc_align_erase_size() function. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Tested-by: Shawn Lin <shawn@rock-chips.com> ---

[PATCH v4 3/3] mmc: core: Optimize the mmc erase size alignment

2016-09-05 Thread Baolin Wang
In most cases the 'card->erase_size' is power of 2, then the round_up/down() function is more efficient than '%' operation when the 'card->erase_size' is power of 2. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Tested-by: Shawn Lin <shawn@rock-chips.com> --- drive

[PATCH v4 1/3] mmc: core: Remove some redundant validations in mmc_erase() function

2016-09-05 Thread Baolin Wang
Before issuing mmc_erase() function, users always have checked if it can erase with mmc_can_erase/trim/discard() function, thus remove the redundant erase checking in mmc_erase() function. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Tested-by: Shawn Lin <shawn@rock-

Re: [PATCH v3] mmc: core: Optimize the mmc erase size alignment

2016-09-05 Thread Baolin Wang
Hi Shawn, On 2 September 2016 at 16:34, Shawn Lin <shawn@rock-chips.com> wrote: > Hi Baolin, > > On 2016/8/31 17:32, Baolin Wang wrote: >> >> Before issuing mmc_erase() function, users always have checked if it can >> erase with mmc_can_erase/tri

Re: [PATCH v3] mmc: core: Optimize the mmc erase size alignment

2016-09-05 Thread Baolin Wang
Hi Ulf, On 2 September 2016 at 17:43, Ulf Hansson <ulf.hans...@linaro.org> wrote: > On 31 August 2016 at 11:32, Baolin Wang <baolin.w...@linaro.org> wrote: >> Before issuing mmc_erase() function, users always have checked if it can >> erase with mmc_can_erase/trim/disc

Re: [PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-06 Thread Baolin Wang
Hi Andreas, On 6 September 2016 at 12:34, Andreas Mohr <a...@lisas.de> wrote: > On Tue, Sep 06, 2016 at 10:55:11AM +0800, Baolin Wang wrote: >> In order to clean up the mmc_erase() function and do some optimization >> for erase size alignment, factor out the guts of

Re: [PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-06 Thread Baolin Wang
On 6 September 2016 at 15:19, Andreas Mohr <a...@lisas.de> wrote: > On Tue, Sep 06, 2016 at 02:26:06PM +0800, Baolin Wang wrote: >> On 6 September 2016 at 12:34, Andreas Mohr <a...@lisas.de> wrote: >> >> - to = from + nr; >> >> - >> >>

Re: [PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-06 Thread Baolin Wang
On 6 September 2016 at 15:52, Adrian Hunter <adrian.hun...@intel.com> wrote: > On 6/09/2016 9:26 a.m., Baolin Wang wrote: >> >> Hi Andreas, >> >> On 6 September 2016 at 12:34, Andreas Mohr <a...@lisas.de> wrote: >>> >>> On

[PATCH v5 2/2] mmc: core: Optimize the mmc erase size alignment

2016-09-06 Thread Baolin Wang
In most cases the 'card->erase_size' is power of 2, then the round_up/down() function is more efficient than '%' operation when the 'card->erase_size' is power of 2. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Tested-by: Shawn Lin <shawn@rock-chips.com> --- drive

[PATCH v5 1/2] mmc: core: Factor out the alignment of erase size

2016-09-06 Thread Baolin Wang
In order to clean up the mmc_erase() function and do some optimization for erase size alignment, factor out the guts of erase size alignment into mmc_align_erase_size() function. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Tested-by: Shawn Lin <shawn@rock-chips.com> --- C

Re: [PATCH v4 1/3] mmc: core: Remove some redundant validations in mmc_erase() function

2016-09-06 Thread Baolin Wang
On 6 September 2016 at 20:17, Ulf Hansson <ulf.hans...@linaro.org> wrote: > On 6 September 2016 at 04:55, Baolin Wang <baolin.w...@linaro.org> wrote: >> Before issuing mmc_erase() function, users always have checked if it can >> erase with mmc_can_erase/trim/disc

Re: [tip:timers/core] time: alarmtimer: Add tracepoints for alarmtimers

2016-09-06 Thread Baolin Wang
Hi John and Ingo, On 7 September 2016 at 08:10, John Stultz <john.stu...@linaro.org> wrote: > On Tue, Sep 6, 2016 at 2:49 AM, Ingo Molnar <mi...@kernel.org> wrote: >> >> * tip-bot for Baolin Wang <tip...@zytor.com> wrote: >> >>> Commit-ID: a0a

Re: [PATCH] rtc: Add some dummy static inline functions

2016-09-07 Thread Baolin Wang
Hi, On 7 September 2016 at 20:12, Alexandre Belloni <alexandre.bell...@free-electrons.com> wrote: > On 07/09/2016 at 15:17:26 +0800, Baolin Wang wrote : >> Add some dummy static inline functions in case CONFIG_RTC_LIB is not defined. >> > > The question your commit l

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

2016-09-08 Thread Baolin Wang
On 8 September 2016 at 15:31, NeilBrown <ne...@suse.com> wrote: > On Thu, Sep 08 2016, Baolin Wang wrote: > >> Hi Neil, >> >> On 6 September 2016 at 13:40, NeilBrown <nfbr...@novell.com> wrote: >>> On Mon, Aug 29 2016, Baolin Wang wrote: >>>

[PATCH] usb: dwc3: gadget: Add disconnect checking when changing function dynamically

2016-09-08 Thread Baolin Wang
the DEVCTRLHLT flag. Also adding some disconnect checking to avoid queuing any requests when the gadget is stopped. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/ep0.c|8 drivers/usb/dwc3/gadget.c | 32 +++- 2 files chang

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

2016-09-08 Thread Baolin Wang
Hi Neil, On 6 September 2016 at 13:40, NeilBrown <nfbr...@novell.com> wrote: > On Mon, Aug 29 2016, Baolin Wang wrote: > >> Hi Felipe, >> >> On 11 August 2016 at 11:14, Baolin Wang <baolin.w...@linaro.org> wrote: >>> Hi Felipe, >>>

[PATCH v2] rtc: Add some dummy static inline functions

2016-09-07 Thread Baolin Wang
inline functions in case CONFIG_RTC_LIB is not defined. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Fixes: a0a6e06d545a ("time: alarmtimer: Add tracepoints for alarmtimers") --- Changes since v1: - Modify the commit log. --- include/li

Re: [PATCH v4] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-07 Thread Baolin Wang
Hi Thomas, On 8 September 2016 at 00:03, Thomas Gleixner wrote: > On Tue, 6 Sep 2016, John Stultz wrote: >> > Changes since v3: >> > - Fix the build error on S390. >> >> Since the original change is already applied to tip/timers/core, can >> you provide an incremental patch

Re: [PATCH v3] time: alarmtimer: Add the trcepoints for alarmtimer

2016-08-30 Thread Baolin Wang
Hi Steven, On 30 August 2016 at 23:42, Steven Rostedt <rost...@goodmis.org> wrote: > On Tue, 30 Aug 2016 19:50:20 +0800 > Baolin Wang <baolin.w...@linaro.org> wrote: > >> Hi, >> >> On 22 August 2016 at 12:23, Baolin Wang <baolin.w...@linaro.org> wrot

Re: [PATCH v3] time: alarmtimer: Add the trcepoints for alarmtimer

2016-08-30 Thread Baolin Wang
On 31 August 2016 at 02:58, John Stultz <john.stu...@linaro.org> wrote: > On Tue, Aug 30, 2016 at 4:50 AM, Baolin Wang <baolin.w...@linaro.org> wrote: >> Hi, >> >> On 22 August 2016 at 12:23, Baolin Wang <baolin.w...@linaro.org> wrote: >>> For system

Re: [PATCH v3] time: alarmtimer: Add the trcepoints for alarmtimer

2016-08-30 Thread Baolin Wang
Hi, On 22 August 2016 at 12:23, Baolin Wang <baolin.w...@linaro.org> wrote: > For system debugging, we usually want to know who sets one alarm timer, the > time of the timer, when the timer started and fired and so on. Thus adding > tracepoints can help us trace the alarmti

Re: [PATCH 1/4] usb: host: xhci: Move the xhci quirks checking to the right place

2016-08-30 Thread Baolin Wang
Hi Mathias, On 18 August 2016 at 15:17, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> It will reset the xhci quirks in xhci_gen_setup() function when xhci try to >> add one hcd, thus we need to move the X

[PATCH v3] mmc: core: Optimize the mmc erase size alignment

2016-08-31 Thread Baolin Wang
erase command is MMC_ERASE_ARG. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- Changes since v2: - Add nr checking and other optimization in mmc_erase() function. Changes since v1: - Add the alignment if card->erase_size is not power of 2. --- drivers/mmc/core/core

Re: [PATCH] usb: dwc3: gadget: Add disconnect checking when changing function dynamically

2016-09-08 Thread Baolin Wang
Hi Felipe, On 8 September 2016 at 20:00, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> When we change the USB function with configfs dynamically, we possibly met >> this >> situation: one core i

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

2016-09-09 Thread Baolin Wang
On 9 September 2016 at 07:13, NeilBrown <ne...@suse.com> wrote: > On Thu, Sep 08 2016, Baolin Wang wrote: > >> On 8 September 2016 at 15:31, NeilBrown <ne...@suse.com> wrote: >>> On Thu, Sep 08 2016, Baolin Wang wrote: >>>> >>>> Now the usb

[PATCH v2 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-09 Thread Baolin Wang
the DEVCTRLHLT flag. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/core.c |1 + drivers/usb/dwc3/core.h |2 ++ drivers/usb/dwc3/ep0.c|2 ++ drivers/usb/dwc3/gadget.c | 21 + 4 files changed, 26 insertions(+) diff --git a/drivers/us

[PATCH v2 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically

2016-09-09 Thread Baolin Wang
When system has stpped the gadget, we should avoid queuing any requests which will cause tranfer failed. Thus adding some disconnect checking to avoid this situation. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- Changes since v1: - Split into 2 separate ptaches. - Choose co

Re: [PATCH v3 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-29 Thread Baolin Wang
Hi Felipe, On 19 September 2016 at 19:52, Baolin Wang <baolin.w...@linaro.org> wrote: > When we change the USB function with configfs dynamically, we possibly met > this > situation: one core is doing the control transfer, another core is trying to > unregister the USB gadget

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

2016-10-05 Thread Baolin Wang
Hi Felipe, >> But you do! >> The mA number from the USB configuration is passed to usb_gadget_vbus_draw. >> Your patch passes that to usb_charger_set_cur_limit_by_type() >> which calls __usb_charger_set_cur_limit_by_type() which will set the >> cur_limit for whichever type uchger->type currently

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

2016-10-05 Thread Baolin Wang
Hi Felipe, On 5 October 2016 at 15:47, Felipe Balbi <ba...@kernel.org> wrote: > > Hi Baolin, > > Baolin Wang <baolin.w...@linaro.org> writes: >>>> But you do! >>>> The mA number from the USB configuration is passed

[RESEND PATCH v3 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-10-04 Thread Baolin Wang
the DEVCTRLHLT flag. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/core.h |2 ++ drivers/usb/dwc3/ep0.c|2 ++ drivers/usb/dwc3/gadget.c | 23 +++ 3 files changed, 27 insertions(+) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/

[RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically

2016-10-04 Thread Baolin Wang
When system has stpped the gadget, we should avoid queuing any requests which will cause tranfer failed. Thus adding some disconnect checking to avoid this situation. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- Changes since v2: - Move disconnect checking into dwc3_send_gadget_

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

2016-10-07 Thread Baolin Wang
Hi Neil, On 5 October 2016 at 18:44, NeilBrown <ne...@suse.com> wrote: > On Wed, Oct 05 2016, Felipe Balbi wrote: > >> Hi Baolin, >> >> Baolin Wang <baolin.w...@linaro.org> writes: >>>>> But you do! >>>>> The mA number f

Re: [PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-21 Thread Baolin Wang
On 21 September 2016 at 15:26, Thomas Gleixner <t...@linutronix.de> wrote: > On Wed, 21 Sep 2016, Baolin Wang wrote: >> On 21 September 2016 at 06:27, Thomas Gleixner <t...@linutronix.de> wrote: >> >> + TP_fast_assign( >> >> +

Re: [PATCH v2 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-19 Thread Baolin Wang
Hi Felipe, On 19 September 2016 at 17:58, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >>>> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c >>>> index 1a33308..c9026ce 100644

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

2016-09-18 Thread Baolin Wang
Hi Neil, Sorry for late reply due yo my holiday. On 10 September 2016 at 05:19, NeilBrown <ne...@suse.com> wrote: > On Fri, Sep 09 2016, Baolin Wang wrote: > >>> >>> In practice, the USB PHY and the Power manager will often be in the same >>> IC (the

[PATCH 1/2] rtc: Add some dummy static inline functions

2016-09-18 Thread Baolin Wang
CONFIG_RTC_LIB is not defined. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- include/linux/rtc.h | 49 - 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/include/linux/rtc.h b/include/linux/rtc.h index b693ada..521f752

[PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-18 Thread Baolin Wang
:123415500 time: 1970-1-1 0:20:35 system_server-3000 [002] ...1 1087.737565: alarmtimer_suspend: alarmtimer type:ALARM_BOOTTIME expires time: 2012-1-1 0:34:0 .. >From the trace log, we can find out the 'Binder:2976_7' process set one alarm timer which resumes the system. Signed-off-by: Bao

Re: [PATCH v2 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically

2016-09-17 Thread Baolin Wang
Hi Felipe, Sorry for late reply due to my holiday. On 9 September 2016 at 18:47, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> When system has stpped the gadget, we should avoid queuing any requests >> w

Re: [PATCH v2 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-17 Thread Baolin Wang
Hi Felipe, On 9 September 2016 at 19:03, Felipe Balbi <ba...@kernel.org> wrote: > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c >> index 057739d..22787b6 100644 >> --- a/drivers

[PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically

2016-09-19 Thread Baolin Wang
When system has stpped the gadget, we should avoid queuing any requests which will cause tranfer failed. Thus adding some disconnect checking to avoid this situation. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- Changes since v2: - Move disconnect checking into dwc3_send_gadget_

[PATCH v3 2/2] usb: dwc3: Wait for control tranfer completed when stopping gadget

2016-09-19 Thread Baolin Wang
the DEVCTRLHLT flag. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/dwc3/core.h |2 ++ drivers/usb/dwc3/ep0.c|2 ++ drivers/usb/dwc3/gadget.c | 23 +++ 3 files changed, 27 insertions(+) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/

Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Baolin Wang
Hi, On 22 September 2016 at 20:53, Felipe Balbi <ba...@kernel.org> wrote: > > > Hi, > > Baolin Wang <baolin.w...@linaro.org> writes: >>>> static const struct usb_gadget_driver configfs_driver_template = { >>>> .bind

[PATCH] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Baolin Wang
nected, configured. The original code was created by Badhri Jagan Sridharan, and I did some optimization. CC: Badhri Jagan Sridharan <bad...@google.com> Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- drivers/usb/gadget/Kconfig|8 +++ drivers/usb/gadget

Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Baolin Wang
On 22 September 2016 at 20:23, Greg KH <gre...@linuxfoundation.org> wrote: > On Thu, Sep 22, 2016 at 07:43:59PM +0800, Baolin Wang wrote: >> From: Badhri Jagan Sridharan <bad...@google.com> >> >> Some USB managament on userspace (like Android system)

Re: [PATCH] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Baolin Wang
On 22 September 2016 at 18:58, Mark Brown <broo...@kernel.org> wrote: > On Thu, Sep 22, 2016 at 06:53:12PM +0800, Baolin Wang wrote: >> From: Badhri Jagan Sridharan <bad...@google.com> >> >> Some USB managament on userspace (like Android system) rely on the uevent

[PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Baolin Wang
nected, configured. The original code was created by Badhri Jagan Sridharan, and I did some optimization. Signed-off-by: Badhri Jagan Sridharan <bad...@google.com> Signed-off-by: Baolin Wang <baolin.w...@linaro.org> --- Changes since v1: - Add Badhri's Signed-off-by. --- drivers/

Re: [PATCH 1/2] rtc: Add some dummy static inline functions

2016-09-20 Thread Baolin Wang
Hi, On 21 September 2016 at 05:36, Thomas Gleixner <t...@linutronix.de> wrote: > On Sun, 18 Sep 2016, Baolin Wang wrote: > >> The patch 2 in this patchset adding tracepoints for alarmtimers will build >> failed on S390 platform, due to S390 defconfig did not define

Re: [PATCH 2/2] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-20 Thread Baolin Wang
On 21 September 2016 at 06:27, Thomas Gleixner <t...@linutronix.de> wrote: > On Sun, 18 Sep 2016, Baolin Wang wrote: >> +DECLARE_EVENT_CLASS(alarm_setting, > > What is alarm_setting? Without looking at the DEFINE_EVENT which uses this > I cannot decode t

Re: [PATCH v4] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-07 Thread Baolin Wang
Hi John, On 7 September 2016 at 14:17, John Stultz <john.stu...@linaro.org> wrote: > On Tue, Sep 6, 2016 at 11:06 PM, Baolin Wang <baolin.w...@linaro.org> wrote: >> For system debugging, we sometimes want to know who sets one >> alarm timer, the time of the ti

[PATCH v4] time: alarmtimer: Add the trcepoints for alarmtimer

2016-09-07 Thread Baolin Wang
:123415500 time: 1970-1-1 0:20:35 system_server-3000 [002] ...1 1087.737565: alarmtimer_suspend: alarmtimer type:ALARM_BOOTTIME expires time: 2012-1-1 0:34:0 .. >From the trace log, we can find out the 'Binder:2976_7' process set one alarm timer which resumes the system. Signed-off-by: Bao

[PATCH] rtc: Add some dummy static inline functions

2016-09-07 Thread Baolin Wang
Add some dummy static inline functions in case CONFIG_RTC_LIB is not defined. Signed-off-by: Baolin Wang <baolin.w...@linaro.org> Fixes: a0a6e06d545a ("time: alarmtimer: Add tracepoints for alarmtimers") --- include/linux/rtc.h | 49 +

<    1   2   3   4   5   6   7   8   9   10   >