Re: [PATCH] usb: dwc3: Only call clk_bulk_get() on devicetree instantiated devices

2018-06-12 Thread Masahiro Yamada
dwc3.3.auto: Failed to get clk 'ref': -2 > > This commits wraps the clk_bulk_get() in an if (dev->of_node) check so > that it only is done on devicetree instantiated devices, fixing this > error. > > Cc: Masahiro Yamada The Cc: can be replaced with my Reviewed-by: Masahiro Yamada Thanks.

Re: "usb: dwc3: support clocks and resets for DWC3 core" is causing errors on x86

2018-06-12 Thread Masahiro Yamada
Hi Hans, 2018-06-12 16:56 GMT+09:00 Hans de Goede : > Hi, > > On 12-06-18 08:27, Masahiro Yamada wrote: >> >> Hi Hans, >> >> 2018-06-08 5:57 GMT+09:00 Hans de Goede : >>> >>> Hi All, >>> >>> While testing usb-next on some Int

Re: "usb: dwc3: support clocks and resets for DWC3 core" is causing errors on x86

2018-06-12 Thread Masahiro Yamada
ings still work because the new clk code accepts > clk_bulk_get() failing and then effectively disables > itself. > > Maybe we should wrap the clk_bulk_get() in an > if (device->of_node) conditional to stop this error > from getting logged on non DT platforms? > Or, maybe drop the

[PATCH v3 1/2] usb: dwc3: use local copy of resource to fix-up register offset

2018-05-15 Thread Masahiro Yamada
It is not a good idea to directly modify the resource of a platform device. Modify its local copy, and pass it to devm_ioremap_resource() so that we do not need to restore it in the failure path and the remove hook. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> Re

[PATCH v3 0/2] usb: dwc3: support clocks and resets for DWC3 core

2018-05-15 Thread Masahiro Yamada
P itself needs clock input. This is specific to this IP. So, supporting clocks and resets in dwc3/core.c makes sense. In this version, the number of clocks (and names) is specific to this IP, with clock names taken from Synopsys datasheet. Masahiro Yamada (2): usb: dwc3: use local copy of resourc

[PATCH v3 2/2] usb: dwc3: support clocks and resets for DWC3 core

2018-05-15 Thread Masahiro Yamada
ept no clock. This change is based on the discussion [1]. I inserted reset_control_deassert() and clk_bulk_enable() before the first register access, i.e. dwc3_cache_hwparams(). [1] https://patchwork.kernel.org/patch/10284265/ Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> Revie

Re: [PATCH v2 2/2] usb: dwc3: support clocks and resets for DWC3 core

2018-05-10 Thread Masahiro Yamada
Hi Martin, 2018-04-28 23:20 GMT+09:00 Martin Blumenstingl <martin.blumensti...@googlemail.com>: > (adding Yixun from Amlogic to this mail) > > On Sat, Apr 28, 2018 at 4:41 AM, Masahiro Yamada > <yamada.masah...@socionext.com> wrote: >> Hi Martin, >> &g

Re: [PATCH v2 1/2] usb: dwc3: use local copy of resource to fix-up register offset

2018-05-01 Thread Masahiro Yamada
Hi Felipe, 2018-04-19 20:03 GMT+09:00 Masahiro Yamada <yamada.masah...@socionext.com>: > It is not a good idea to directly modify the resource of a platform > device. Modify its local copy, and pass it to devm_ioremap_resource() > so that we do not need to restore it in t

Re: [PATCH v2 2/2] usb: dwc3: support clocks and resets for DWC3 core

2018-04-27 Thread Masahiro Yamada
Hi Martin, 2018-04-24 2:44 GMT+09:00 Martin Blumenstingl <martin.blumensti...@googlemail.com>: > Hello, > > On Thu, Apr 19, 2018 at 1:03 PM, Masahiro Yamada > <yamada.masah...@socionext.com> wrote: >> Historically, the clocks and resets are handled on the glue lay

Re: [PATCH v2 2/2] usb: dwc3: support clocks and resets for DWC3 core

2018-04-27 Thread Masahiro Yamada
/w control, we would be able to input something. I am not sure if this is the right thing, though. > Otherise, for the DT binding: > > Reviewed-by: Rob Herring <r...@kernel.org> > -- Best Regards Masahiro Yamada -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 0/2] usb: dwc3: support clocks and resets for DWC3 core

2018-04-23 Thread Masahiro Yamada
2018-04-24 9:11 GMT+09:00 Manu Gautam <mgau...@codeaurora.org>: > HI, > > > On 4/19/2018 4:03 AM, Masahiro Yamada wrote: >> In the current design of DWC3 driver, >> the DT typically becomes a nested structure like follows: >> >> dwc3-

Re: [PATCH v2 2/2] usb: dwc3: support clocks and resets for DWC3 core

2018-04-23 Thread Masahiro Yamada
2018-04-24 2:44 GMT+09:00 Martin Blumenstingl <martin.blumensti...@googlemail.com>: > Hello, > > On Thu, Apr 19, 2018 at 1:03 PM, Masahiro Yamada > <yamada.masah...@socionext.com> wrote: >> Historically, the clocks and resets are handled on the glue layer &g

[PATCH v2 2/2] usb: dwc3: support clocks and resets for DWC3 core

2018-04-19 Thread Masahiro Yamada
er code is loosened up to accept no clock/reset. This change is based on the discussion [1]. I inserted reset_control_deassert() and clk_bulk_enable() before the first register access, i.e. dwc3_cache_hwparams(). [1] https://patchwork.kernel.org/patch/10284265/ Signed-off-by: Masahiro Yamada <ya

[PATCH v2 0/2] usb: dwc3: support clocks and resets for DWC3 core

2018-04-19 Thread Masahiro Yamada
P itself needs clock input. This is specific to this IP. So, supporting clocks and resets in dwc3/core.c makes sense. In this version, the number of clocks (and names) is specific to this IP, with clock names taken from Synopsys datasheet. Masahiro Yamada (2): usb: dwc3: use local copy of resourc

[PATCH v2 1/2] usb: dwc3: use local copy of resource to fix-up register offset

2018-04-19 Thread Masahiro Yamada
It is not a good idea to directly modify the resource of a platform device. Modify its local copy, and pass it to devm_ioremap_resource() so that we do not need to restore it in the failure path and the remove hook. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> Re

Re: [usb-next PATCH v11 3/8] usb: core: add a wrapper for the USB PHYs on the HCD

2018-04-06 Thread Masahiro Yamada
Oh, great! Thank you. >> Sure, I can send a patch after some flaws are ironed-out. > great, thank you! > could you also let me know once you have tested this on one of your SoCs? I will. -- Best Regards Masahiro Yamada -- To unsubscribe from this list: send the line "unsubs

Re: [usb-next PATCH v11 3/8] usb: core: add a wrapper for the USB PHYs on the HCD

2018-04-05 Thread Masahiro Yamada
2018-04-06 5:04 GMT+09:00 Martin Blumenstingl <martin.blumensti...@googlemail.com>: > Hello, > > (great to hear that this might be useful on Socionext SoCs as well :)) > > On Wed, Apr 4, 2018 at 2:10 PM, Masahiro Yamada > <yamada.masah...@socionext.com> wrote: >&

Re: [usb-next PATCH v11 3/8] usb: core: add a wrapper for the USB PHYs on the HCD

2018-04-04 Thread Masahiro Yamada
;list is used. I just wondered if we can directly put 'struct list_head' into 'struct usb_hcd'. > diff --git a/drivers/usb/core/phy.h b/drivers/usb/core/phy.h > new file mode 100644 > index ..6fde59bfbff8 > --- /dev/null > +++ b/drivers/usb/core/phy.h > @@ -0,0 +

Re: Multiple generic PHY instances for DWC3 USB IP

2018-04-04 Thread Masahiro Yamada
Hi Arnd, 2018-04-04 17:43 GMT+09:00 Arnd Bergmann <a...@arndb.de>: > On Wed, Apr 4, 2018 at 10:00 AM, Felipe Balbi > <felipe.ba...@linux.intel.com> wrote: >> >> Hi, >> >> Masahiro Yamada <yamada.masah...@socionext.com> writes: >>>>&

Re: Multiple generic PHY instances for DWC3 USB IP

2018-04-04 Thread Masahiro Yamada
2018-04-04 15:04 GMT+09:00 Felipe Balbi <felipe.ba...@linux.intel.com>: > > Hi, > > Masahiro Yamada <yamada.masah...@socionext.com> writes: >> 2018-04-04 14:36 GMT+09:00 Felipe Balbi <felipe.ba...@linux.intel.com>: >>> >>> Hi, >>

Re: Multiple generic PHY instances for DWC3 USB IP

2018-04-03 Thread Masahiro Yamada
2018-04-04 14:36 GMT+09:00 Felipe Balbi <felipe.ba...@linux.intel.com>: > > Hi, > > Masahiro Yamada <yamada.masah...@socionext.com> writes: >> Currently, DWC3 core IP (drivers/usb/dwc3/core.c) >> can take only one PHY phandle for each of SS, HS. >> (phy

Re: [PATCH] usb: dwc3: of-simple: use managed and shared reset control

2018-04-03 Thread Masahiro Yamada
2018-04-03 19:35 GMT+09:00 Vivek Gautam <vivek.gau...@codeaurora.org>: > > > On 4/3/2018 3:49 PM, Masahiro Yamada wrote: >> >> 2018-04-03 17:46 GMT+09:00 Philipp Zabel <p.za...@pengutronix.de>: >>> >>> On Tue, 2018-04-03 at 17:30 +0900, Masahiro

Multiple generic PHY instances for DWC3 USB IP

2018-04-03 Thread Masahiro Yamada
#phy-cells = <0>; clocks = <_clk 21>; resets = <_rst 21>; port0-supply = <_vbus0>; }; To achieve this, I need driver changes. My proposal is to support arbitrary number of PHY instances like ehci-platform.c does. @@ -894,8 +894,8 @@ struct dwc3 { struct usb_phy *usb2_phy; struct usb_phy *usb3_phy; - struct phy *usb2_generic_phy; - struct phy *usb3_generic_phy; + unsigned intnum_phys; + struct phy **phys; boolphys_ready; Is this OK? -- Best Regards Masahiro Yamada -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [Question] MFD driver that handles clocks/resets and populates child nodes

2018-04-03 Thread Masahiro Yamada
2018-04-03 17:03 GMT+09:00 Lee Jones <lee.jo...@linaro.org>: > On Mon, 02 Apr 2018, Andrew Lunn wrote: > >> On Mon, Apr 02, 2018 at 10:21:01PM +0900, Masahiro Yamada wrote: >> > 2018-04-02 21:04 GMT+09:00 Andrew Lunn <and...@lunn.ch>: >> > >>

Re: [PATCH] usb: dwc3: of-simple: use managed and shared reset control

2018-04-03 Thread Masahiro Yamada
2018-04-03 17:46 GMT+09:00 Philipp Zabel <p.za...@pengutronix.de>: > On Tue, 2018-04-03 at 17:30 +0900, Masahiro Yamada wrote: >> 2018-04-03 17:00 GMT+09:00 Philipp Zabel <p.za...@pengutronix.de>: >> > On Thu, 2018-03-29 at 15:07 +0900, Masahiro Yamada wrote: >&g

Re: [PATCH] usb: dwc3: of-simple: use managed and shared reset control

2018-04-03 Thread Masahiro Yamada
2018-04-03 17:00 GMT+09:00 Philipp Zabel <p.za...@pengutronix.de>: > On Thu, 2018-03-29 at 15:07 +0900, Masahiro Yamada wrote: >> This driver handles the reset control in a common manner; deassert >> resets before use, assert them after use. There is no good reason >>

Re: [Question] MFD driver that handles clocks/resets and populates child nodes

2018-04-02 Thread Masahiro Yamada
ce Tree, honestly I do not like it much. > > Andrew > > -- > To unsubscribe from this list: send the line "unsubscribe devicetree" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -

[Question] MFD driver that handles clocks/resets and populates child nodes

2018-04-02 Thread Masahiro Yamada
... }; } Which is better? Or any other good idea? Thanks. -- Best Regards Masahiro Yamada -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] usb: dwc3: of-simple: use managed and shared reset control

2018-03-29 Thread Masahiro Yamada
This driver handles the reset control in a common manner; deassert resets before use, assert them after use. There is no good reason why it should be exclusive. Also, use devm_ for clean-up. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- CCing Philipp Zabel. I see h

Re: [PATCH 2/2] usb: dwc3: add clock and resets

2018-03-28 Thread Masahiro Yamada
2018-03-19 7:37 GMT+09:00 Masahiro Yamada <yamada.masah...@socionext.com>: > Hi Rob, > > 2018-03-18 21:52 GMT+09:00 Rob Herring <r...@kernel.org>: >> On Thu, Mar 15, 2018 at 08:39:58PM +0900, Masahiro Yamada wrote: >>> dwc3-of-simple.c only handles a

Re: [PATCH 2/2] usb: dwc3: add clock and resets

2018-03-18 Thread Masahiro Yamada
Hi Rob, 2018-03-18 21:52 GMT+09:00 Rob Herring <r...@kernel.org>: > On Thu, Mar 15, 2018 at 08:39:58PM +0900, Masahiro Yamada wrote: >> dwc3-of-simple.c only handles arbitrary number of clocks and resets. >> They are both generic enough to be put into the dwc3 core. For simp

[PATCH 1/2] usb: dwc3: use local copy of resource to fix-up register offset

2018-03-15 Thread Masahiro Yamada
It is not a good idea to modify the resource from the platform device. Modify its local copy to pass it to devm_ioremap_resource() so that we do not need to restore it in the failure path and the remove hook. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- drivers/us

[PATCH 2/2] usb: dwc3: add clock and resets

2018-03-15 Thread Masahiro Yamada
. } I inserted reset_control_deassert() and clk_enable() before the first register access, i.e. dwc3_cache_hwparams(). Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Documentation/devicetree/bindings/usb/dwc3.txt | 2 + drivers/usb/dwc3/core.c| 1

Re: [RFC PATCH] drivers: use 'depends on MFD_SYSCON' instead of 'select MFD_SYSCON'

2018-02-27 Thread Masahiro Yamada
2018-02-27 18:03 GMT+09:00 Arnd Bergmann <a...@arndb.de>: > On Tue, Feb 27, 2018 at 1:46 AM, Masahiro Yamada > <yamada.masah...@socionext.com> wrote: >> 2018-02-26 21:43 GMT+09:00 Arnd Bergmann <a...@arndb.de>: >>> On Mon, Feb 26, 2018 at 12:5

Re: [RFC PATCH] drivers: use 'depends on MFD_SYSCON' instead of 'select MFD_SYSCON'

2018-02-26 Thread Masahiro Yamada
2018-02-26 21:43 GMT+09:00 Arnd Bergmann <a...@arndb.de>: > On Mon, Feb 26, 2018 at 12:53 PM, Masahiro Yamada > <yamada.masah...@socionext.com> wrote: >> 2018-02-26 17:43 GMT+09:00 Arnd Bergmann <a...@arndb.de>: >>> On Sat, Feb 24, 2018 at 3:5

Re: [PATCH 2/4] usb: dwc3: add dwc3 glue layer for UniPhier SoCs

2018-02-26 Thread Masahiro Yamada
}; > }; > > Then you know that you can let dwc3/core.c handle the PHY for you. If we > need to teach dwc3/core.c about regulators, we can do that. But we don't > need SoC-specific hacks ;-) > > -- > balbi Slightly related question. Why don't we put clocks and rese

Re: [RFC PATCH] drivers: use 'depends on MFD_SYSCON' instead of 'select MFD_SYSCON'

2018-02-26 Thread Masahiro Yamada
2018-02-26 17:43 GMT+09:00 Arnd Bergmann <a...@arndb.de>: > On Sat, Feb 24, 2018 at 3:50 PM, Masahiro Yamada > <yamada.masah...@socionext.com> wrote: >> As Documentation/kbuild/kconfig-language.txt notes, 'select' should be >> used with care - it forces a lower lim

[RFC PATCH] drivers: use 'depends on MFD_SYSCON' instead of 'select MFD_SYSCON'

2018-02-24 Thread Masahiro Yamada
iles may rely on someone select's MFD_SYSCON. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- If you have a better idea to fix 'unmet dependencies', please suggest. drivers/ata/Kconfig | 2 +- drivers/clk/Kconfig | 9

[PATCH] usb: dwc3: of-simple: set dev_pm_ops

2017-12-06 Thread Masahiro Yamada
dwc3_of_simple_dev_pm_ops has never been used since the initial support by commit 16adc674d0d6 ("usb: dwc3: add generic OF glue layer"). I guess it just missed to set .pm struct member. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- drivers/usb/dwc3/dwc3

[PATCH v2 1/2] usb: ehci-platform: use reset array API

2017-11-01 Thread Masahiro Yamada
Generic drivers like this need to control arbitrary number of reset lines. Instead of hard-coding the maximum number of resets, use the reset array API. It can manage a bunch of resets behind the scene. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2:

[PATCH v2 2/2] usb: ohci-platform: use reset array API

2017-11-01 Thread Masahiro Yamada
Generic drivers like this need to control arbitrary number of reset lines. Instead of hard-coding the maximum number of resets, use the reset array API. It can manage a bunch of resets behind the scene. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2:

Re: [PATCH 1/2] usb: ehci-platform: use reset array API

2017-11-01 Thread Masahiro Yamada
Hi Alan, 2017-11-02 0:32 GMT+09:00 Alan Stern <st...@rowland.harvard.edu>: > On Mon, 30 Oct 2017, Masahiro Yamada wrote: > >> Generic drivers like this need to control arbitrary numbers of reset >> lines. Instead of hard-coding the maximum number of resets, use the >

[PATCH 2/2] usb: ohci-platform: use reset array API

2017-10-30 Thread Masahiro Yamada
Generic drivers like this need to control arbitrary numbers of reset lines. Instead of hard-coding the maximum number of resets, use the reset array API. It can manage a bunch of resets behind the scene. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- drivers/usb/hos

[PATCH 1/2] usb: ehci-platform: use reset array API

2017-10-30 Thread Masahiro Yamada
Generic drivers like this need to control arbitrary numbers of reset lines. Instead of hard-coding the maximum number of resets, use the reset array API. It can manage a bunch of resets behind the scene. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- drivers/usb/hos

Re: [PATCH] usb: remove NULL pointer check for clk_disable_unprepare

2017-05-20 Thread Masahiro Yamada
2017-05-21 2:52 GMT+09:00 Masahiro Yamada <yamada.masah...@socionext.com>: > After long term efforts of fixing non-common clock implementations, > clk_disable() is a no-op for a NULL pointer input, and this is now > tree-wide consistent. > > All clock consumers can sa

[PATCH] usb: remove NULL pointer check for clk_disable_unprepare

2017-05-20 Thread Masahiro Yamada
After long term efforts of fixing non-common clock implementations, clk_disable() is a no-op for a NULL pointer input, and this is now tree-wide consistent. All clock consumers can safely call clk_disable(_unprepare) without NULL pointer check. Signed-off-by: Masahiro Yamada <yamada.ma

[PATCH] usb: mtu3: cleanup with list_first_entry_or_null()

2017-05-20 Thread Masahiro Yamada
The combo of list_empty() and list_first_entry() can be replaced with list_first_entry_or_null(). Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- drivers/usb/mtu3/mtu3.h | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/usb/mtu3/mt

Re: [PATCH 0/2] mmc: allow mmc_alloc_host() and tmio_mmc_host_alloc()

2016-11-10 Thread Masahiro Yamada
2016-11-10 22:35 GMT+09:00 Greg Kroah-Hartman <gre...@linuxfoundation.org>: > On Thu, Nov 10, 2016 at 10:24:21PM +0900, Masahiro Yamada wrote: >> >> sdhci_alloc_host() returns an error pointer when it fails. >> but mmc_alloc_host() cannot. >> >> This series

[PATCH 0/2] mmc: allow mmc_alloc_host() and tmio_mmc_host_alloc()

2016-11-10 Thread Masahiro Yamada
sdhci_alloc_host() returns an error pointer when it fails. but mmc_alloc_host() cannot. This series allow to propagate a proper error code when host-allocation fails. Masahiro Yamada (2): mmc: allow mmc_alloc_host() to return proper error code mmc: tmio: allow tmio_mmc_host_alloc

[PATCH 1/2] mmc: allow mmc_alloc_host() to return proper error code

2016-11-10 Thread Masahiro Yamada
callers. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- drivers/mmc/core/host.c | 11 ++- drivers/mmc/host/android-goldfish.c | 4 ++-- drivers/mmc/host/atmel-mci.c| 4 ++-- drivers/mmc/host/au1xmmc.c | 4 ++-- drivers/mmc/host/bfin

Re: [PATCH] usb: renesas_usbhs: simplify list handling

2016-11-07 Thread Masahiro Yamada
y... > https://git.kernel.org/cgit/linux/kernel/git/balbi/usb.git/commit/?h=testing/next=31faf878bd8c7e2c078a3b75f65efe64f23b0f18 > So, the patch will appear in linux-next repository in the future. Likewise for drivers/usb/dwc3/gadget.h drivers/usb/dwc2/gadget.c -- Best Regards Masah

Re: [PATCH v2 0/3] usb: trivial cleanups with list_first_entry_or_null()

2016-10-31 Thread Masahiro Yamada
Hi Felipe, >> >> If this series looks good, can you pick it up please? > > it's in my testing/next branch. Has been there for a while ;-) Good. Thanks for taking care of it! -- Best Regards Masahiro Yamada -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH v2 0/3] usb: trivial cleanups with list_first_entry_or_null()

2016-10-28 Thread Masahiro Yamada
Hello Felipe, If this series looks good, can you pick it up please? Thanks, 2016-09-19 1:03 GMT+09:00 Masahiro Yamada <yamada.masah...@socionext.com>: > Replace the chain of list_empty() and list_first_entry() > with list_first_entry_or_null(). > > Changes in v2: > -

Re: [PATCH] usb: ehci-platform: increase EHCI_MAX_RSTS to 4

2016-10-17 Thread Masahiro Yamada
Hi Greg, 2016-10-17 21:30 GMT+09:00 Greg Kroah-Hartman <gre...@linuxfoundation.org>: > On Mon, Oct 17, 2016 at 08:11:59PM +0900, Masahiro Yamada wrote: >> Socionext LD11 SoC (arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi) >> needs to handle 4 reset lines for EHCI.

[PATCH] usb: ehci-platform: increase EHCI_MAX_RSTS to 4

2016-10-17 Thread Masahiro Yamada
Socionext LD11 SoC (arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi) needs to handle 4 reset lines for EHCI. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- drivers/usb/host/ehci-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/us

[PATCH v2 0/3] usb: trivial cleanups with list_first_entry_or_null()

2016-09-18 Thread Masahiro Yamada
Replace the chain of list_empty() and list_first_entry() with list_first_entry_or_null(). Changes in v2: - Split into per-driver patches Masahiro Yamada (3): usb: dwc2: cleanup with list_first_entry_or_null() usb: dwc3: cleanup with list_first_entry_or_null() usb: renesas_usbhs: cleanup

[PATCH v2 3/3] usb: renesas_usbhs: cleanup with list_first_entry_or_null()

2016-09-18 Thread Masahiro Yamada
The combo of list_empty() check and return list_first_entry() can be replaced with list_first_entry_or_null(). Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- drivers/usb/renesas_usbhs/fifo.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drive

[PATCH v2 1/3] usb: dwc2: cleanup with list_first_entry_or_null()

2016-09-18 Thread Masahiro Yamada
The combo of list_empty() check and return list_first_entry() can be replaced with list_first_entry_or_null(). Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> Acked-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 6 ++ 1 file changed, 2 inse

[PATCH v2 2/3] usb: dwc3: cleanup with list_first_entry_or_null()

2016-09-18 Thread Masahiro Yamada
The combo of list_empty() check and return list_first_entry() can be replaced with list_first_entry_or_null(). Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- drivers/usb/dwc3/gadget.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/us

[PATCH] usb: cleanup with list_first_entry_or_null()

2016-09-12 Thread Masahiro Yamada
The combo of list_empty() check and return list_first_entry() can be replaced with list_first_entry_or_null(). Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- drivers/usb/dwc2/gadget.c| 6 ++ drivers/usb/dwc3/gadget.h| 5 + drivers/usb/renesas

Re: [PATCH] usb: remove redundant dependency on USB_SUPPORT

2016-08-16 Thread Masahiro Yamada
2016-08-16 16:29 GMT+09:00 Felipe Balbi <ba...@kernel.org>: > > Hi, > > Masahiro Yamada <yamada.masah...@socionext.com> writes: >> The whole Kconfig entries of the USB subsystem are surrounded with >> "if USB_SUPPORT" ... "endif", so CONF

[PATCH] usb: remove redundant dependency on USB_SUPPORT

2016-07-22 Thread Masahiro Yamada
The whole Kconfig entries of the USB subsystem are surrounded with "if USB_SUPPORT" ... "endif", so CONFIG_USB_SUPPORT=y is surely met when these two Kconfig options are visible. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- drivers/usb/core/Kconf

[PATCH] usb: ohci-platform: switch over to shared reset

2016-07-19 Thread Masahiro Yamada
and falls into the _exclusive variant during the migration, but the reset control in this driver is apparently shared-tolerate. Besides, this driver is for generic platforms, so actually should be able to work with a shared reset line. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> ---

[PATCH] usb: ehci-platform: switch over to shared reset

2016-07-19 Thread Masahiro Yamada
and falls into the _exclusive variant during the migration, but the reset control in this driver is apparently shared-tolerate. Besides, this driver is for generic platforms, so actually should be able to work with a shared reset line. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> ---