tree: https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
pwrseq-lib
head: 72289855b3d236efef879059b315940de9e80df2
commit: bda499ece3edc6187490ad32238bcc65075d80d5 [4/7] usb: core: add power
sequence handling for USB devices
coccinelle warnings: (new ones prefixed by >>)
>>
drivers/usb/core/pwrseq.c:52:23-29: ERROR: application of sizeof to pointer
sizeof when applied to a pointer typed expression gives the size of
the pointer
Generated by: scripts/coccinelle/misc/noderef.cocci
Signed-off-by: Fengguang Wu
---
pwrseq.c |2 +-
1 file changed, 1 insertion(+),
drivers/power/pwrseq/pwrseq_generic.c:121:22-28: ERROR: application of sizeof
to pointer
sizeof when applied to a pointer typed expression gives the size of
the pointer
Generated by: scripts/coccinelle/misc/noderef.cocci
Signed-off-by: Fengguang Wu
---
pwrseq_generic.c |2 +-
1 file ch
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
pwrseq-lib
head: 72289855b3d236efef879059b315940de9e80df2
commit: 36fe54395583ac3cd6f704a8b3b1dd8c18b8ac04 [2/7] power: add power
sequence library
coccinelle warnings: (new ones prefixed by >>)
>> drivers/power/pwrseq
On Thu, Jul 07, 2016 at 04:53:07PM -0700, Joshua Clayton wrote:
>
>
> On 07/07/2016 02:47 AM, Philipp Zabel wrote:
> > Am Donnerstag, den 07.07.2016, 17:14 +0800 schrieb Peter Chen:
> >> Add binding doc for generic power sequence library.
> >>
> >> Signed-off-by: Peter Chen
> >> ---
> >> .../bi
On Thu, Jul 07, 2016 at 11:47:14AM +0200, Philipp Zabel wrote:
> Am Donnerstag, den 07.07.2016, 17:14 +0800 schrieb Peter Chen:
> > Add binding doc for generic power sequence library.
> >
> > Signed-off-by: Peter Chen
> > ---
> > .../bindings/power/pwrseq/pwrseq-generic.txt | 56
> > +
On 7 July 2016 at 20:51, Michal Nazarewicz 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 ep's
>> maxpacketsize.
>>
>> Thus we add usb_ep_alig
On Thu, Jul 07, 2016 at 03:56:51PM -0700, Stephen Boyd wrote:
> Quoting Peter Chen (2016-07-07 02:14:51)
> > diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
> > index 053bac9..55120ef 100644
> > --- a/drivers/usb/chipidea/host.c
> > +++ b/drivers/usb/chipidea/host.c
> > @@ -1
Hi,
On 07/07/2016 05:53 AM, Joseph Salisbury wrote:
> BugLink: http://bugs.launchpad.net/bugs/1498667
>
> As reported in BugLink, this device has an issue with Linux Power Management
> so
s/"Linux Power Management"/"USB Link Power Management"
Best regards,
Lu Baolu
> adding a quirk. This qui
On 07/07/2016 02:47 AM, Philipp Zabel wrote:
> Am Donnerstag, den 07.07.2016, 17:14 +0800 schrieb Peter Chen:
>> Add binding doc for generic power sequence library.
>>
>> Signed-off-by: Peter Chen
>> ---
>> .../bindings/power/pwrseq/pwrseq-generic.txt | 56
>> ++
>> 1
Quoting Peter Chen (2016-07-07 02:14:51)
> diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
> index 053bac9..55120ef 100644
> --- a/drivers/usb/chipidea/host.c
> +++ b/drivers/usb/chipidea/host.c
> @@ -109,15 +109,25 @@ static int host_start(struct ci_hdrc *ci)
> struc
In the case of ULPI devices, we want to be able to load the
driver before registering the device so that we don't get stuck
in a loop waiting for the phy module to appear and failing usb
controller probe. Currently we request the ulpi module via the
ulpi ids, but in the DT case we might need to req
We don't call hw_device_reset() with the ci->lock held, so it
doesn't seem like this lock here is protecting anything. Let's
just remove it. This allows us to call sleeping functions like
phy_init() from within the CI_HDRC_CONTROLLER_RESET_EVENT hook.
Cc: Peter Chen
Cc: Greg Kroah-Hartman
Signed
The HSIC USB controller on qcom SoCs has an integrated all
digital phy controlled via the ULPI viewport.
Cc: Kishon Vijay Abraham I
Cc:
Signed-off-by: Stephen Boyd
---
.../devicetree/bindings/phy/qcom,usb-hsic-phy.txt | 72 +
drivers/phy/Kconfig| 7 +
We're currently emulating the vbus and id interrupts in the OTGSC
read API, but we also need to make sure that if we're handling
the events with extcon that we don't enable the interrupts for
those events in the hardware. Therefore, properly emulate this
register if we're using extcon, but don't en
Force the OTG state machine to go forward when we're using an
extcon for vbus detection. In this case, the controller may never
raise an interrupt for AVVIS, so we need to simulate the event by
toggling the appropriate OTG fsm bits and kicking the state
machine again.
Cc: Peter Chen
Cc: Greg Kroa
The chipidea/udc.c file sends a CI_HDRC_CONTROLLER_RESET_EVENT to
the wrapper drivers when it calls hw_device_reset(), but that
function is not called from chipidea/host.c. And the udc.c file
sends the CI_HDRC_CONTROLLER_STOPPED_EVENT but the host.c file
doesn't do anything.
The intent of the rese
With the id and vbus detection done via extcon we need to make
sure we poll the status of OTGSC properly by considering what the
extcon is saying, and not just what the register is saying. Let's
move this hw_wait_reg() function to the only place it's used and
simplify it for polling the OTGSC regis
The MSM chipidea wrapper has two bits that are used to reset the
first or second phy. Add support for these bits via the reset
controller framework, so that phy drivers can reset their
hardware at the right time during initialization.
Cc: Peter Chen
Cc: Greg Kroah-Hartman
Signed-off-by: Stephen
The ULPI phy on qcom platforms needs to be initialized and
powered on after a USB reset and before we toggle the run/stop
bit. Otherwise, the phy locks up and doesn't work properly.
Therefore, add a flag to skip any phy power management in the
core layer, leaving it up to the glue driver to manage.
The core framework already handles setting this parameter with a
platform quirk. Add the appropriate flag so that we always set
AHBBURST to 0. Technically DT should be doing this, but we always
do it for msm chipidea devices so setting the flag in the driver
works just as well.
Cc: Peter Chen
Cc:
The msm chipidea controller uses two main clks, an AHB clk to
read/write the MMIO registers and a core clk called the system
clk that drives the controller itself. Add support for these clks
as they're required in all designs.
Also add support for an optional third clk that we need to turn
on to r
If something fails in ci_hdrc_add_device() due to probe defer, we
shouldn't print an error message. Be silent in this case as we'll
try probe again later.
Cc: Peter Chen
Cc: Greg Kroah-Hartman
Signed-off-by: Stephen Boyd
---
drivers/usb/chipidea/ci_hdrc_msm.c | 3 ++-
1 file changed, 2 inserti
The high-speed phy on qcom SoCs is controlled via the ULPI
viewport.
Cc: Kishon Vijay Abraham I
Cc:
Signed-off-by: Stephen Boyd
---
.../devicetree/bindings/phy/qcom,usb-hs-phy.txt| 83 ++
drivers/phy/Kconfig| 8 +
drivers/phy/Makefile
The MSM_USB_BASE macro trick is not very clear, and we're using
it for only one register write so let's just move to using
hw_write_id_reg() and passing the ci pointer instead. That
clearly shows what offset we're using and avoids needing to
include the msm_hsusb_hw.h file when we're going to delet
If two devices are probed with this same driver, they'll share
the same platform data structure, while the chipidea core layer
writes and modifies it. This can lead to interesting results
especially if one device is an OTG type chipidea controller and
another is a host. Let's create a copy of this
The ULPI phy on qcom platforms needs to be initialized and
powered on after a USB reset and before we toggle the run/stop
bit. Otherwise, the phy locks up and doesn't work properly. Hook
the phy initialization into the RESET event and the phy power off
into the STOPPED event.
Cc: Peter Chen
Cc: G
We need to pick the correct phy at runtime based on how the SoC
has been wired onto the board. If the secondary phy is used, take
it out of reset and mux over to it by writing into the TCSR
register. Make sure to do this on reset too, because this
register is reset to the default value (primary phy
When the RESET bit is set in the USBCMD register it resets quite
a few of the wrapper's registers to their reset state. This
includes the GENCONFIG and GENCONFIG2 registers. Currently this
is done by the usb phy and ehci-msm drivers writing into the
controller wrapper's MMIO address space. Let's co
We're not properly marking the glue layer/wrapper device as
runtime active, so runtime PM believes that the hardware state is
inactive when we call pm_runtime_enable() in this driver. This
causes a problem when the glue layer has a power domain
associated with it, because runtime PM will go and dis
The qcom HSIC ULPI phy doesn't have any bits set in the vendor or
product ID registers. This makes it impossible to make a ULPI
driver match against the ID registers. Add support to discover
the ULPI phys via DT/device properties to help alleviate this
problem. In the DT case, we'll look for a ULPI
The ULPI bus can be built as a module, and it will soon be
calling these functions when it supports probing devices from DT.
Export them so they can be used by the ULPI module.
Signed-off-by: Stephen Boyd
---
drivers/of/device.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/of/de
Some phys for the chipidea controller are controlled via the ULPI
viewport. Add support for the ULPI bus so that these sorts of
phys can be probed and read/written automatically without having
to duplicate the viewport logic in each phy driver.
Cc: Peter Chen
Cc: Greg Kroah-Hartman
Cc: Heikki Kr
The state of USB ChipIdea support on Qualcomm's platforms is not great.
The DT description of these devices requires up to three different nodes
for what amounts to be the same hardware block, when there should really
only be one. Furthermore, the "phy" driver that is in mainline (phy-msm-usb.c)
du
Dnia Czwartek, 7 Lipca 2016 01:08 Greg KH
napisaĆ(a)
> On Wed, Jul 06, 2016 at 08:00:55PM +0200, Ziutek Putek wrote:
> > [1.] Booting from Sandisk USB stick fails and stops on Dell Latitude E5420
> > Laptop.
> >
> > [2.] On mainline kernel I get error:
> > [ 18.414128] usb 2-1.4: device descri
When reading synchronously from a non-zero endpoint, gadgetfs will
return -EFAULT even if the read succeeds, due to a bad check of the
copy_to_iter() return value.
This fix compares the return value of copy_to_iter to the amount of
bytes that was passed, and only fails if they are not the same.
S
Felipe Balbi writes:
> Hi,
>
> Robert Jarzmik writes:
>> I don't know if there are other users than pxa, I'll make the assumption
>> there
>> aren't.
>
> yeah, we can keep patches in linux-next for as long as possible. If
> nobody complains, we're good.
Hi Felipe,
Just a small update. I made
On Thu, 7 Jul 2016, Cristian wrote:
> Hello,
>
> Open bug in bugzilla.kernel.org :
> https://bugzilla.kernel.org/show_bug.cgi?id=121571
>
> [ 1365.501054] usb usb1-port1: connect-debounce failed
That's not a bug; it's a hardware problem. Were you unplugging the
mouse when the error message oc
Hello,
Open bug in bugzilla.kernel.org :
https://bugzilla.kernel.org/show_bug.cgi?id=121571
[ 1365.501054] usb usb1-port1: connect-debounce failed
Thanks,
--
Cristian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
Mo
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 ep's
> maxpacketsize.
>
> Thus we add usb_ep_align_maybe() function to check if it is need to align
> the r
Add new module parameter called "udc" to all legacy gadgets.
By using this parameter user can choose a controller towhich
this gadget should be bound.
This may be useful esp. when having multiple controllers
or multiple gadget builtin.
When value for this param is not provided then old behaviour
Currently it is possible to build in some subset of usb functions
*OR* some gadget module. This is limited only by Kconfig not
any functionality.
This patch removes this limitation. With this patch it is possible
to set up all build combinations:
1) Multiple gadgets build in
2) Part of functions b
Hi all,
This is a follow-up for my last power sequence framework patch set [1].
According to Rob Herring and Ulf Hansson's comments[2], I use a generic
power sequence library for parsing the power sequence elements on DT,
and implement generic power sequence on library. The host driver
can allocat
Add optional properties for power sequence.
Signed-off-by: Peter Chen
---
Documentation/devicetree/bindings/usb/usb-device.txt | 10 ++
1 file changed, 10 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/usb-device.txt
b/Documentation/devicetree/bindings/usb/usb-device.
Some hard-wired USB devices need to do power sequence to let the
device work normally, the typical power sequence like: enable USB
PHY clock, toggle reset pin, etc. But current Linux USB driver
lacks of such code to do it, it may cause some hard-wired USB devices
works abnormal or can't be recogniz
We have an well-known problem that the device needs to do some power
sequence before it can be recognized by related host, the typical
example like hard-wired mmc devices and usb devices.
This power sequence is hard to be described at device tree and handled by
related host driver, so we have crea
From: Peter Chen
The current dts describes USB HUB's property at USB controller's
entry, it is improper. The USB HUB should be the child node
under USB controller, and power sequence properties are under
it.
Signed-off-by: Peter Chen
Signed-off-by: Maciej S. Szmigiero
---
arch/arm/boot/dts/im
Am Donnerstag, den 07.07.2016, 17:14 +0800 schrieb Peter Chen:
> Add binding doc for generic power sequence library.
>
> Signed-off-by: Peter Chen
> ---
> .../bindings/power/pwrseq/pwrseq-generic.txt | 56
> ++
> 1 file changed, 56 insertions(+)
> create mode 100644
On Wed, Jun 15, 2016 at 11:25:43AM +0800, Peter Chen wrote:
> The helper usb_of_get_child_node is defined at of.c, but missing its
> declare as a global function. Fix it by adding related header file
> as well as compile it on conditional of CONFIG_OF.
>
> Cc: Greg Kroah-Hartman
> Cc: Arnd Bergma
Add binding doc for generic power sequence library.
Signed-off-by: Peter Chen
---
.../bindings/power/pwrseq/pwrseq-generic.txt | 56 ++
1 file changed, 56 insertions(+)
create mode 100644
Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt
diff --git a/
From: Peter Chen
Since the hcd (chipidea core device) has no device node, so
if we want to describe the child node under the hcd, we had
to put it under its parent's node (glue layer device), and
in the code, we need to let the hcd knows glue layer's code,
then the USB core can handle this node.
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 ep's
maxpacketsize.
Thus we add usb_ep_align_maybe() function to check if it is need to align
the request buffer's size to an ep's maxpacketsize.
Sig
This patch adds a flag "no_skb_reserve" in struct eth_dev.
So, if a peripheral driver sets the quirk_avoids_skb_reserve flag,
upper network gadget drivers (e.g. f_ncm.c) can avoid skb_reserve()
calling using the flag as well.
Signed-off-by: Yoshihiro Shimoda
---
drivers/usb/gadget/function/u_eth
Some platforms (e.g. R-Car SoCs) has memory alignment restriction.
If memory alignment is not match, the usb peripheral driver desides
not to DMA controller. Then, the performance is not good.
In the case of u_ether.c, since it calls skb_reserve() in rx_submit(),
it is possible to cause memory ali
This patch set is based on the latest Felipe's usb.git / testing/next branch.
(commit id = 15e4292a2d21e9997fdb2b8c014cc461b3f268f0)
This patch set also needs an additional patch (like the end of this email)
to fix the renesas_usbhs driver for R-Car Gen3.
(I will submit this patch after v4.8-rc1 w
This patch adds to support no_skb_reserve function to improve
performance for some platforms. About the detail, please refer to
the commit log of "quirk_avoids_skb_reserve" in
include/linux/usb/gadget.h.
Signed-off-by: Yoshihiro Shimoda
---
drivers/usb/gadget/function/f_ncm.c | 2 ++
1 file chan
This patch sets the quirk_avoids_skb_reserve flag to improve performance
of a network gadget driver (e.g. f_ncm.c) if USB-DMAC is used.
For example (on r8a7795 board + f_ncm.c + iperf udp mode / receiving):
- without this patch: 90.3 Mbits/sec
- withthis patch: 273 Mbits/sec
Signed-off
Remove the unnacessary code.
Hayes Wang (3):
r8152: remove rtl_phy_reset function
r8152: remove a netif_carrier_off in rtl8152_open function
r8152: remove cancel_delayed_work_sync in rtl8152_set_speed
drivers/net/usb/r8152.c | 27 ---
1 file changed, 27 deletions(-)
In rtl_hw_phy_work_func_t(), the flag of PHY_RESET is set in
rtl_ops.hw_phy_cfg() and cleared in rtl8152_set_speed(). Therefore,
the rtl_phy_reset() is never run and is unnecessary.
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 24
1 file changed, 24 deletions(
There is no conflict between the work_queue function and
rtl8152_set_speed(), so we don't have to cancel the delayed work in
rtl8152_set_speed().
Signed-off-by: Hayes Wang
---
drivers/net/usb/r8152.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r81
After commit 90186af404ad ("r8152: fix lockup when runtime PM is enabled"),
the autoresume wouldn't start the device before rtl8152_open() is finished.
Therefore, we don't have to reset the linking status before and after
autoresume. That is, one of netif_carrier_off() in rtl8152_open() could be
re
61 matches
Mail list logo