Re: [PATCH RESEND] usb: ehci/ohci-exynos: Fix PHY getting sequence
Hi Vivek, On Tue, Aug 5, 2014 at 4:09 PM, Vivek Gautam gautam.vi...@samsung.com wrote: Since we want to keep support for both older usb-phys as well as the newer generic phys, lets first get the generic PHYs and fallback to older USB-PHYs only when we fail to get the former. This should fix the issue with ehci-exynos and ohci-exynos, wherein in the absence of SAMSUNG_USB2PHY config symbol, we end up getting the NOP_USB_XCEIV phy when the same is enabled. And thus the PHYs are not configured properly. Reported-by: Sachin Kamat sachin.ka...@samsung.com Signed-off-by: Vivek Gautam gautam.vi...@samsung.com Cc: Alan Stern st...@rowland.harvard.edu Cc: Jingoo Han jg1@samsung.com Tested this patch on Exynos5250 based Arndale and Snow boards. Fixes the said issue. Thanks. Tested-by: Sachin Kamat sachin.ka...@samsung.com -- Regards, Sachin. -- 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: Re: [PATCH 1/1] usb: dwc3: Kconfig: Fix dependency for Exynos DWC3
On Tue, Jul 01, 2014 at 08:50:19AM +0530, Sachin Kamat wrote: On Mon, Jun 30, 2014 at 10:19 PM, Felipe Balbi ba...@ti.com wrote: On Mon, Jun 30, 2014 at 02:33:14PM +0530, Sachin Kamat wrote: Make the config depend on ARCH_EXYNOS5 instead of ARCH_EXYNOS as this IP is available only on Exynos5 platforms. Signed-off-by: Sachin Kamat sachin.ka...@samsung.com --- drivers/usb/dwc3/Kconfig |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index 261c3b428220..24a4f8ed9fd1 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -55,7 +55,7 @@ config USB_DWC3_OMAP config USB_DWC3_EXYNOS tristate Samsung Exynos Platform - depends on ARCH_EXYNOS || COMPILE_TEST + depends on ARCH_EXYNOS5 || COMPILE_TEST what happens when you have exynos[6789] ? Are we going to continually increase this line ? To me this is a pointless change. I am not sure if the IP would remain same in future Exynos SoCs. However for what we know for now is that this IP exists only on Exynos5 and it makes sense that the dependency reflect the same. I am not introducing any new dependency, just making the existing one accurate. If you feel this is a pointless change, please feel free to drop this patch. The point is that this dependency has the potential to grow every year or so and that's just churn going upstream. You don't want OMAP to build Exynos glue layer and that's fine (and coverned by ARCH_EXYNOS) but consider the situation of new silicon wakeup. Just to be able to build the USB driver, you're gonna have to change this line because you're in the process of waking up a new SoC that doesn't match with ARCH_EXYNOS5. You see the point ? Yes, I get the point now. Thanks for the detailed explanation, Felipe :) -- Regards, Sachin. -- 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 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
On Fri, Jun 27, 2014 at 10:23 PM, Olof Johansson o...@lixom.net wrote: On Fri, Jun 27, 2014 at 9:32 AM, Doug Anderson diand...@chromium.org wrote: Felipe, On Fri, Jun 27, 2014 at 8:59 AM, Felipe Balbi ba...@ti.com wrote: I'll admit to not having been involved with the previous discussions, but this seems strange to me. Are we throwing in the towel and deciding that it's too hard to get the Kconfigs right and that we'll just rely on individual users to figure out the right answer for themselves? no. select prevents a driver from be built as a dynamically linked module and distro-kernels might want to enable everything as modules. Ah, that's what the problem was! I wasn't aware of this issue with SELECT. Sorry for the noob-ness. Select is also fragile, for example if a main subsystem isn't enabled, the specific option will still be enabled (or there'll be a warning/error about it). Overall it tends to cause headaches so many maintainers are starting to push back against it. Really we want the PHY to be =y if the USB driver is =y or =m if the USB driver is =m, I think. You could argue that one might want to build the main USB driver into the kernel but have the phy drivers as modules, so you could possibly also try to support that... If there's not a good way to specify that, I guess we'll just have to use default and rely on the user not to purposely choose the wrong thing. Like the following (untested): config PHY_SAMSUNG_USB2 depends on USB_OHCI_EXYNOS || USB_EHCI_EXYNOS default y if ARCH_EXYNOS=y (USB_OHCI_EXYNOS=y || USB_EHCI_EXYNOS=y) default m if ARCH_EXYNOS=m (USB_OHCI_EXYNOS=m || USB_EHCI_EXYNOS=m) ... I see some syntax like that elsewhere in Kconfig so I assume it's reasonable... I think you can take out the test for ARCH_EXYNOS here (first of all, it can never be modular). I'm not sure it makes sense to work so hard to set the default right either, as long as the dependencies are correct. I.e. it'll still mess up randconfig if the combination doesn't build, and distros can still downgrade to 'm' if they want to. That'll just leave: config PHY_SAMSUNG_USB2 tristate foo depends on USB_OHCI_EXYNOS || USB_EHCI_EXYNOS default y (no need to add an if since it's taken care of by the depends) With the above the user could purposely enable the OHCI or EHCI driver and disable the PHY driver which is not really sensible. ...but it wouldn't cause a compile failure or crash--USB just won't work. Just make the sub-drivers silent options with defaults. I.e: config PHY_EXYNOS5250_USB2 bool SOC_EXYNOS5250 depends on PHY_SAMSUNG_USB2 and so on. Note that it doesn't actually scale to make it depend on a specific SoC though, so it should probably just be cut down the line of EXYNOS4/5 and err on the side of including a bit too much code instead. Yes, that seems the right thing to do. However, for now I will retain the SoC based structure. Considering the fragility involved in using 'select', I will re-do this by playing around with the default option. Thanks everyone for your inputs. -- Regards, Sachin. -- 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 1/1] usb: dwc3: Kconfig: Fix dependency for Exynos DWC3
Make the config depend on ARCH_EXYNOS5 instead of ARCH_EXYNOS as this IP is available only on Exynos5 platforms. Signed-off-by: Sachin Kamat sachin.ka...@samsung.com --- drivers/usb/dwc3/Kconfig |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index 261c3b428220..24a4f8ed9fd1 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -55,7 +55,7 @@ config USB_DWC3_OMAP config USB_DWC3_EXYNOS tristate Samsung Exynos Platform - depends on ARCH_EXYNOS || COMPILE_TEST + depends on ARCH_EXYNOS5 || COMPILE_TEST default USB_DWC3 help Recent Exynos5 SoCs ship with one DesignWare Core USB3 IP inside, -- 1.7.9.5 -- 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 1/1] usb: dwc3: Kconfig: Fix dependency for Exynos DWC3
On Mon, Jun 30, 2014 at 10:19 PM, Felipe Balbi ba...@ti.com wrote: On Mon, Jun 30, 2014 at 02:33:14PM +0530, Sachin Kamat wrote: Make the config depend on ARCH_EXYNOS5 instead of ARCH_EXYNOS as this IP is available only on Exynos5 platforms. Signed-off-by: Sachin Kamat sachin.ka...@samsung.com --- drivers/usb/dwc3/Kconfig |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index 261c3b428220..24a4f8ed9fd1 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -55,7 +55,7 @@ config USB_DWC3_OMAP config USB_DWC3_EXYNOS tristate Samsung Exynos Platform - depends on ARCH_EXYNOS || COMPILE_TEST + depends on ARCH_EXYNOS5 || COMPILE_TEST what happens when you have exynos[6789] ? Are we going to continually increase this line ? To me this is a pointless change. I am not sure if the IP would remain same in future Exynos SoCs. However for what we know for now is that this IP exists only on Exynos5 and it makes sense that the dependency reflect the same. I am not introducing any new dependency, just making the existing one accurate. If you feel this is a pointless change, please feel free to drop this patch. Regards, Sachin. -- 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 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
Hi Vivek, On Thu, Jun 26, 2014 at 1:39 PM, Vivek Gautam gautam.vi...@samsung.com wrote: Hi Sachin, On Thu, Jun 26, 2014 at 11:09 AM, Sachin Kamat sachin.ka...@samsung.com wrote: EHCI and OHCI drivers on Exynos platforms do not work without their corresponding SoC specific phy drivers. Hence it makes no sense to keep these phy drivers as user selectable. Instead select them from the respective USB configs to make things easier for the end user. While at it enable 5250 phy for Exynos 5420 SoC too. snip + select PHY_EXYNOS4210_USB2 if CPU_EXYNOS4210 + select PHY_EXYNOS4X12_USB2 if (SOC_EXYNOS4212 || SOC_EXYNOS4412) + select PHY_EXYNOS5250_USB2 if (SOC_EXYNOS5250 || SOC_EXYNOS5420) also || SOC_EXYNOS5800 same controller present on Exynos5800 too. Thanks. Will add. snip @@ -520,6 +521,7 @@ config USB_OHCI_SH config USB_OHCI_EXYNOS tristate OHCI support for Samsung S5P/EXYNOS SoC Series depends on PLAT_S5P || ARCH_EXYNOS + select PHY_SAMSUNG_USB2 if ARCH_EXYNOS help Enable support for the Samsung Exynos SOC's on-chip OHCI controller. rest looks fine. Thanks. Sachin. -- 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 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
Hi Vivek, On Thu, Jun 26, 2014 at 1:55 PM, Sachin Kamat sachin.ka...@samsung.com wrote: Hi Vivek, On Thu, Jun 26, 2014 at 1:39 PM, Vivek Gautam gautam.vi...@samsung.com wrote: Hi Sachin, On Thu, Jun 26, 2014 at 11:09 AM, Sachin Kamat sachin.ka...@samsung.com wrote: EHCI and OHCI drivers on Exynos platforms do not work without their corresponding SoC specific phy drivers. Hence it makes no sense to keep these phy drivers as user selectable. Instead select them from the respective USB configs to make things easier for the end user. While at it enable 5250 phy for Exynos 5420 SoC too. snip + select PHY_EXYNOS4210_USB2 if CPU_EXYNOS4210 + select PHY_EXYNOS4X12_USB2 if (SOC_EXYNOS4212 || SOC_EXYNOS4412) + select PHY_EXYNOS5250_USB2 if (SOC_EXYNOS5250 || SOC_EXYNOS5420) also || SOC_EXYNOS5800 same controller present on Exynos5800 too. Just checked that SOC_EXYNOS5800 is dependent on SOC_EXYNOS5420. Hence explicit option for SOC_EXYNOS5800 is redundant here. Will keep it as is. Regards, Sachin. -- 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 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
Hi Kishon, On Thu, Jun 26, 2014 at 2:19 PM, Kishon Vijay Abraham I kis...@ti.com wrote: Hi Sachin, On Thursday 26 June 2014 11:09 AM, Sachin Kamat wrote: EHCI and OHCI drivers on Exynos platforms do not work without their corresponding SoC specific phy drivers. Hence it makes no sense to keep these phy drivers as user selectable. Instead select them from the respective USB configs to make things easier for the end user. While at it enable 5250 phy for Exynos 5420 SoC too. Signed-off-by: Sachin Kamat sachin.ka...@samsung.com Cc: Kishon Vijay Abraham I kis...@ti.com --- drivers/phy/Kconfig | 37 +++-- drivers/usb/host/Kconfig | 10 ++ 2 files changed, 13 insertions(+), 34 deletions(-) diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index 16a2f067c242..7fe7ef5f1322 100644 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig snip config USB_EHCI_EXYNOS - tristate EHCI support for Samsung S5P/EXYNOS SoC Series - depends on PLAT_S5P || ARCH_EXYNOS - help - Enable support for the Samsung Exynos SOC's on-chip EHCI controller. + tristate EHCI support for Samsung S5P/EXYNOS SoC Series + depends on PLAT_S5P || ARCH_EXYNOS + select PHY_SAMSUNG_USB2 if ARCH_EXYNOS I am skeptical to add select after the problems it created during previous releases. If you could point me to some link/discussion about this, I could check if such problem is applicable here. IMHO, there shouldn't be any in this case. Maybe use 'default y if ARCH_EXYNOS' in PHY_SAMSUNG_USB2 Kconfig? I would prefer to use this option only if there is a strong objection to doing it the current way as I do not see any benefits of exposing the PHY entries that are only prerequisites for the USB functionality (in this case) to users. Regards, Sachin. -- 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 1/2] usb: host: Kconfig: Select PHY drivers for Exynos EHCI/OHCI
EHCI and OHCI drivers on Exynos platforms do not work without their corresponding SoC specific phy drivers. Hence it makes no sense to keep these phy drivers as user selectable. Instead select them from the respective USB configs to make things easier for the end user. While at it enable 5250 phy for Exynos 5420 SoC too. Signed-off-by: Sachin Kamat sachin.ka...@samsung.com Cc: Kishon Vijay Abraham I kis...@ti.com --- drivers/phy/Kconfig | 37 +++-- drivers/usb/host/Kconfig | 10 ++ 2 files changed, 13 insertions(+), 34 deletions(-) diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index 16a2f067c242..7fe7ef5f1322 100644 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig @@ -121,44 +121,21 @@ config PHY_SUN4I_USB parts, as well as the 2 regular USB 2 host PHYs. config PHY_SAMSUNG_USB2 - tristate Samsung USB 2.0 PHY driver + tristate select GENERIC_PHY select MFD_SYSCON - help - Enable this to support the Samsung USB 2.0 PHY driver for Samsung - SoCs. This driver provides the interface for USB 2.0 PHY. Support for - particular SoCs has to be enabled in addition to this driver. Number - and type of supported phys depends on the SoC. + select PHY_EXYNOS4210_USB2 if CPU_EXYNOS4210 + select PHY_EXYNOS4X12_USB2 if (SOC_EXYNOS4212 || SOC_EXYNOS4412) + select PHY_EXYNOS5250_USB2 if (SOC_EXYNOS5250 || SOC_EXYNOS5420) config PHY_EXYNOS4210_USB2 - bool Support for Exynos 4210 - depends on PHY_SAMSUNG_USB2 - depends on CPU_EXYNOS4210 - help - Enable USB PHY support for Exynos 4210. This option requires that - Samsung USB 2.0 PHY driver is enabled and means that support for this - particular SoC is compiled in the driver. In case of Exynos 4210 four - phys are available - device, host, HSIC0 and HSIC1. + bool config PHY_EXYNOS4X12_USB2 - bool Support for Exynos 4x12 - depends on PHY_SAMSUNG_USB2 - depends on (SOC_EXYNOS4212 || SOC_EXYNOS4412) - help - Enable USB PHY support for Exynos 4x12. This option requires that - Samsung USB 2.0 PHY driver is enabled and means that support for this - particular SoC is compiled in the driver. In case of Exynos 4x12 four - phys are available - device, host, HSIC0 and HSIC1. + bool config PHY_EXYNOS5250_USB2 - bool Support for Exynos 5250 - depends on PHY_SAMSUNG_USB2 - depends on SOC_EXYNOS5250 - help - Enable USB PHY support for Exynos 5250. This option requires that - Samsung USB 2.0 PHY driver is enabled and means that support for this - particular SoC is compiled in the driver. In case of Exynos 5250 four - phys are available - device, host, HSIC0 and HSIC. + bool config PHY_EXYNOS5_USBDRD tristate Exynos5 SoC series USB DRD PHY driver diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 61b7817bd66b..2938807331de 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -211,10 +211,11 @@ config USB_EHCI_SH If you use the PCI EHCI controller, this option is not necessary. config USB_EHCI_EXYNOS - tristate EHCI support for Samsung S5P/EXYNOS SoC Series - depends on PLAT_S5P || ARCH_EXYNOS - help - Enable support for the Samsung Exynos SOC's on-chip EHCI controller. + tristate EHCI support for Samsung S5P/EXYNOS SoC Series + depends on PLAT_S5P || ARCH_EXYNOS + select PHY_SAMSUNG_USB2 if ARCH_EXYNOS + help + Enable support for the Samsung Exynos SOC's on-chip EHCI controller. config USB_EHCI_MV bool EHCI support for Marvell PXA/MMP USB controller @@ -520,6 +521,7 @@ config USB_OHCI_SH config USB_OHCI_EXYNOS tristate OHCI support for Samsung S5P/EXYNOS SoC Series depends on PLAT_S5P || ARCH_EXYNOS + select PHY_SAMSUNG_USB2 if ARCH_EXYNOS help Enable support for the Samsung Exynos SOC's on-chip OHCI controller. -- 1.7.9.5 -- 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 2/2] usb: dwc3: Kconfig: Select PHY drivers for Exynos DWC3
USB DWC3 driver on Exynos platforms does not work without its corresponding phy driver. Hence it makes no sense to keep the phy driver as user selectable. Instead select it from USB config to make things easier for the end user. While at it make the config depend on ARCH_EXYNOS5 instead of ARCH_EXYNOS as this IP is available only on Exynos5 platforms. Signed-off-by: Sachin Kamat sachin.ka...@samsung.com Cc: Kishon Vijay Abraham I kis...@ti.com --- drivers/phy/Kconfig |8 +--- drivers/usb/dwc3/Kconfig |3 ++- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index 7fe7ef5f1322..6be353c9dc4c 100644 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig @@ -138,15 +138,9 @@ config PHY_EXYNOS5250_USB2 bool config PHY_EXYNOS5_USBDRD - tristate Exynos5 SoC series USB DRD PHY driver - depends on ARCH_EXYNOS5 OF - depends on HAS_IOMEM + tristate select GENERIC_PHY select MFD_SYSCON - help - Enable USB DRD PHY support for Exynos 5 SoC series. - This driver provides PHY interface for USB 3.0 DRD controller - present on Exynos5 SoC series. config PHY_XGENE tristate APM X-Gene 15Gbps PHY support diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index 261c3b428220..501477452ad8 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -55,7 +55,8 @@ config USB_DWC3_OMAP config USB_DWC3_EXYNOS tristate Samsung Exynos Platform - depends on ARCH_EXYNOS || COMPILE_TEST + depends on ARCH_EXYNOS5 || COMPILE_TEST + select PHY_EXYNOS5_USBDRD default USB_DWC3 help Recent Exynos5 SoCs ship with one DesignWare Core USB3 IP inside, -- 1.7.9.5 -- 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 1/2] usb: ohci-exynos: Use NULL instead of 0
The third argument of devm_of_phy_get expects a pointer. Hence use NULL instead of 0. Signed-off-by: Sachin Kamat sachin.ka...@samsung.com --- drivers/usb/host/ohci-exynos.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c index 060a6a414750..a72ab8fe8cd3 100644 --- a/drivers/usb/host/ohci-exynos.c +++ b/drivers/usb/host/ohci-exynos.c @@ -87,7 +87,7 @@ static int exynos_ohci_get_phy(struct device *dev, return -EINVAL; } - phy = devm_of_phy_get(dev, child, 0); + phy = devm_of_phy_get(dev, child, NULL); of_node_put(child); if (IS_ERR(phy)) { ret = PTR_ERR(phy); -- 1.7.9.5 -- 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 2/2] usb: ehci-exynos: Use NULL instead of 0
The third argument of devm_of_phy_get expects a pointer. Hence use NULL instead of 0. Fixes the following warning: drivers/usb/host/ehci-exynos.c:91:51: warning: Using plain integer as NULL pointer Signed-off-by: Sachin Kamat sachin.ka...@samsung.com --- drivers/usb/host/ehci-exynos.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index d1c76216350f..cda0a2f5c467 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -88,7 +88,7 @@ static int exynos_ehci_get_phy(struct device *dev, return -EINVAL; } - phy = devm_of_phy_get(dev, child, 0); + phy = devm_of_phy_get(dev, child, NULL); of_node_put(child); if (IS_ERR(phy)) { ret = PTR_ERR(phy); -- 1.7.9.5 -- 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 1/1] usb: host: max3421-hcd: Use module_spi_driver
module_spi_driver simplifies the code by eliminating boilerplate code. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/host/max3421-hcd.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/usb/host/max3421-hcd.c b/drivers/usb/host/max3421-hcd.c index 28abda14c5e2..e8568c0f1df3 100644 --- a/drivers/usb/host/max3421-hcd.c +++ b/drivers/usb/host/max3421-hcd.c @@ -1919,20 +1919,7 @@ static struct spi_driver max3421_driver = { }, }; -static int __init -max3421_mod_init(void) -{ - return spi_register_driver(max3421_driver); -} - -static void __exit -max3421_mod_exit(void) -{ - spi_unregister_driver(max3421_driver); -} - -module_init(max3421_mod_init); -module_exit(max3421_mod_exit); +module_spi_driver(max3421_driver); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR(David Mosberger dav...@egauge.net); -- 1.7.9.5 -- 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 2/4] ARM: dts: Add usb2phy to Exynos 5250
Hi Vivek, On 30 April 2014 14:25, Vivek Gautam gautam.vi...@samsung.com wrote: From: Kamil Debski k.deb...@samsung.com Add support to PHY of USB2 of the Exynos 5250 SoC. Signed-off-by: Kamil Debski k.deb...@samsung.com [gautam.vi...@samsung.com: Split the usb phy entries from syscon entries from earlier patch: dts: Add usb2phy to Exynos 5250] [gautam.vi...@samsung.com: Added phy entry for OHCI also along with EHCI] Signed-off-by: Vivek Gautam gautam.vi...@samsung.com --- Changes from v7: None arch/arm/boot/dts/exynos5250.dtsi | 26 ++ 1 file changed, 26 insertions(+) diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 70f0cd5..51e554c 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -563,6 +563,14 @@ clocks = clock CLK_USB2; clock-names = usbhost; + #address-cells = 1; + #size-cells = 0; + port@0 { + reg = 0; + phys = usb2_phy_gen 1; + phy-names = host; + status = ok; This should be okay. + }; }; usb@1212 { @@ -572,6 +580,14 @@ clocks = clock CLK_USB2; clock-names = usbhost; + #address-cells = 1; + #size-cells = 0; + port@0 { + reg = 0; + phys = usb2_phy_gen 1; + phy-names = host; + status = ok; ditto. -- With warm regards, Sachin -- 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 4/4] ARM: dts: Add usb 2.0 support on exynos5420
On 30 April 2014 14:25, Vivek Gautam gautam.vi...@samsung.com wrote: Add required device node for ehci and ohci controllers to enable USB 2.0 support. Signed-off-by: Vivek Gautam gautam.vi...@samsung.com --- arch/arm/boot/dts/exynos5420.dtsi | 36 +++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index 16b860a..392d340 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi @@ -738,7 +738,41 @@ samsung,power-domain = g2d_pd; }; - phy@1213 { + usb@1211 { + compatible = samsung,exynos4210-ehci; + reg = 0x1211 0x100; + interrupts = 0 71 0; + + clocks = clock CLK_USBH20; + clock-names = usbhost; + #address-cells = 1; + #size-cells = 0; + port@0 { + reg = 0; + phys = usb2_phy_gen 1; + phy-names = host; + status = ok; s/ok/okay + }; + }; + + usb@1212 { + compatible = samsung,exynos4210-ohci; + reg = 0x1212 0x100; + interrupts = 0 71 0; + + clocks = clock CLK_USBH20; + clock-names = usbhost; + #address-cells = 1; + #size-cells = 0; + port@0 { + reg = 0; + phys = usb2_phy_gen 1; + phy-names = host; + status = ok; ditto -- With warm regards, Sachin -- 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 Resend 1/2] usb: gadget: s3c2410_udc: Fix build error
On 18 February 2014 20:58, Felipe Balbi ba...@ti.com wrote: On Mon, Feb 03, 2014 at 01:59:38PM +0530, Sachin Kamat wrote: Pass value instead of address as expected by 'usb_ep_set_maxpacket_limit'. Fixes the following compilation error introduced by commit e117e742d310 (usb: gadget: add maxpacket_limit field to struct usb_ep): drivers/usb/gadget/s3c2410_udc.c: In function 's3c2410_udc_reinit': drivers/usb/gadget/s3c2410_udc.c:1632:3: error: cannot take address of bit-field 'maxpacket' usb_ep_set_maxpacket_limit(ep-ep, ep-ep.maxpacket); Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Reviewed-by: Robert Baldyga r.bald...@samsung.com is this still needed for -rc4 ? I just verified on latest linux-next and we still get build errors without this patch. Hence, yes this patch is required for the current rc. -- With warm regards, Sachin -- 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 Resend 2/2] usb: gadget: s3c-hsudc: Remove unused label
On 18 February 2014 20:58, Felipe Balbi ba...@ti.com wrote: On Mon, Feb 03, 2014 at 01:59:39PM +0530, Sachin Kamat wrote: Fixes the following compilation warning: drivers/usb/gadget/s3c-hsudc.c: In function 's3c_hsudc_probe': drivers/usb/gadget/s3c-hsudc.c:1347:1: warning: label 'err_add_device' defined but not used [-Wunused-label] Signed-off-by: Sachin Kamat sachin.ka...@linaro.org What about this one ? This patch too is needed but can go in for 3.15. -- With warm regards, Sachin -- 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 Resend 1/2] usb: gadget: s3c2410_udc: Fix build error
On 3 February 2014 13:59, Sachin Kamat sachin.ka...@linaro.org wrote: Pass value instead of address as expected by 'usb_ep_set_maxpacket_limit'. Fixes the following compilation error introduced by commit e117e742d310 (usb: gadget: add maxpacket_limit field to struct usb_ep): drivers/usb/gadget/s3c2410_udc.c: In function 's3c2410_udc_reinit': drivers/usb/gadget/s3c2410_udc.c:1632:3: error: cannot take address of bit-field 'maxpacket' usb_ep_set_maxpacket_limit(ep-ep, ep-ep.maxpacket); Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Reviewed-by: Robert Baldyga r.bald...@samsung.com --- drivers/usb/gadget/s3c2410_udc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index f04b2c3154de..dd9678f85c58 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c @@ -1629,7 +1629,7 @@ static void s3c2410_udc_reinit(struct s3c2410_udc *dev) ep-ep.desc = NULL; ep-halted = 0; INIT_LIST_HEAD(ep-queue); - usb_ep_set_maxpacket_limit(ep-ep, ep-ep.maxpacket); + usb_ep_set_maxpacket_limit(ep-ep, ep-ep.maxpacket); } } -- 1.7.9.5 Gentle Ping Felipe. -- With warm regards, Sachin -- 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 Resend 1/2] usb: gadget: s3c2410_udc: Fix build error
Pass value instead of address as expected by 'usb_ep_set_maxpacket_limit'. Fixes the following compilation error introduced by commit e117e742d310 (usb: gadget: add maxpacket_limit field to struct usb_ep): drivers/usb/gadget/s3c2410_udc.c: In function ‘s3c2410_udc_reinit’: drivers/usb/gadget/s3c2410_udc.c:1632:3: error: cannot take address of bit-field ‘maxpacket’ usb_ep_set_maxpacket_limit(ep-ep, ep-ep.maxpacket); Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Reviewed-by: Robert Baldyga r.bald...@samsung.com --- drivers/usb/gadget/s3c2410_udc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index f04b2c3154de..dd9678f85c58 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c @@ -1629,7 +1629,7 @@ static void s3c2410_udc_reinit(struct s3c2410_udc *dev) ep-ep.desc = NULL; ep-halted = 0; INIT_LIST_HEAD(ep-queue); - usb_ep_set_maxpacket_limit(ep-ep, ep-ep.maxpacket); + usb_ep_set_maxpacket_limit(ep-ep, ep-ep.maxpacket); } } -- 1.7.9.5 -- 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 Resend 2/2] usb: gadget: s3c-hsudc: Remove unused label
Fixes the following compilation warning: drivers/usb/gadget/s3c-hsudc.c: In function ‘s3c_hsudc_probe’: drivers/usb/gadget/s3c-hsudc.c:1347:1: warning: label ‘err_add_device’ defined but not used [-Wunused-label] Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/gadget/s3c-hsudc.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c index ea4bbfe72ec0..10c6a128250c 100644 --- a/drivers/usb/gadget/s3c-hsudc.c +++ b/drivers/usb/gadget/s3c-hsudc.c @@ -1344,7 +1344,6 @@ static int s3c_hsudc_probe(struct platform_device *pdev) return 0; err_add_udc: -err_add_device: clk_disable(hsudc-uclk); err_res: if (!IS_ERR_OR_NULL(hsudc-transceiver)) -- 1.7.9.5 -- 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 1/2] usb: gadget: s3c2410_udc: Fix build error
On 3 January 2014 10:58, Sachin Kamat sachin.ka...@linaro.org wrote: Pass value instead of address as expected by 'usb_ep_set_maxpacket_limit'. Fixes the following compilation error introduced by commit e117e742d310 (usb: gadget: add maxpacket_limit field to struct usb_ep): drivers/usb/gadget/s3c2410_udc.c: In function ‘s3c2410_udc_reinit’: drivers/usb/gadget/s3c2410_udc.c:1632:3: error: cannot take address of bit-field ‘maxpacket’ usb_ep_set_maxpacket_limit(ep-ep, ep-ep.maxpacket); Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Robert Baldyga r.bald...@samsung.com --- drivers/usb/gadget/s3c2410_udc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index f04b2c3154de..dd9678f85c58 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c @@ -1629,7 +1629,7 @@ static void s3c2410_udc_reinit(struct s3c2410_udc *dev) ep-ep.desc = NULL; ep-halted = 0; INIT_LIST_HEAD(ep-queue); - usb_ep_set_maxpacket_limit(ep-ep, ep-ep.maxpacket); + usb_ep_set_maxpacket_limit(ep-ep, ep-ep.maxpacket); } } -- 1.7.9.5 Gentle ping, Felipe. -- With warm regards, Sachin -- 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 2/2] usb: gadget: s3c-hsudc: Remove unused label
Fixes the following compilation warning: drivers/usb/gadget/s3c-hsudc.c: In function ‘s3c_hsudc_probe’: drivers/usb/gadget/s3c-hsudc.c:1347:1: warning: label ‘err_add_device’ defined but not used [-Wunused-label] Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/gadget/s3c-hsudc.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c index ea4bbfe72ec0..10c6a128250c 100644 --- a/drivers/usb/gadget/s3c-hsudc.c +++ b/drivers/usb/gadget/s3c-hsudc.c @@ -1344,7 +1344,6 @@ static int s3c_hsudc_probe(struct platform_device *pdev) return 0; err_add_udc: -err_add_device: clk_disable(hsudc-uclk); err_res: if (!IS_ERR_OR_NULL(hsudc-transceiver)) -- 1.7.9.5 -- 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 1/2] usb: gadget: s3c2410_udc: Fix build error
Pass value instead of address as expected by 'usb_ep_set_maxpacket_limit'. Fixes the following compilation error introduced by commit e117e742d310 (usb: gadget: add maxpacket_limit field to struct usb_ep): drivers/usb/gadget/s3c2410_udc.c: In function ‘s3c2410_udc_reinit’: drivers/usb/gadget/s3c2410_udc.c:1632:3: error: cannot take address of bit-field ‘maxpacket’ usb_ep_set_maxpacket_limit(ep-ep, ep-ep.maxpacket); Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Robert Baldyga r.bald...@samsung.com --- drivers/usb/gadget/s3c2410_udc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index f04b2c3154de..dd9678f85c58 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c @@ -1629,7 +1629,7 @@ static void s3c2410_udc_reinit(struct s3c2410_udc *dev) ep-ep.desc = NULL; ep-halted = 0; INIT_LIST_HEAD(ep-queue); - usb_ep_set_maxpacket_limit(ep-ep, ep-ep.maxpacket); + usb_ep_set_maxpacket_limit(ep-ep, ep-ep.maxpacket); } } -- 1.7.9.5 -- 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: ehci: Cleanup usb-ehci-orion.h header
Commit c02cecb92ed4 (ARM: orion: move platform_data definitions) moved the file to the current location but forgot to remove the pointer to its previous location. Clean it up. While at it also change the header file protection macros appropriately. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- include/linux/platform_data/usb-ehci-orion.h |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/linux/platform_data/usb-ehci-orion.h b/include/linux/platform_data/usb-ehci-orion.h index 6fc78e430420..52b0acb35fd7 100644 --- a/include/linux/platform_data/usb-ehci-orion.h +++ b/include/linux/platform_data/usb-ehci-orion.h @@ -1,13 +1,11 @@ /* - * arch/arm/plat-orion/include/plat/ehci-orion.h - * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed as is without any * warranty of any kind, whether express or implied. */ -#ifndef __PLAT_EHCI_ORION_H -#define __PLAT_EHCI_ORION_H +#ifndef __USB_EHCI_ORION_H +#define __USB_EHCI_ORION_H #include linux/mbus.h -- 1.7.9.5 -- 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 3/3] usb: phy-twl6030: Add missing braces
Silences the below warning: WARNING: sizeof *twl should be sizeof(*twl) Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/phy/phy-twl6030-usb.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-twl6030-usb.c b/drivers/usb/phy/phy-twl6030-usb.c index bad57ce77ba5..214172b68d5d 100644 --- a/drivers/usb/phy/phy-twl6030-usb.c +++ b/drivers/usb/phy/phy-twl6030-usb.c @@ -328,7 +328,7 @@ static int twl6030_usb_probe(struct platform_device *pdev) struct device *dev = pdev-dev; struct twl4030_usb_data *pdata = dev_get_platdata(dev); - twl = devm_kzalloc(dev, sizeof *twl, GFP_KERNEL); + twl = devm_kzalloc(dev, sizeof(*twl), GFP_KERNEL); if (!twl) return -ENOMEM; -- 1.7.9.5 -- 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 1/3] usb: phy-keystone: Remove redundant of_match_ptr helper
'keystone_usbphy_ids' is always compiled in. Hence the helper macro is not needed. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: WingMan Kwok w-kw...@ti.com --- drivers/usb/phy/phy-keystone.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-keystone.c b/drivers/usb/phy/phy-keystone.c index 533db1284ce7..ee1d03b802e1 100644 --- a/drivers/usb/phy/phy-keystone.c +++ b/drivers/usb/phy/phy-keystone.c @@ -129,7 +129,7 @@ static struct platform_driver keystone_usbphy_driver = { .driver = { .name = keystone-usbphy, .owner = THIS_MODULE, - .of_match_table = of_match_ptr(keystone_usbphy_ids), + .of_match_table = keystone_usbphy_ids, }, }; -- 1.7.9.5 -- 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 2/3] usb: phy-fsm: Staticize local symbols
Local symbols appearing only in this file are made static. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/phy/phy-fsm-usb.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/phy/phy-fsm-usb.c b/drivers/usb/phy/phy-fsm-usb.c index 62238726fb1c..2313b87434ad 100644 --- a/drivers/usb/phy/phy-fsm-usb.c +++ b/drivers/usb/phy/phy-fsm-usb.c @@ -64,7 +64,7 @@ static int otg_set_protocol(struct otg_fsm *fsm, int protocol) static int state_changed; /* Called when leaving a state. Do state clean up jobs here */ -void otg_leave_state(struct otg_fsm *fsm, enum usb_otg_state old_state) +static void otg_leave_state(struct otg_fsm *fsm, enum usb_otg_state old_state) { switch (old_state) { case OTG_STATE_B_IDLE: @@ -121,7 +121,7 @@ void otg_leave_state(struct otg_fsm *fsm, enum usb_otg_state old_state) } /* Called when entering a state */ -int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state) +static int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state) { state_changed = 1; if (fsm-otg-phy-state == new_state) -- 1.7.9.5 -- 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 1/5] usb: gadget: s3c-hsotg: Include linux/of.h header
On 22 October 2013 11:44, Greg KH gre...@linuxfoundation.org wrote: On Mon, Oct 21, 2013 at 07:23:11AM -0500, Felipe Balbi wrote: Hi, On Sat, Oct 19, 2013 at 02:17:52PM -0700, Greg KH wrote: On Thu, Oct 17, 2013 at 01:55:02PM +0530, Sachin Kamat wrote: 'of_match_ptr' is defined in linux/of.h. Include it explicitly to avoid build breakage in the future. Why, what is going to happen in the future? Kernel development is almost always about the now, who knows what is going to happen later. If you want to make a change that will require this type of file to be included, then do it, and fix things up. Otherwise I'm not going to take this series for things that are not a real problem/issue, sorry. What happened to the whole no indirect includes mentality ? That's nice to have, but as nothing is broken at the moment, why is that an issue here? Right, nothing is broken at the moment. This series is more of making the code adhere to better coding style (avoiding implicit includes). Kind of semantic fix :) -- With warm regards, Sachin -- 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 2/5] usb: ohci-at91: Include linux/of.h header
'of_match_ptr' is defined in linux/of.h. Include it explicitly to avoid build breakage in the future. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/host/ohci-at91.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 418444e..59735d7 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c @@ -14,6 +14,7 @@ #include linux/clk.h #include linux/dma-mapping.h +#include linux/of.h #include linux/of_platform.h #include linux/of_gpio.h #include linux/platform_device.h -- 1.7.9.5 -- 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 1/5] usb: gadget: s3c-hsotg: Include linux/of.h header
'of_match_ptr' is defined in linux/of.h. Include it explicitly to avoid build breakage in the future. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/gadget/s3c-hsotg.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 7014d15..7a34bb4 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -29,6 +29,7 @@ #include linux/slab.h #include linux/clk.h #include linux/regulator/consumer.h +#include linux/of.h #include linux/of_platform.h #include linux/usb/ch9.h -- 1.7.9.5 -- 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 4/5] usb: misc: usb3503: Include linux/of.h header
'of_match_ptr' is defined in linux/of.h. Include it explicitly to avoid build breakage in the future. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/misc/usb3503.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/misc/usb3503.c b/drivers/usb/misc/usb3503.c index a31641e..9244ead 100644 --- a/drivers/usb/misc/usb3503.c +++ b/drivers/usb/misc/usb3503.c @@ -23,6 +23,7 @@ #include linux/delay.h #include linux/slab.h #include linux/module.h +#include linux/of.h #include linux/of_gpio.h #include linux/platform_device.h #include linux/platform_data/usb3503.h -- 1.7.9.5 -- 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 5/5] usb: phy: twl6030-usb: Include linux/of.h header
'of_match_ptr' is defined in linux/of.h. Include it explicitly to avoid build breakage in the future. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/phy/phy-twl6030-usb.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/phy/phy-twl6030-usb.c b/drivers/usb/phy/phy-twl6030-usb.c index 16dbc93..30e8a61 100644 --- a/drivers/usb/phy/phy-twl6030-usb.c +++ b/drivers/usb/phy/phy-twl6030-usb.c @@ -33,6 +33,7 @@ #include linux/err.h #include linux/slab.h #include linux/delay.h +#include linux/of.h /* usb register definitions */ #define USB_VENDOR_ID_LSB 0x00 -- 1.7.9.5 -- 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 3/5] usb: ohci-pxa27x: Include linux/of.h header
'of_match_ptr' is defined in linux/of.h. Include it explicitly to avoid build breakage in the future. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/host/ohci-pxa27x.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index e89ac4d..14d4b7b 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c @@ -24,6 +24,7 @@ #include linux/io.h #include linux/kernel.h #include linux/module.h +#include linux/of.h #include linux/of_platform.h #include linux/of_gpio.h #include linux/platform_data/usb-ohci-pxa27x.h -- 1.7.9.5 -- 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 3/5] USB: ehci-exynos: Remove non-DT support
Hi Jingoo, On 10 October 2013 12:01, Jingoo Han jg1@samsung.com wrote: The non-DT for EXYNOS SoCs is not supported from v3.11. Thus, there is no need to support non-DT for Exynos EHCI driver. The 'include/linux/platform_data/usb-ehci-exynos.h' file has been used for non-DT support. Thus, the 'usb-ehci-exynos.h' file can be removed. Wouldn't it be better to do the non-DT cleanup first and then the renaming. This would avoid unnecessary code churn. For e.g., since the header file is deleted in this patch, it doesn't make sense to rename the file and other variable/function names in the previous patch. -- With warm regards, Sachin -- 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 1/5] usb: musb_am335x: Remove redundant of_match_ptr
Hi Felipe, On 30 September 2013 09:44, Sachin Kamat sachin.ka...@linaro.org wrote: The data structure of_match_ptr() protects is always compiled in. Hence of_match_ptr() is not needed. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/musb/musb_am335x.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_am335x.c b/drivers/usb/musb/musb_am335x.c index 41ac5b5..8be9b02 100644 --- a/drivers/usb/musb/musb_am335x.c +++ b/drivers/usb/musb/musb_am335x.c @@ -46,7 +46,7 @@ static struct platform_driver am335x_child_driver = { .remove = am335x_child_remove, .driver = { .name = am335x-usb-childs, - .of_match_table = of_match_ptr(am335x_child_of_match), + .of_match_table = am335x_child_of_match, }, }; -- 1.7.9.5 Probably you missed this one while applying other patches in this series? -- With warm regards, Sachin -- 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 1/5] usb: musb_am335x: Remove redundant of_match_ptr
The data structure of_match_ptr() protects is always compiled in. Hence of_match_ptr() is not needed. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/musb/musb_am335x.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_am335x.c b/drivers/usb/musb/musb_am335x.c index 41ac5b5..8be9b02 100644 --- a/drivers/usb/musb/musb_am335x.c +++ b/drivers/usb/musb/musb_am335x.c @@ -46,7 +46,7 @@ static struct platform_driver am335x_child_driver = { .remove = am335x_child_remove, .driver = { .name = am335x-usb-childs, - .of_match_table = of_match_ptr(am335x_child_of_match), + .of_match_table = am335x_child_of_match, }, }; -- 1.7.9.5 -- 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 2/5] usb: musb_dsps: Remove redundant of_match_ptr
The data structure of_match_ptr() protects is always compiled in. Hence of_match_ptr() is not needed. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Ravi B ravib...@ti.com --- drivers/usb/musb/musb_dsps.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 4047cbb..c7fe16d 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -628,7 +628,7 @@ static struct platform_driver dsps_usbss_driver = { .remove = dsps_remove, .driver = { .name = musb-dsps, - .of_match_table = of_match_ptr(musb_dsps_of_match), + .of_match_table = musb_dsps_of_match, }, }; -- 1.7.9.5 -- 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 3/5] usb: phy: am335x-control: Remove redundant of_match_ptr
The data structure of_match_ptr() protects is always compiled in. Hence of_match_ptr() is not needed. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/phy/phy-am335x-control.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-am335x-control.c b/drivers/usb/phy/phy-am335x-control.c index 22cf07d..6adca06 100644 --- a/drivers/usb/phy/phy-am335x-control.c +++ b/drivers/usb/phy/phy-am335x-control.c @@ -129,7 +129,7 @@ static struct platform_driver am335x_control_driver = { .driver = { .name = am335x-control-usb, .owner = THIS_MODULE, - .of_match_table = of_match_ptr(omap_control_usb_id_table), + .of_match_table = omap_control_usb_id_table, }, }; -- 1.7.9.5 -- 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 5/5] usb: phy: tegra-usb: Remove redundant of_match_ptr
The data structure of_match_ptr() protects is always compiled in. Hence of_match_ptr() is not needed. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Stephen Warren swar...@wwwdotorg.org Cc: linux-te...@vger.kernel.org --- drivers/usb/phy/phy-tegra-usb.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-tegra-usb.c b/drivers/usb/phy/phy-tegra-usb.c index e9cb1cb..82232ac 100644 --- a/drivers/usb/phy/phy-tegra-usb.c +++ b/drivers/usb/phy/phy-tegra-usb.c @@ -1090,7 +1090,7 @@ static struct platform_driver tegra_usb_phy_driver = { .driver = { .name = tegra-phy, .owner = THIS_MODULE, - .of_match_table = of_match_ptr(tegra_usb_phy_id_table), + .of_match_table = tegra_usb_phy_id_table, }, }; module_platform_driver(tegra_usb_phy_driver); -- 1.7.9.5 -- 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 4/5] usb: phy: am335x: Remove redundant of_match_ptr
The data structure of_match_ptr() protects is always compiled in. Hence of_match_ptr() is not needed. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/phy/phy-am335x.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-am335x.c b/drivers/usb/phy/phy-am335x.c index c4d614d..b653be8 100644 --- a/drivers/usb/phy/phy-am335x.c +++ b/drivers/usb/phy/phy-am335x.c @@ -91,7 +91,7 @@ static struct platform_driver am335x_phy_driver = { .driver = { .name = am335x-phy-driver, .owner = THIS_MODULE, - .of_match_table = of_match_ptr(am335x_phy_ids), + .of_match_table = am335x_phy_ids, }, }; -- 1.7.9.5 -- 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 1/1] USB: EHCI: tegra: Remove incorrect clk_put
tegra-clk is obtained using devm_clk_get(). Hence clk_put should not be used. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Stephen Warren swar...@nvidia.com --- drivers/usb/host/ehci-tegra.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 78fa76d..e6d8e26 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -388,7 +388,7 @@ static int tegra_ehci_probe(struct platform_device *pdev) err = clk_prepare_enable(tegra-clk); if (err) - goto cleanup_clk_get; + goto cleanup_hcd_create; tegra_periph_reset_assert(tegra-clk); udelay(1); @@ -465,8 +465,6 @@ cleanup_phy: usb_phy_shutdown(hcd-phy); cleanup_clk_en: clk_disable_unprepare(tegra-clk); -cleanup_clk_get: - clk_put(tegra-clk); cleanup_hcd_create: usb_put_hcd(hcd); return err; -- 1.7.9.5 -- 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 1/1] usb: gadget: Remove redundant pci_set_drvdata
Driver core sets driver data to NULL upon failure or remove. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/gadget/amd5536udc.c |2 -- drivers/usb/gadget/goku_udc.c |1 - drivers/usb/gadget/net2280.c|1 - drivers/usb/gadget/pch_udc.c|1 - 4 files changed, 5 deletions(-) diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c index a9a4346..54a1e29 100644 --- a/drivers/usb/gadget/amd5536udc.c +++ b/drivers/usb/gadget/amd5536udc.c @@ -3078,8 +3078,6 @@ static void udc_pci_remove(struct pci_dev *pdev) if (dev-active) pci_disable_device(pdev); - pci_set_drvdata(pdev, NULL); - udc_remove(dev); } diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c index c64deb9..74bb8df 100644 --- a/drivers/usb/gadget/goku_udc.c +++ b/drivers/usb/gadget/goku_udc.c @@ -1701,7 +1701,6 @@ static void goku_remove(struct pci_dev *pdev) if (dev-enabled) pci_disable_device(pdev); - pci_set_drvdata(pdev, NULL); dev-regs = NULL; INFO(dev, unbind\n); diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index 0781bff..9fbc8fe 100644 --- a/drivers/usb/gadget/net2280.c +++ b/drivers/usb/gadget/net2280.c @@ -2680,7 +2680,6 @@ static void net2280_remove (struct pci_dev *pdev) if (dev-enabled) pci_disable_device (pdev); device_remove_file (pdev-dev, dev_attr_registers); - pci_set_drvdata (pdev, NULL); INFO (dev, unbind\n); } diff --git a/drivers/usb/gadget/pch_udc.c b/drivers/usb/gadget/pch_udc.c index 24174e1..32d5e92 100644 --- a/drivers/usb/gadget/pch_udc.c +++ b/drivers/usb/gadget/pch_udc.c @@ -3080,7 +3080,6 @@ static void pch_udc_remove(struct pci_dev *pdev) if (dev-active) pci_disable_device(pdev); kfree(dev); - pci_set_drvdata(pdev, NULL); } #ifdef CONFIG_PM -- 1.7.9.5 -- 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 1/1] usb: dwc3: Remove redundant pci_set_drvdata
Driver core sets driver data to NULL upon failure or remove. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/dwc3/dwc3-pci.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 997ebe4..f41ce36 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c @@ -164,7 +164,6 @@ static int dwc3_pci_probe(struct pci_dev *pci, return 0; err3: - pci_set_drvdata(pci, NULL); platform_device_put(dwc3); err1: pci_disable_device(pci); @@ -179,7 +178,6 @@ static void dwc3_pci_remove(struct pci_dev *pci) platform_device_unregister(glue-dwc3); platform_device_unregister(glue-usb2_phy); platform_device_unregister(glue-usb3_phy); - pci_set_drvdata(pci, NULL); pci_disable_device(pci); } -- 1.7.9.5 -- 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 2/2] usb: gadget: f_eem: Staticize eem_alloc
'eem_alloc' is local to this file. Make it static. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/gadget/f_eem.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/f_eem.c b/drivers/usb/gadget/f_eem.c index d00392d..d61c11d 100644 --- a/drivers/usb/gadget/f_eem.c +++ b/drivers/usb/gadget/f_eem.c @@ -624,7 +624,7 @@ static void eem_unbind(struct usb_configuration *c, struct usb_function *f) usb_free_all_descriptors(f); } -struct usb_function *eem_alloc(struct usb_function_instance *fi) +static struct usb_function *eem_alloc(struct usb_function_instance *fi) { struct f_eem*eem; struct f_eem_opts *opts; -- 1.7.9.5 -- 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 1/2] usb: gadget: f_ecm: Staticize ecm_alloc
'ecm_alloc' is local to this file. Make it static. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/gadget/f_ecm.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/f_ecm.c b/drivers/usb/gadget/f_ecm.c index edab45d..8d9e6f7 100644 --- a/drivers/usb/gadget/f_ecm.c +++ b/drivers/usb/gadget/f_ecm.c @@ -995,7 +995,7 @@ static void ecm_unbind(struct usb_configuration *c, struct usb_function *f) usb_ep_free_request(ecm-notify, ecm-notify_req); } -struct usb_function *ecm_alloc(struct usb_function_instance *fi) +static struct usb_function *ecm_alloc(struct usb_function_instance *fi) { struct f_ecm*ecm; struct f_ecm_opts *opts; -- 1.7.9.5 -- 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 1/1] usb: xhci: Staticize xhci_del_comp_mod_timer
'xhci_del_comp_mod_timer' is local to this file. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/host/xhci-hub.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index fae697e..2b61700 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c @@ -524,7 +524,8 @@ static void xhci_hub_report_usb3_link_state(u32 *status, u32 status_reg) * the compliance mode timer is deleted. A port won't enter * compliance mode if it has previously entered U0. */ -void xhci_del_comp_mod_timer(struct xhci_hcd *xhci, u32 status, u16 wIndex) +static void xhci_del_comp_mod_timer(struct xhci_hcd *xhci, u32 status, + u16 wIndex) { u32 all_ports_seen_u0 = ((1 xhci-num_usb3_ports)-1); bool port_in_u0 = ((status PORT_PLS_MASK) == XDEV_U0); -- 1.7.9.5 -- 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 1/1] usb: host: fsl-mph-dr-of: Staticize local symbols
Local symbols used in this file are made static. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Anatolij Gustschin ag...@denx.de --- drivers/usb/host/fsl-mph-dr-of.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c index 9e0020d..abd5050 100644 --- a/drivers/usb/host/fsl-mph-dr-of.c +++ b/drivers/usb/host/fsl-mph-dr-of.c @@ -24,7 +24,7 @@ struct fsl_usb2_dev_data { enum fsl_usb2_operating_modes op_mode; /* operating mode */ }; -struct fsl_usb2_dev_data dr_mode_data[] = { +static struct fsl_usb2_dev_data dr_mode_data[] = { { .dr_mode = host, .drivers = { fsl-ehci, NULL, NULL, }, @@ -42,7 +42,7 @@ struct fsl_usb2_dev_data dr_mode_data[] = { }, }; -struct fsl_usb2_dev_data *get_dr_mode_data(struct device_node *np) +static struct fsl_usb2_dev_data *get_dr_mode_data(struct device_node *np) { const unsigned char *prop; int i; @@ -75,7 +75,7 @@ static enum fsl_usb2_phy_modes determine_usb_phy(const char *phy_type) return FSL_USB2_PHY_NONE; } -struct platform_device *fsl_usb2_device_register( +static struct platform_device *fsl_usb2_device_register( struct platform_device *ofdev, struct fsl_usb2_platform_data *pdata, const char *name, int id) -- 1.7.9.5 -- 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 1/1] usb: dwc3: Remove duplicate inclusion of otg.h
otg.h header file was included twice. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/dwc3/core.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 577af1b..474162e 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -33,7 +33,6 @@ #include linux/dma-mapping.h #include linux/of.h -#include linux/usb/otg.h #include linux/usb/ch9.h #include linux/usb/gadget.h #include linux/usb/of.h -- 1.7.9.5 -- 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 1/1] usb: samsung: Update Exynos ehci/ohci bindings documentation
Updated the document as per the latest implementation. While at it also fixed some trivial typos. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- .../devicetree/bindings/usb/exynos-usb.txt | 38 +++- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/exynos-usb.txt b/Documentation/devicetree/bindings/usb/exynos-usb.txt index d967ba1..16a2c0f 100644 --- a/Documentation/devicetree/bindings/usb/exynos-usb.txt +++ b/Documentation/devicetree/bindings/usb/exynos-usb.txt @@ -5,13 +5,15 @@ The device node has following properties. EHCI Required properties: - - compatible: should be samsung,exynos4210-ehci for USB 2.0 - EHCI controller in host mode. - - reg: physical base address of the controller and length of memory mapped + - compatible : should be one of the following for USB 2.0 EHCI controller + in host mode: + (a) samsung,exynos5440-ehci for Exynos5440 SoC + (b) samsung,exynos4210-ehci for all other Exynos4 and 5 SoCs + - reg : physical base address of the controller and length of memory mapped region. - - interrupts: interrupt number to the cpu. - - clocks: from common clock binding: handle to usb clock. - - clock-names: from common clock binding: Shall be usbhost. + - interrupts : interrupt number to the CPU. + - clocks : from common clock binding: handle to USB clock. + - clock-names : from common clock binding: Shall be usbhost. Optional properties: - samsung,vbus-gpio: if present, specifies the GPIO that @@ -23,7 +25,7 @@ Example: compatible = samsung,exynos4210-ehci; reg = 0x1211 0x100; interrupts = 0 71 0; - samsung,vbus-gpio = gpx2 6 1 3 3; + samsung,vbus-gpio = gpx2 6 0; clocks = clock 285; clock-names = usbhost; @@ -31,13 +33,15 @@ Example: OHCI Required properties: - - compatible: should be samsung,exynos4210-ohci for USB 2.0 - OHCI companion controller in host mode. - - reg: physical base address of the controller and length of memory mapped + - compatible : should be one of the following for USB 2.0 OHCI companion + controller in host mode: + (a) samsung,exynos5440-ohci for Exynos5440 SoC + (b) samsung,exynos4210-ohci for all other Exynos4 and 5 SoCs + - reg : physical base address of the controller and length of memory mapped region. - - interrupts: interrupt number to the cpu. - - clocks: from common clock binding: handle to usb clock. - - clock-names: from common clock binding: Shall be usbhost. + - interrupts : interrupt number to the CPU. + - clocks : from common clock binding: handle to USB clock. + - clock-names : from common clock binding: Shall be usbhost. Example: usb@1212 { @@ -51,14 +55,14 @@ Example: DWC3 Required properties: - - compatible: should be samsung,exynos5250-dwusb3 for USB 3.0 DWC3 + - compatible : should be samsung,exynos5250-dwusb3 for USB 3.0 DWC3 controller. - #address-cells, #size-cells : should be '1' if the device has sub-nodes with 'reg' property. - - ranges: allows valid 1:1 translation between child's address space and + - ranges : allows valid 1:1 translation between child's address space and parent's address space - - clocks: Clock IDs array as required by the controller. - - clock-names: names of clocks correseponding to IDs in the clock property + - clocks : Clock IDs array as required by the controller. + - clock-names : names of clocks corresponding to IDs in the clock property Sub-nodes: The dwc3 core should be added as subnode to Exynos dwc3 glue. -- 1.7.9.5 -- 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 1/1] usb: phy: samsung: Update usbphy documentation
Updated the documentation as per the latest driver implementation. While at it also fixed some trivial typos. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- .../devicetree/bindings/usb/samsung-usbphy.txt | 48 ++-- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt index 33fd354..62e6f17 100644 --- a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt +++ b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt @@ -1,34 +1,32 @@ SAMSUNG USB-PHY controllers -** Samsung's usb 2.0 phy transceiver +** Samsung's USB 2.0 phy transceiver -The Samsung's usb 2.0 phy transceiver is used for controlling -usb 2.0 phy for s3c-hsotg as well as ehci-s5p and ohci-exynos -usb controllers across Samsung SOCs. +The Samsung's USB 2.0 phy transceiver is used for controlling +USB 2.0 phy for s3c-hsotg as well as ehci-s5p and ohci-exynos +USB controllers across Samsung SOCs. TODO: Adding the PHY binding with controller(s) according to the under development generic PHY driver. Required properties: -Exynos4210: -- compatible : should be samsung,exynos4210-usb2phy -- reg : base physical address of the phy registers and length of memory mapped - region. -- clocks: Clock IDs array as required by the controller. -- clock-names: names of clock correseponding IDs clock property as requested - by the controller driver. - -Exynos5250: -- compatible : should be samsung,exynos5250-usb2phy +- compatible : value should be one among the following: + (a) samsung,s3c64xx-usb2phy for S3C64xx SoCs + (b) samsung,exynos4210-usb2phy for Exynos4210 SoC + (c) samsung,exynos4x12-usb2phy for Exynos4x12 SoCs + (d) samsung,exynos5250-usb2phy for Exynos5250 SoC - reg : base physical address of the phy registers and length of memory mapped region. +- clocks : Clock IDs array as required by the controller. +- clock-names : names of clocks listed in clocks property in the same order + as requested by the controller driver. Optional properties: -- #address-cells: should be '1' when usbphy node has a child node with 'reg' +- #address-cellsi : should be '1' when usbphy node has a child node with 'reg' property. -- #size-cells: should be '1' when usbphy node has a child node with 'reg' +- #size-cells : should be '1' when usbphy node has a child node with 'reg' property. -- ranges: allows valid translation between child's address space and parent's +- ranges : allows valid translation between child's address space and parent's address space. - The child node 'usbphy-sys' to the node 'usbphy' is for the system controller @@ -63,10 +61,10 @@ Example: }; -** Samsung's usb 3.0 phy transceiver +** Samsung's USB 3.0 phy transceiver -Starting exynso5250, Samsung's SoC have usb 3.0 phy transceiver -which is used for controlling usb 3.0 phy for dwc3-exynos usb 3.0 +Starting Exynos5250, Samsung's SoC have USB 3.0 phy transceiver +which is used for controlling USB 3.0 phy for dwc3-exynos USB 3.0 controllers across Samsung SOCs. Required properties: @@ -75,16 +73,16 @@ Exynos5250: - compatible : should be samsung,exynos5250-usb3phy - reg : base physical address of the phy registers and length of memory mapped region. -- clocks: Clock IDs array as required by the controller. -- clock-names: names of clocks correseponding to IDs in the clock property +- clocks : Clock IDs array as required by the controller. +- clock-names : names of clocks correseponding to IDs in the clock property as requested by the controller driver. Optional properties: -- #address-cells: should be '1' when usbphy node has a child node with 'reg' +- #address-cells : should be '1' when usbphy node has a child node with 'reg' property. -- #size-cells: should be '1' when usbphy node has a child node with 'reg' +- #size-cells : should be '1' when usbphy node has a child node with 'reg' property. -- ranges: allows valid translation between child's address space and parent's +- ranges : allows valid translation between child's address space and parent's address space. - The child node 'usbphy-sys' to the node 'usbphy' is for the system controller -- 1.7.9.5 -- 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 1/1] usb: phy: samsung: Fix an error message typo
The error message is common to both clk_get functions. Update it accordingly. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/phy/phy-samsung-usb2.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-samsung-usb2.c b/drivers/usb/phy/phy-samsung-usb2.c index 1011c16..758b86d 100644 --- a/drivers/usb/phy/phy-samsung-usb2.c +++ b/drivers/usb/phy/phy-samsung-usb2.c @@ -388,7 +388,7 @@ static int samsung_usb2phy_probe(struct platform_device *pdev) clk = devm_clk_get(dev, otg); if (IS_ERR(clk)) { - dev_err(dev, Failed to get otg clock\n); + dev_err(dev, Failed to get usbhost/otg clock\n); return PTR_ERR(clk); } -- 1.7.9.5 -- 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 05/10] USB: OHCI: Properly handle ohci-exynos suspend
On 18 June 2013 15:24, Manjunath Goudar manjunath.gou...@linaro.org wrote: On 14 June 2013 01:22, Alan Stern st...@rowland.harvard.edu wrote: On Thu, 13 Jun 2013, Tomasz Figa wrote: + rc = ohci_suspend(hcd, do_wakeup); + if (rc == 0 do_wakeup HCD_WAKEUP_PENDING(hcd)) { + ohci_resume(hcd, false); + rc = -EBUSY; + } I'm not into USB host subsystem, so I might just ask a stupid question. Can't we make ohci_suspend check this for us, so the drivers would just check for error code? It seems like in all your patches this part of code is duplicated, looking as a good candidate to be generic. Argh! You're right, of course. I didn't see it, because the only existing place where this check is made is in the PCI glue layer. Pushing it into the HCDs themselves is obviously the right thing to do. Manjanuth, let's do this. You can write a preliminary patch that puts this check at the end of the ohci_suspend() routine, and then resubmit your series. Alan and Tomaszas you are correct. Initially I also thought same, but later I analyzed this code is not necessary for all bus glue; so I did not write in ohci_suspend() routine. After Alan explanation I am writing below code end of ohci_suspend() routine.is it correct Alan. if (do_wakeup HCD_WAKEUP_PENDING(hcd)) { ohci_resume(hcd, false); rc = -EBUSY; You probably need to return this error code. -- With warm regards, Sachin -- 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 1/1] usb: host: ehci-spear: Fix potential NULL pointer dereferencing
On 22 May 2013 19:50, Alan Stern st...@rowland.harvard.edu wrote: On Wed, 22 May 2013, Sachin Kamat wrote: 'hcd' is dereferenced before NULL check. Move the assignment after the check to avoid potential NULL pointer dereferencing error. Since the pointer in question can never be NULL, you should remove the check entirely instead of moving the reference. OK. Furthermore, the reference you are moving is not a dereference, so it won't cause a problem even if the pointer is NULL. Actually the dereferencing is quite obscure happening inside the nested calls. diff --git a/drivers/usb/host/ehci-spear.c b/drivers/usb/host/ehci-spear.c index f5ac4e2..326bfea 100644 --- a/drivers/usb/host/ehci-spear.c +++ b/drivers/usb/host/ehci-spear.c @@ -146,10 +146,13 @@ fail: static int spear_ehci_hcd_drv_remove(struct platform_device *pdev) { struct usb_hcd *hcd = platform_get_drvdata(pdev); - struct spear_ehci *sehci = to_spear_ehci(hcd); + struct spear_ehci *sehci; if (!hcd) return 0; + + sehci = to_spear_ehci(hcd); + if (in_interrupt()) BUG(); You can remove this test also. This routine will never be called in_interrupt. OK. I will spin a new patch with your suggested changes. Thanks for reviewing. -- With warm regards, Sachin -- 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 1/1] usb: host: ehci-spear: Remove redundant checks
'hcd' can never be NULL and the spear_ehci_hcd_drv_remove routine will never be called in_interrupt. Hence remove these checks. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Viresh Kumar viresh.ku...@linaro.org Cc: Alan Stern st...@rowland.harvard.edu --- Compile tested on linux-next (20130522). --- drivers/usb/host/ehci-spear.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/usb/host/ehci-spear.c b/drivers/usb/host/ehci-spear.c index f5ac4e2..1cf0adb 100644 --- a/drivers/usb/host/ehci-spear.c +++ b/drivers/usb/host/ehci-spear.c @@ -148,10 +148,6 @@ static int spear_ehci_hcd_drv_remove(struct platform_device *pdev) struct usb_hcd *hcd = platform_get_drvdata(pdev); struct spear_ehci *sehci = to_spear_ehci(hcd); - if (!hcd) - return 0; - if (in_interrupt()) - BUG(); usb_remove_hcd(hcd); if (sehci-clk) -- 1.7.9.5 -- 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 1/8] usb: host: ehci-omap: Remove redundant use of of_match_ptr
'omap_ehci_dt_ids' is always compiled in. Hence use of of_match_ptr is unnecessary. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- Series compile tested against linux-next tree (20130521). --- drivers/usb/host/ehci-omap.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index 16d7150..bafa960 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -294,7 +294,7 @@ static struct platform_driver ehci_hcd_omap_driver = { /*.resume = ehci_hcd_omap_resume, */ .driver = { .name = hcd_name, - .of_match_table = of_match_ptr(omap_ehci_dt_ids), + .of_match_table = omap_ehci_dt_ids, } }; -- 1.7.9.5 -- 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 2/8] usb: host: ehci-platform: Remove redundant use of of_match_ptr
'vt8500_ehci_ids' is always compiled in. Hence use of of_match_ptr is unnecessary. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/host/ehci-platform.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index a98dd3b..5733f8e 100644 --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c @@ -223,7 +223,7 @@ static struct platform_driver ehci_platform_driver = { .owner = THIS_MODULE, .name = ehci-platform, .pm = ehci_platform_pm_ops, - .of_match_table = of_match_ptr(vt8500_ehci_ids), + .of_match_table = vt8500_ehci_ids, } }; -- 1.7.9.5 -- 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 3/8] usb: host: ehci-spear: Remove redundant use of of_match_ptr
'spear_ehci_id_table' is always compiled in. Hence use of of_match_ptr is unnecessary. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Viresh Kumar viresh.ku...@linaro.org --- drivers/usb/host/ehci-spear.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-spear.c b/drivers/usb/host/ehci-spear.c index bd3e5cb..f5ac4e2 100644 --- a/drivers/usb/host/ehci-spear.c +++ b/drivers/usb/host/ehci-spear.c @@ -174,7 +174,7 @@ static struct platform_driver spear_ehci_hcd_driver = { .name = spear-ehci, .bus = platform_bus_type, .pm = ehci_spear_pm_ops, - .of_match_table = of_match_ptr(spear_ehci_id_table), + .of_match_table = spear_ehci_id_table, } }; -- 1.7.9.5 -- 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 4/8] usb: host: ehci-orion: Remove redundant use of of_match_ptr
'ehci_orion_dt_ids' is always compiled in. Hence use of of_match_ptr is unnecessary. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Tzachi Perelstein tza...@marvell.com --- drivers/usb/host/ehci-orion.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c index efbc588..1a450aa 100644 --- a/drivers/usb/host/ehci-orion.c +++ b/drivers/usb/host/ehci-orion.c @@ -303,7 +303,7 @@ static struct platform_driver ehci_orion_driver = { .driver = { .name = orion-ehci, .owner = THIS_MODULE, - .of_match_table = of_match_ptr(ehci_orion_dt_ids), + .of_match_table = ehci_orion_dt_ids, }, }; -- 1.7.9.5 -- 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 5/8] usb: host: ohci-omap3: Remove redundant use of of_match_ptr
'omap_ohci_dt_ids' is always compiled in. Hence use of of_match_ptr is unnecessary. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/host/ohci-omap3.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ohci-omap3.c b/drivers/usb/host/ohci-omap3.c index 8663851..8f71357 100644 --- a/drivers/usb/host/ohci-omap3.c +++ b/drivers/usb/host/ohci-omap3.c @@ -252,7 +252,7 @@ static struct platform_driver ohci_hcd_omap3_driver = { .shutdown = ohci_hcd_omap3_shutdown, .driver = { .name = ohci-omap3, - .of_match_table = of_match_ptr(omap_ohci_dt_ids), + .of_match_table = omap_ohci_dt_ids, }, }; -- 1.7.9.5 -- 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 6/8] usb: host: ohci-spear: Remove redundant use of of_match_ptr
'spear_ohci_id_table' is always compiled in. Hence use of of_match_ptr is unnecessary. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Viresh Kumar viresh.ku...@linaro.org --- drivers/usb/host/ohci-spear.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ohci-spear.c b/drivers/usb/host/ohci-spear.c index 8848e25..cc9dd9e 100644 --- a/drivers/usb/host/ohci-spear.c +++ b/drivers/usb/host/ohci-spear.c @@ -230,7 +230,7 @@ static struct platform_driver spear_ohci_hcd_driver = { .driver = { .owner = THIS_MODULE, .name = spear-ohci, - .of_match_table = of_match_ptr(spear_ohci_id_table), + .of_match_table = spear_ohci_id_table, }, }; -- 1.7.9.5 -- 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 7/8] usb: host: uhci-platform: Remove redundant use of of_match_ptr
'platform_uhci_ids' is always compiled in. Hence use of of_match_ptr is unnecessary. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Tony Prisk li...@prisktech.co.nz --- drivers/usb/host/uhci-platform.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/uhci-platform.c b/drivers/usb/host/uhci-platform.c index 90bcf45..e11b70a 100644 --- a/drivers/usb/host/uhci-platform.c +++ b/drivers/usb/host/uhci-platform.c @@ -160,6 +160,6 @@ static struct platform_driver uhci_platform_driver = { .driver = { .name = platform-uhci, .owner = THIS_MODULE, - .of_match_table = of_match_ptr(platform_uhci_ids), + .of_match_table = platform_uhci_ids, }, }; -- 1.7.9.5 -- 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 8/8] usb: phy: phy-nop: Remove redundant use of of_match_ptr
'nop_xceiv_dt_ids' is always compiled in. Hence use of of_match_ptr is unnecessary. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/phy/phy-nop.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-nop.c b/drivers/usb/phy/phy-nop.c index 638cc5d..55445e5d 100644 --- a/drivers/usb/phy/phy-nop.c +++ b/drivers/usb/phy/phy-nop.c @@ -270,7 +270,7 @@ static struct platform_driver nop_usb_xceiv_driver = { .driver = { .name = nop_usb_xceiv, .owner = THIS_MODULE, - .of_match_table = of_match_ptr(nop_xceiv_dt_ids), + .of_match_table = nop_xceiv_dt_ids, }, }; -- 1.7.9.5 -- 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 1/8] usb: host: ehci-omap: Remove redundant use of of_match_ptr
On 21 May 2013 20:26, Alan Stern st...@rowland.harvard.edu wrote: On Tue, 21 May 2013, Sergei Shtylyov wrote: Hello. On 21-05-2013 16:05, Ben Dooks wrote: 'omap_ehci_dt_ids' is always compiled in. Hence use of of_match_ptr is unnecessary. Thought it was defined as tristate in the Kconfig. He talks about certain data structure, not the driver. And he means that it's not enclosed by #ifdef CONFIG_OF. config USB_EHCI_HCD_OMAP tristate EHCI support for OMAP3 and later chips depends on ARCH_OMAP this is hardly 'compiled in' here. And even it is 'always compiled in' we could just leave this in in case it is not always compiled in. See how of_match_ptr() is defined in linux/of.h depending on CONFIG_OF. Maybe instead of removing of_match_ptr, it would be better to enclose the definition of omap_ehci_dt_ids in #ifdef CONFIG_OF/#endif. It looks like that is the way it was intended to be used. Yes, it could have been done that way too. But I thought some these platforms might get converted to DT-only in the near future and adding more ifdefs would not look nice. -- With warm regards, Sachin -- 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 1/8] usb: host: ehci-omap: Remove redundant use of of_match_ptr
On 21 May 2013 22:10, Alan Stern st...@rowland.harvard.edu wrote: On Tue, 21 May 2013, Sachin Kamat wrote: On 21 May 2013 20:26, Alan Stern st...@rowland.harvard.edu wrote: On Tue, 21 May 2013, Sergei Shtylyov wrote: Hello. On 21-05-2013 16:05, Ben Dooks wrote: 'omap_ehci_dt_ids' is always compiled in. Hence use of of_match_ptr is unnecessary. Thought it was defined as tristate in the Kconfig. He talks about certain data structure, not the driver. And he means that it's not enclosed by #ifdef CONFIG_OF. config USB_EHCI_HCD_OMAP tristate EHCI support for OMAP3 and later chips depends on ARCH_OMAP this is hardly 'compiled in' here. And even it is 'always compiled in' we could just leave this in in case it is not always compiled in. See how of_match_ptr() is defined in linux/of.h depending on CONFIG_OF. Maybe instead of removing of_match_ptr, it would be better to enclose the definition of omap_ehci_dt_ids in #ifdef CONFIG_OF/#endif. It looks like that is the way it was intended to be used. Yes, it could have been done that way too. But I thought some these platforms might get converted to DT-only in the near future and adding more ifdefs would not look nice. Okay. You can add to all eight patches: Acked-by: Alan Stern st...@rowland.harvard.edu Thanks Alan. -- With warm regards, Sachin -- 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 1/2] usb: host: fusbh200-hcd: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Yuan-Hsin Chen yhc...@faraday-tech.com --- drivers/usb/host/fusbh200-hcd.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/host/fusbh200-hcd.c b/drivers/usb/host/fusbh200-hcd.c index 79ce799..b17dd3f 100644 --- a/drivers/usb/host/fusbh200-hcd.c +++ b/drivers/usb/host/fusbh200-hcd.c @@ -5907,7 +5907,6 @@ int fusbh200_hcd_fusbh200_remove(struct platform_device *pdev) iounmap(hcd-regs); release_mem_region(hcd-rsrc_start, hcd-rsrc_len); usb_put_hcd(hcd); - platform_set_drvdata(pdev, NULL); return 0; } -- 1.7.9.5 -- 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 2/2] usb: host: fusbh200-hcd: Staticize local symbols
Local symbols referenced only in this file are made static. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/host/fusbh200-hcd.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/fusbh200-hcd.c b/drivers/usb/host/fusbh200-hcd.c index b17dd3f..0855ca4 100644 --- a/drivers/usb/host/fusbh200-hcd.c +++ b/drivers/usb/host/fusbh200-hcd.c @@ -5769,7 +5769,7 @@ static const struct hc_driver fusbh200_fusbh200_hc_driver = { .clear_tt_buffer_complete = fusbh200_clear_tt_buffer_complete, }; -void fusbh200_init(struct fusbh200_hcd *fusbh200) +static void fusbh200_init(struct fusbh200_hcd *fusbh200) { u32 reg; @@ -5895,7 +5895,7 @@ fail_create_hcd: * the HCD's stop() method. It is always called from a thread * context, normally rmmod, apmd, or something similar. */ -int fusbh200_hcd_fusbh200_remove(struct platform_device *pdev) +static int fusbh200_hcd_fusbh200_remove(struct platform_device *pdev) { struct device *dev = pdev-dev; struct usb_hcd *hcd = dev_get_drvdata(dev); @@ -5911,7 +5911,7 @@ int fusbh200_hcd_fusbh200_remove(struct platform_device *pdev) return 0; } -struct platform_driver fusbh200_hcd_fusbh200_driver = { +static struct platform_driver fusbh200_hcd_fusbh200_driver = { .driver = { .name = fusbh200, }, -- 1.7.9.5 -- 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 2/2] usb: host: fusbh200-hcd: Staticize local symbols
Hi, On 20 May 2013 12:13, Yuan-Hsin Chen yuan...@gmail.com wrote: Hi, On Mon, May 20, 2013 at 1:51 PM, Sachin Kamat sachin.ka...@linaro.org wrote: Local symbols referenced only in this file are made static. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Thank you. I believe you probably meant to add your Ack to this series? --- drivers/usb/host/fusbh200-hcd.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/fusbh200-hcd.c b/drivers/usb/host/fusbh200-hcd.c index b17dd3f..0855ca4 100644 --- a/drivers/usb/host/fusbh200-hcd.c +++ b/drivers/usb/host/fusbh200-hcd.c @@ -5769,7 +5769,7 @@ static const struct hc_driver fusbh200_fusbh200_hc_driver = { .clear_tt_buffer_complete = fusbh200_clear_tt_buffer_complete, }; -void fusbh200_init(struct fusbh200_hcd *fusbh200) +static void fusbh200_init(struct fusbh200_hcd *fusbh200) { u32 reg; @@ -5895,7 +5895,7 @@ fail_create_hcd: * the HCD's stop() method. It is always called from a thread * context, normally rmmod, apmd, or something similar. */ -int fusbh200_hcd_fusbh200_remove(struct platform_device *pdev) +static int fusbh200_hcd_fusbh200_remove(struct platform_device *pdev) { struct device *dev = pdev-dev; struct usb_hcd *hcd = dev_get_drvdata(dev); @@ -5911,7 +5911,7 @@ int fusbh200_hcd_fusbh200_remove(struct platform_device *pdev) return 0; } -struct platform_driver fusbh200_hcd_fusbh200_driver = { +static struct platform_driver fusbh200_hcd_fusbh200_driver = { .driver = { .name = fusbh200, }, -- 1.7.9.5 -- 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 -- With warm regards, Sachin -- 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 01/12] usb: chipidea: ci13xxx_imx: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Marek Vasut ma...@denx.de Cc: Alexander Shishkin alexander.shish...@linux.intel.com --- drivers/usb/chipidea/ci13xxx_imx.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/chipidea/ci13xxx_imx.c b/drivers/usb/chipidea/ci13xxx_imx.c index 8faec9d..b8ad556 100644 --- a/drivers/usb/chipidea/ci13xxx_imx.c +++ b/drivers/usb/chipidea/ci13xxx_imx.c @@ -251,8 +251,6 @@ static int ci13xxx_imx_remove(struct platform_device *pdev) clk_disable_unprepare(data-clk); - platform_set_drvdata(pdev, NULL); - return 0; } -- 1.7.9.5 -- 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 02/12] usb: gadget: mv_u3d_core: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Yu Xu y...@marvell.com --- drivers/usb/gadget/mv_u3d_core.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/usb/gadget/mv_u3d_core.c b/drivers/usb/gadget/mv_u3d_core.c index 58288e9..751b17a 100644 --- a/drivers/usb/gadget/mv_u3d_core.c +++ b/drivers/usb/gadget/mv_u3d_core.c @@ -1786,8 +1786,6 @@ static int mv_u3d_remove(struct platform_device *dev) clk_put(u3d-clk); - platform_set_drvdata(dev, NULL); - kfree(u3d); return 0; @@ -1997,7 +1995,6 @@ err_map_cap_regs: err_get_cap_regs: err_get_clk: clk_put(u3d-clk); - platform_set_drvdata(dev, NULL); kfree(u3d); err_alloc_private: err_pdata: -- 1.7.9.5 -- 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 03/12] usb: gadget: pxa27x_udc: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Eric Miao eric.y.m...@gmail.com --- drivers/usb/gadget/pxa27x_udc.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index 6b4c7d9..41cea95 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c @@ -2505,7 +2505,6 @@ static int pxa_udc_remove(struct platform_device *_dev) usb_put_phy(udc-transceiver); udc-transceiver = NULL; - platform_set_drvdata(_dev, NULL); the_controller = NULL; clk_put(udc-clk); iounmap(udc-regs); -- 1.7.9.5 -- 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 04/12] usb: host: ehci-tilegx: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Alan Stern st...@rowland.harvard.edu --- drivers/usb/host/ehci-tilegx.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/host/ehci-tilegx.c b/drivers/usb/host/ehci-tilegx.c index b083a35..d72b292 100644 --- a/drivers/usb/host/ehci-tilegx.c +++ b/drivers/usb/host/ehci-tilegx.c @@ -193,7 +193,6 @@ static int ehci_hcd_tilegx_drv_remove(struct platform_device *pdev) tilegx_stop_ehc(); gxio_usb_host_destroy(pdata-usb_ctx); destroy_irq(pdata-irq); - platform_set_drvdata(pdev, NULL); return 0; } -- 1.7.9.5 -- 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 05/12] usb: host: ohci-da8xx: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/host/ohci-da8xx.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c index 0b815a8..6aaa9c9 100644 --- a/drivers/usb/host/ohci-da8xx.c +++ b/drivers/usb/host/ohci-da8xx.c @@ -401,7 +401,6 @@ static int ohci_hcd_da8xx_drv_remove(struct platform_device *dev) struct usb_hcd *hcd = platform_get_drvdata(dev); usb_hcd_da8xx_remove(hcd, dev); - platform_set_drvdata(dev, NULL); return 0; } -- 1.7.9.5 -- 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 06/12] usb: host: ohci-nxp: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Dmitry Chigirev sou...@mvista.com --- drivers/usb/host/ohci-nxp.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c index f4988fb..292be50 100644 --- a/drivers/usb/host/ohci-nxp.c +++ b/drivers/usb/host/ohci-nxp.c @@ -366,8 +366,6 @@ static int usb_hcd_nxp_remove(struct platform_device *pdev) i2c_unregister_device(isp1301_i2c_client); isp1301_i2c_client = NULL; - platform_set_drvdata(pdev, NULL); - return 0; } -- 1.7.9.5 -- 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 07/12] usb: host: ohci-octeon: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/host/ohci-octeon.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/host/ohci-octeon.c b/drivers/usb/host/ohci-octeon.c index d44430d..342dc7e 100644 --- a/drivers/usb/host/ohci-octeon.c +++ b/drivers/usb/host/ohci-octeon.c @@ -196,8 +196,6 @@ static int ohci_octeon_drv_remove(struct platform_device *pdev) release_mem_region(hcd-rsrc_start, hcd-rsrc_len); usb_put_hcd(hcd); - platform_set_drvdata(pdev, NULL); - return 0; } -- 1.7.9.5 -- 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 08/12] usb: host: ohci-omap: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Tony Lindgren t...@atomide.com --- drivers/usb/host/ohci-omap.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index b1d32fb..8747fa6 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c @@ -498,7 +498,6 @@ static int ohci_hcd_omap_drv_remove(struct platform_device *dev) struct usb_hcd *hcd = platform_get_drvdata(dev); usb_hcd_omap_remove(hcd, dev); - platform_set_drvdata(dev, NULL); return 0; } -- 1.7.9.5 -- 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 12/12] usb: host: uhci-platform: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Tony Prisk li...@prisktech.co.nz --- drivers/usb/host/uhci-platform.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/host/uhci-platform.c b/drivers/usb/host/uhci-platform.c index 8c4dace..55cc116 100644 --- a/drivers/usb/host/uhci-platform.c +++ b/drivers/usb/host/uhci-platform.c @@ -130,7 +130,6 @@ static int uhci_hcd_platform_remove(struct platform_device *pdev) iounmap(hcd-regs); release_mem_region(hcd-rsrc_start, hcd-rsrc_len); usb_put_hcd(hcd); - platform_set_drvdata(pdev, NULL); return 0; } -- 1.7.9.5 -- 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 Resend 2/2] net/usb: r8152: Use module_usb_driver()
module_usb_driver() eliminates boilerplate and simplifies the code. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Realtek linux nic maintainers nic_s...@realtek.com --- drivers/net/usb/r8152.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 8e53e41..d02bac8 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -1748,18 +1748,7 @@ static struct usb_driver rtl8152_driver = { .resume = rtl8152_resume }; -static int __init usb_rtl8152_init(void) -{ - return usb_register(rtl8152_driver); -} - -static void __exit usb_rtl8152_exit(void) -{ - usb_deregister(rtl8152_driver); -} - -module_init(usb_rtl8152_init); -module_exit(usb_rtl8152_exit); +module_usb_driver(rtl8152_driver); MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); -- 1.7.9.5 -- 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 Resend 1/2] net/usb: r8152: Remove redundant version.h header inclusion
version.h header inclusion is not necessary as detected by checkversion.pl. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- This series compile tested on linux-next (20130516). --- drivers/net/usb/r8152.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 14e5198..8e53e41 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -11,7 +11,6 @@ #include linux/signal.h #include linux/slab.h #include linux/module.h -#include linux/version.h #include linux/netdevice.h #include linux/etherdevice.h #include linux/mii.h -- 1.7.9.5 -- 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 1/1] USB: quatech2: Staticize local symbol
'qt2_process_read_urb' is referenced only in this file. Make it static. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/serial/quatech2.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c index 02b0803..b0a9478 100644 --- a/drivers/usb/serial/quatech2.c +++ b/drivers/usb/serial/quatech2.c @@ -523,7 +523,7 @@ static void qt2_process_flush(struct usb_serial_port *port, unsigned char *ch) return; } -void qt2_process_read_urb(struct urb *urb) +static void qt2_process_read_urb(struct urb *urb) { struct usb_serial *serial; struct qt2_serial_private *serial_priv; -- 1.7.9.5 -- 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 1/7] usb: gadget: atmel_usba_udc: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Nicolas Ferre nicolas.fe...@atmel.com --- drivers/usb/gadget/atmel_usba_udc.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index f2a970f..5a5128a 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c @@ -1992,8 +1992,6 @@ err_map_regs: err_get_hclk: clk_put(pclk); - platform_set_drvdata(pdev, NULL); - return ret; } -- 1.7.9.5 -- 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 2/7] usb: gadget: bcm63xx_udc: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Kevin Cernekee cerne...@gmail.com --- drivers/usb/gadget/bcm63xx_udc.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/bcm63xx_udc.c b/drivers/usb/gadget/bcm63xx_udc.c index 6e65182..9780c57 100644 --- a/drivers/usb/gadget/bcm63xx_udc.c +++ b/drivers/usb/gadget/bcm63xx_udc.c @@ -2420,7 +2420,6 @@ static int bcm63xx_udc_remove(struct platform_device *pdev) usb_del_gadget_udc(udc-gadget); BUG_ON(udc-driver); - platform_set_drvdata(pdev, NULL); bcm63xx_uninit_udc_hw(udc); return 0; -- 1.7.9.5 -- 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 3/7] usb: gadget: dummy_hcd: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Alan Stern st...@rowland.harvard.edu --- drivers/usb/gadget/dummy_hcd.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index a792e32..22236ec 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c @@ -1001,7 +1001,6 @@ static int dummy_udc_remove(struct platform_device *pdev) struct dummy*dum = platform_get_drvdata(pdev); usb_del_gadget_udc(dum-gadget); - platform_set_drvdata(pdev, NULL); device_remove_file(dum-gadget.dev, dev_attr_function); return 0; } -- 1.7.9.5 -- 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 4/7] usb: gadget: f_uac2: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Jaswinder Singh jaswinder.si...@linaro.org --- drivers/usb/gadget/f_uac2.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/gadget/f_uac2.c b/drivers/usb/gadget/f_uac2.c index c7468b6..03c1fb6 100644 --- a/drivers/usb/gadget/f_uac2.c +++ b/drivers/usb/gadget/f_uac2.c @@ -456,8 +456,6 @@ static int snd_uac2_remove(struct platform_device *pdev) { struct snd_card *card = platform_get_drvdata(pdev); - platform_set_drvdata(pdev, NULL); - if (card) return snd_card_free(card); -- 1.7.9.5 -- 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 5/7] usb: gadget: imx_udc: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Darius Augulis augulis.dar...@gmail.com --- drivers/usb/gadget/imx_udc.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c index b5cebd6..9b2d24e 100644 --- a/drivers/usb/gadget/imx_udc.c +++ b/drivers/usb/gadget/imx_udc.c @@ -1511,8 +1511,6 @@ static int __exit imx_udc_remove(struct platform_device *pdev) if (pdata-exit) pdata-exit(pdev-dev); - platform_set_drvdata(pdev, NULL); - return 0; } -- 1.7.9.5 -- 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 6/7] usb: gadget: pxa25x_udc: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Eric Miao eric.y.m...@gmail.com --- drivers/usb/gadget/pxa25x_udc.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c index ef47495..95c531d 100644 --- a/drivers/usb/gadget/pxa25x_udc.c +++ b/drivers/usb/gadget/pxa25x_udc.c @@ -2236,7 +2236,6 @@ static int __exit pxa25x_udc_remove(struct platform_device *pdev) dev-transceiver = NULL; } - platform_set_drvdata(pdev, NULL); the_controller = NULL; return 0; } -- 1.7.9.5 -- 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 7/7] usb: gadget: s3c2410_udc: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/gadget/s3c2410_udc.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index d0e75e1..7f5e3a6 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c @@ -1948,8 +1948,6 @@ static int s3c2410_udc_remove(struct platform_device *pdev) iounmap(base_addr); release_mem_region(rsrc_start, rsrc_len); - platform_set_drvdata(pdev, NULL); - if (!IS_ERR(udc_clock) udc_clock != NULL) { clk_disable(udc_clock); clk_put(udc_clock); -- 1.7.9.5 -- 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 1/5] usb: phy: ab8500-usb: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/phy/phy-ab8500-usb.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c index 4acef26..e5eb1b5 100644 --- a/drivers/usb/phy/phy-ab8500-usb.c +++ b/drivers/usb/phy/phy-ab8500-usb.c @@ -892,8 +892,6 @@ static int ab8500_usb_remove(struct platform_device *pdev) else if (ab-mode == USB_PERIPHERAL) ab8500_usb_peri_phy_dis(ab); - platform_set_drvdata(pdev, NULL); - return 0; } -- 1.7.9.5 -- 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 2/5] usb: phy: gpio-vbus-usb: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Philipp Zabel philipp.za...@gmail.com --- drivers/usb/phy/phy-gpio-vbus-usb.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/phy/phy-gpio-vbus-usb.c b/drivers/usb/phy/phy-gpio-vbus-usb.c index 4c76074..1d32af2 100644 --- a/drivers/usb/phy/phy-gpio-vbus-usb.c +++ b/drivers/usb/phy/phy-gpio-vbus-usb.c @@ -343,7 +343,6 @@ err_irq: gpio_free(pdata-gpio_pullup); gpio_free(pdata-gpio_vbus); err_gpio: - platform_set_drvdata(pdev, NULL); kfree(gpio_vbus-phy.otg); kfree(gpio_vbus); return err; @@ -365,7 +364,6 @@ static int __exit gpio_vbus_remove(struct platform_device *pdev) if (gpio_is_valid(pdata-gpio_pullup)) gpio_free(pdata-gpio_pullup); gpio_free(gpio); - platform_set_drvdata(pdev, NULL); kfree(gpio_vbus-phy.otg); kfree(gpio_vbus); -- 1.7.9.5 -- 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 3/5] usb: phy: mv-usb: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Chao Xie chao@marvell.com --- drivers/usb/phy/phy-mv-usb.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/usb/phy/phy-mv-usb.c b/drivers/usb/phy/phy-mv-usb.c index c987bbe..4a6b03c 100644 --- a/drivers/usb/phy/phy-mv-usb.c +++ b/drivers/usb/phy/phy-mv-usb.c @@ -667,7 +667,6 @@ int mv_otg_remove(struct platform_device *pdev) mv_otg_disable(mvotg); usb_remove_phy(mvotg-phy); - platform_set_drvdata(pdev, NULL); return 0; } @@ -850,8 +849,6 @@ err_destroy_workqueue: flush_workqueue(mvotg-qwork); destroy_workqueue(mvotg-qwork); - platform_set_drvdata(pdev, NULL); - return retval; } -- 1.7.9.5 -- 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 4/5] usb: phy: mxs-usb: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Marek Vasut ma...@denx.de --- drivers/usb/phy/phy-mxs-usb.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index 9d4381e..3b64277 100644 --- a/drivers/usb/phy/phy-mxs-usb.c +++ b/drivers/usb/phy/phy-mxs-usb.c @@ -180,8 +180,6 @@ static int mxs_phy_remove(struct platform_device *pdev) usb_remove_phy(mxs_phy-phy); - platform_set_drvdata(pdev, NULL); - return 0; } -- 1.7.9.5 -- 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 5/5] usb: phy: nop: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/phy/phy-nop.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/phy/phy-nop.c b/drivers/usb/phy/phy-nop.c index 2b10cc9..638cc5d 100644 --- a/drivers/usb/phy/phy-nop.c +++ b/drivers/usb/phy/phy-nop.c @@ -254,8 +254,6 @@ static int nop_usb_xceiv_remove(struct platform_device *pdev) usb_remove_phy(nop-phy); - platform_set_drvdata(pdev, NULL); - return 0; } -- 1.7.9.5 -- 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 1/1] usb: phy: samsung: Convert to devm_ioremap_resource()
Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages; so all explicit error messages can be removed from the failure code paths. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/phy/phy-samsung-usb3.c |8 +++- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/usb/phy/phy-samsung-usb3.c b/drivers/usb/phy/phy-samsung-usb3.c index 54f6418..133f3d0 100644 --- a/drivers/usb/phy/phy-samsung-usb3.c +++ b/drivers/usb/phy/phy-samsung-usb3.c @@ -244,11 +244,9 @@ static int samsung_usb3phy_probe(struct platform_device *pdev) return -ENODEV; } - phy_base = devm_request_and_ioremap(dev, phy_mem); - if (!phy_base) { - dev_err(dev, %s: register mapping failed\n, __func__); - return -ENXIO; - } + phy_base = devm_ioremap_resource(dev, phy_mem); + if (IS_ERR(phy_base)) + return PTR_ERR(phy_base); sphy = devm_kzalloc(dev, sizeof(*sphy), GFP_KERNEL); if (!sphy) -- 1.7.4.1 -- 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 1/3] usb: phy: samsung: Convert to devm_ioremap_resource()
Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages; so all explicit error messages can be removed from the failure code paths. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/phy/samsung-usbphy.c |8 +++- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/usb/phy/samsung-usbphy.c b/drivers/usb/phy/samsung-usbphy.c index 6ea5537..967101e 100644 --- a/drivers/usb/phy/samsung-usbphy.c +++ b/drivers/usb/phy/samsung-usbphy.c @@ -787,11 +787,9 @@ static int samsung_usbphy_probe(struct platform_device *pdev) return -ENODEV; } - phy_base = devm_request_and_ioremap(dev, phy_mem); - if (!phy_base) { - dev_err(dev, %s: register mapping failed\n, __func__); - return -ENXIO; - } + phy_base = devm_ioremap_resource(dev, phy_mem); + if (IS_ERR(phy_base)) + return PTR_ERR(phy_base); sphy = devm_kzalloc(dev, sizeof(*sphy), GFP_KERNEL); if (!sphy) -- 1.7.4.1 -- 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 2/3] usb: phy: omap-usb3: Convert to devm_ioremap_resource()
Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages; so all explicit error messages can be removed from the failure code paths. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/phy/omap-usb3.c |8 +++- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/usb/phy/omap-usb3.c b/drivers/usb/phy/omap-usb3.c index fadc0c2..a6e60b1 100644 --- a/drivers/usb/phy/omap-usb3.c +++ b/drivers/usb/phy/omap-usb3.c @@ -212,11 +212,9 @@ static int omap_usb3_probe(struct platform_device *pdev) } res = platform_get_resource_byname(pdev, IORESOURCE_MEM, pll_ctrl); - phy-pll_ctrl_base = devm_request_and_ioremap(pdev-dev, res); - if (!phy-pll_ctrl_base) { - dev_err(pdev-dev, ioremap of pll_ctrl failed\n); - return -ENOMEM; - } + phy-pll_ctrl_base = devm_ioremap_resource(pdev-dev, res); + if (IS_ERR(phy-pll_ctrl_base)) + return PTR_ERR(phy-pll_ctrl_base); phy-dev= pdev-dev; -- 1.7.4.1 -- 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 3/3] usb: phy: omap-control-usb: Convert to devm_ioremap_resource()
Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages; so all explicit error messages can be removed from the failure code paths. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/phy/omap-control-usb.c | 24 +--- 1 files changed, 9 insertions(+), 15 deletions(-) diff --git a/drivers/usb/phy/omap-control-usb.c b/drivers/usb/phy/omap-control-usb.c index 5323b71..1419ced 100644 --- a/drivers/usb/phy/omap-control-usb.c +++ b/drivers/usb/phy/omap-control-usb.c @@ -219,32 +219,26 @@ static int omap_control_usb_probe(struct platform_device *pdev) res = platform_get_resource_byname(pdev, IORESOURCE_MEM, control_dev_conf); - control_usb-dev_conf = devm_request_and_ioremap(pdev-dev, res); - if (!control_usb-dev_conf) { - dev_err(pdev-dev, Failed to obtain io memory\n); - return -EADDRNOTAVAIL; - } + control_usb-dev_conf = devm_ioremap_resource(pdev-dev, res); + if (IS_ERR(control_usb-dev_conf)) + return PTR_ERR(control_usb-dev_conf); if (control_usb-type == OMAP_CTRL_DEV_TYPE1) { res = platform_get_resource_byname(pdev, IORESOURCE_MEM, otghs_control); - control_usb-otghs_control = devm_request_and_ioremap( + control_usb-otghs_control = devm_ioremap_resource( pdev-dev, res); - if (!control_usb-otghs_control) { - dev_err(pdev-dev, Failed to obtain io memory\n); - return -EADDRNOTAVAIL; - } + if (IS_ERR(control_usb-otghs_control)) + return PTR_ERR(control_usb-otghs_control); } if (control_usb-type == OMAP_CTRL_DEV_TYPE2) { res = platform_get_resource_byname(pdev, IORESOURCE_MEM, phy_power_usb); - control_usb-phy_power = devm_request_and_ioremap( + control_usb-phy_power = devm_ioremap_resource( pdev-dev, res); - if (!control_usb-phy_power) { - dev_dbg(pdev-dev, Failed to obtain io memory\n); - return -EADDRNOTAVAIL; - } + if (IS_ERR(control_usb-phy_power)) + return PTR_ERR(control_usb-phy_power); control_usb-sys_clk = devm_clk_get(control_usb-dev, sys_clkin); -- 1.7.4.1 -- 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 1/1] usb: gadget: fsl_udc_core: Use module_platform_driver_probe macro
module_platform_driver_probe() eliminates the boilerplate and simplifies the code. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Li Yang le...@freescale.com --- drivers/usb/gadget/fsl_udc_core.c | 16 +--- 1 files changed, 1 insertions(+), 15 deletions(-) diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c index 04d5fef..f523897 100644 --- a/drivers/usb/gadget/fsl_udc_core.c +++ b/drivers/usb/gadget/fsl_udc_core.c @@ -2747,21 +2747,7 @@ static struct platform_driver udc_driver = { }, }; -static int __init udc_init(void) -{ - printk(KERN_INFO %s (%s)\n, driver_desc, DRIVER_VERSION); - return platform_driver_probe(udc_driver, fsl_udc_probe); -} - -module_init(udc_init); - -static void __exit udc_exit(void) -{ - platform_driver_unregister(udc_driver); - printk(KERN_WARNING %s unregistered\n, driver_desc); -} - -module_exit(udc_exit); +module_platform_driver_probe(udc_driver, fsl_udc_probe); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR(DRIVER_AUTHOR); -- 1.7.4.1 -- 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 1/1] usb: gadget: s3c-hsotg: Use devm_regulator_bulk_get API
devm_regulator_bulk_get is device managed and saves some cleanup and exit code. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/gadget/s3c-hsotg.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 439c3f9..4485690 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -3572,7 +3572,7 @@ static int s3c_hsotg_probe(struct platform_device *pdev) for (i = 0; i ARRAY_SIZE(hsotg-supplies); i++) hsotg-supplies[i].supply = s3c_hsotg_supply_names[i]; - ret = regulator_bulk_get(dev, ARRAY_SIZE(hsotg-supplies), + ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(hsotg-supplies), hsotg-supplies); if (ret) { dev_err(dev, failed to request supplies: %d\n, ret); @@ -3662,8 +3662,6 @@ err_ep_mem: kfree(eps); err_supplies: s3c_hsotg_phy_disable(hsotg); - regulator_bulk_free(ARRAY_SIZE(hsotg-supplies), hsotg-supplies); - err_clk: clk_disable_unprepare(hsotg-clk); @@ -3688,7 +3686,6 @@ static int s3c_hsotg_remove(struct platform_device *pdev) } s3c_hsotg_phy_disable(hsotg); - regulator_bulk_free(ARRAY_SIZE(hsotg-supplies), hsotg-supplies); clk_disable_unprepare(hsotg-clk); -- 1.7.4.1 -- 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 1/1] usb: dwc3: Use devm_kzalloc
devm_kzalloc is device managed and makes error handling and cleanup simpler. While at it also fixed the return value when platform_device_alloc failed in probe function. Cc: Anton Tikhomirov av.tikhomi...@samsung.com Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- Compile tested on linux-next tree. --- drivers/usb/dwc3/dwc3-exynos.c | 13 - 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c index aae5328..db3bd49 100644 --- a/drivers/usb/dwc3/dwc3-exynos.c +++ b/drivers/usb/dwc3/dwc3-exynos.c @@ -98,10 +98,10 @@ static int dwc3_exynos_probe(struct platform_device *pdev) int ret = -ENOMEM; - exynos = kzalloc(sizeof(*exynos), GFP_KERNEL); + exynos = devm_kzalloc(pdev-dev, sizeof(*exynos), GFP_KERNEL); if (!exynos) { dev_err(pdev-dev, not enough memory\n); - goto err0; + return -ENOMEM; } /* @@ -117,13 +117,13 @@ static int dwc3_exynos_probe(struct platform_device *pdev) ret = dwc3_exynos_register_phys(exynos); if (ret) { dev_err(pdev-dev, couldn't register PHYs\n); - goto err1; + return ret; } dwc3 = platform_device_alloc(dwc3, PLATFORM_DEVID_AUTO); if (!dwc3) { dev_err(pdev-dev, couldn't allocate dwc3 device\n); - goto err1; + return -ENOMEM; } clk = clk_get(pdev-dev, usbdrd30); @@ -164,9 +164,6 @@ err4: clk_put(clk); err3: platform_device_put(dwc3); -err1: - kfree(exynos); -err0: return ret; } @@ -181,8 +178,6 @@ static int dwc3_exynos_remove(struct platform_device *pdev) clk_disable(exynos-clk); clk_put(exynos-clk); - kfree(exynos); - return 0; } -- 1.7.4.1 -- 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 1/1] usb: dwc3: Use devm_kzalloc
On 12 December 2012 16:51, Felipe Balbi ba...@ti.com wrote: On Wed, Dec 12, 2012 at 04:13:15PM +0530, Sachin Kamat wrote: devm_kzalloc is device managed and makes error handling and cleanup simpler. While at it also fixed the return value when platform_device_alloc failed in probe function. Cc: Anton Tikhomirov av.tikhomi...@samsung.com Signed-off-by: Sachin Kamat sachin.ka...@linaro.org what's wrong with http://www.spinics.net/lists/linux-usb/msg74326.html ? Looks good to me though the creation of '*dev' was not really necessary. I had not looked at the above patch. Please ignore mine. -- balbi -- With warm regards, Sachin -- 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 1/1] usb: musb: Remove duplicate inclusion of linux/of.h
ping On 19 November 2012 17:03, Sachin Kamat sachin.ka...@linaro.org wrote: linux/of.h was included twice. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/usb/musb/musb_dsps.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 7185eb0..96cb84a 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -31,7 +31,6 @@ #include linux/init.h #include linux/io.h -#include linux/of.h #include linux/err.h #include linux/platform_device.h #include linux/dma-mapping.h -- 1.7.4.1 -- With warm regards, Sachin -- 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