aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-01-18usb: chipidea: fix static checker warning for NULL pointerPeter Chen1-1/+2
During the static checker, "data->usbmisc_data" may be NULL. Fix it by adding this pointer judgement before using. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Peter Chen <peter.chen@nxp.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-11usb: chipidea: imx: allow to configure oc polarity on i.MX25Uwe Kleine-König1-0/+15
Up to now the polarity of the over current pin was hard coded to active high. Use the already defined device tree properties to configure polarity on i.MX25, too. In difference to i.MX6/7 use active high behavior if the polarity is unspecified to keep compatibility to existing device trees. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-12-11usb: chipidea: imx: Warn if oc polarity isn't specifiedUwe Kleine-König1-0/+2
The polarity of the over current detection pin isn't configured on i.MX6/7 if it's unspecified in the device tree. So the actual configuration depends on bootloader behavior which is bad. So encourage users to fix their device tree by issuing a warning in this case. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-12-11usb: chipidea: imx: support configuring for active low oc signalUwe Kleine-König3-12/+40
The status quo on i.MX6 is that if "over-current-active-high" is specified in the device tree this is configured as expected. If the property is missing polarity isn't changed and so the polarity is kept as setup by the bootloader. Reset default is active high, so active low can only be used with help by the bootloader. On i.MX7 it is similar, but there disabling of over current detection has a similar inconsistency. This patch introduces a new property that allows to explicitly configure for active low over current detection and consistently sets this up. In the absence of an explicit configuration the bit is kept as is. On i.MX7 over current detection is used unless disabled in the device tree. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-12-11usb: chipidea: host: override ehci->hub_controlPeter Chen1-0/+75
The chipidea controller has some special requirements during suspend/resume, override common ehci->hub_control to implement it. Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de> Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-12-11usb: chipidea: imx: add HSIC supportPeter Chen3-19/+270
To support imx HSIC, there are some special requirement: - The HSIC pad is 1.2v, it may need to supply from external - The data/strobe pin needs to be pulled down first, and after host mode is initialized, the strobe pin needs to be pulled up - During the USB suspend/resume, special setting is needed Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de> Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-12-11usb: chipidea: add flag for imx hsic implementationPeter Chen1-0/+17
NXP (Freecale) imx HSIC design has some special requirements, add some flags at host code to handle them. Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de> Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-09-20usb: chipidea: Fix otg event handlerLoic Poulain1-3/+6
At OTG work running time, it's possible that several events need to be addressed (e.g. ID and VBUS events). The current implementation handles only one event at a time which leads to ignoring the other one. Fix it. Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-09-20usb: chipidea: Prevent unbalanced IRQ disableLoic Poulain1-1/+2
The ChipIdea IRQ is disabled before scheduling the otg work and re-enabled on otg work completion. However if the job is already scheduled we have to undo the effect of disable_irq int order to balance the IRQ disable-depth value. Fixes: be6b0c1bd0be ("usb: chipidea: using one inline function to cover queue work operations") Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-09-20usb: chipidea: Add dynamic pinctrl selectionLoic Poulain3-0/+37
Some hardware implementations require to configure pins differently according to the USB role (host/device), this can be an update of the pins routing or a simple GPIO value change. This patch introduces new optional "host" and "device" pinctrls. If these pinctrls are defined by the device, they are respectively selected on host/device role start. If a default pinctrl exist, it is restored on host/device role stop. Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-09-20usb: chipidea: imx: make MODULE_LICENCE and SPDX-identifier matchMarcus Folkesson2-2/+2
The SPDX-License-Identifier is set to GPL-2.0+, which correspond to MODULE_LICENSE "GPL". Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-09-20usb: chipidea: imx: enable OTG overcurrent in case USB subsystem is already startedNicolas Adell1-0/+2
When initializing the USB subsystem before starting the kernel, OTG overcurrent detection is disabled. In case the OTG polarity of overcurrent is low active, the overcurrent detection is never enabled again and events cannot be reported as expected. Because imx usb overcurrent polarity is low active by default, only detection needs to be enable in usbmisc init function. Signed-off-by: Nicolas Adell <nicolas.adell@actia.fr> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-09-20usb: chipidea: imx: do not use preprocessor conditionals for PMMarcus Folkesson1-11/+6
Use preprocessor conditionals for CONFIG_PM and CONFIG_PM_SLEEP is not necessary since SET_SYSTEM_SLEEP_PM_OPS and SET_RUNTIME_PM_OPS does that internally. It is also the preferred way according to our coding style guidelines. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-07-30Merge 4.18-rc7 into usb-nextGreg Kroah-Hartman4-18/+5
We want the USB fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-28Merge tag 'usb-ci-v4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-nextGreg Kroah-Hartman1-2/+2
Peter writes: One patch to enable USB Ethernet gadget at Tegra platforms
2018-07-05usb: chipidea: Always build ULPI codeFabio Estevam4-18/+5
Commit 03e6275ae381 ("usb: chipidea: Fix ULPI on imx51") causes a kernel hang on imx51 systems that use the ULPI interface and do not select the CONFIG_USB_CHIPIDEA_ULPI option. In order to avoid such potential misuse, let's always build the chipidea ULPI code into the final ci_hdrc object. Tested on a imx51-babbage board. Fixes: 03e6275ae381 ("usb: chipidea: Fix ULPI on imx51") Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-06-26usb: chipidea: tegra: Use aligned DMA on Tegra114/124Marcel Ziswiler1-2/+2
USB Ethernet gadget now works on Tegra114 and Tegra124. Similar to commit 061e20e9899e ("usb: chipidea: tegra: Use aligned DMA on Tegra30"). Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-06-26usb: chipidea: host: fix disconnection detect issuePeter Chen1-1/+4
The commit 4e88d4c08301 ("usb: add a flag to skip PHY initialization to struct usb_hcd") delete the assignment for hcd->usb_phy, it causes usb_phy_notify_connect{disconnect) are not called, the USB PHY driver is not notified of hot plug event, then the disconnection will not be detected by hardware. Fixes: 4e88d4c08301 ("usb: add a flag to skip PHY initialization to struct usb_hcd") Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reported-by: Mats Karrman <mats.dev.list@gmail.com> Tested-by: Mats Karrman <mats.dev.list@gmail.com> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-05-31USB: chipidea: no need to check return value of debugfs_create functionsGreg Kroah-Hartman3-45/+17
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Acked-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-31usb: chipidea: Fix ULPI on imx51Andrey Smirnov1-1/+2
Workaround introduced for i.MX53 in be9cae2479f48 ("usb: chipidea: imx: Fix ULPI on imx53") seems to be applicable in case of i.MX51 as well. Running latest kernel on ZII RDU1 Board (imx51-zii-rdu1.dts) exhibits a kernel frozen on PORTSC access and applying the workaround resolves the issue. Fixes: be9cae2479f4 ("usb: chipidea: imx: Fix ULPI on imx53") Cc: Peter Chen <peter.chen@nxp.com> Cc: Lucas Stach <l.stach@pengutronix.de> Cc: Chris Healy <cphealy@gmail.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linux-usb@vger.kernel.org Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Tested-By: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-29usb: chipidea: imx: Fix ULPI on imx53Sebastian Reichel1-0/+12
Traditionally, PORTSC should be set before initializing ULPI phys. But setting PORTSC before powering on the phy results in a kernel freeze on imx53 based GE PPD. As a workaround this initializes the phy early in the imx platform code and disables phy power management from the core. Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-29usb: chipidea: imx: Cleanup ci_hdrc_imx_platform_flagSebastian Reichel1-2/+1
Some trivial cleanups, that do not change functionality. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-29usb: chipidea: usbmisc: small clean upMichael Trimarchi1-2/+1
The register write can be done outside the if and else condition Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-29usb: chipidea: usbmisc: evdo can be set e/o resetMichael Trimarchi1-8/+12
evdo bit can be set or reset. We can not trust evdo bit status after bootloader stage Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-29usb: chipidea: usbmisc: evdo is only specific to OTG portMichael Trimarchi1-0/+3
The USB_PHY_CTRL_FUNC is used specific for OTG port as described in user manual. EVDO need to be set only for index 0 that correspond to OTG port Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-09usb: add a flag to skip PHY initialization to struct usb_hcdMartin Blumenstingl1-4/+2
The USB HCD core driver parses the device-tree node for "phys" and "usb-phys" properties. It also manages the power state of these PHYs automatically. However, drivers may opt-out of this behavior by setting "phy" or "usb_phy" in struct usb_hcd to a non-null value. An example where this is required is the "Qualcomm USB2 controller", implemented by the chipidea driver. The hardware requires that the PHY is only powered on after the "reset completed" event from the controller is received. A follow-up patch will allow the USB HCD core driver to manage more than one PHY. Add a new "skip_phy_initialization" bitflag to struct usb_hcd so drivers can opt-out of any PHY management provided by the USB HCD core driver. This also updates the existing drivers so they use the new flag if they want to opt out of the PHY management provided by the USB HCD core driver. This means that for these drivers the new "multiple PHY" handling (which will be added in a follow-up patch) will be disabled as well. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Acked-by: Peter Chen <peter.chen@nxp.com> Tested-by: Neil Armstrong <narmstrong@baylibre.con> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-09USB: chipidea: Re-use DEFINE_SHOW_ATTRIBUTE() macroAndy Shevchenko1-60/+5
...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Cc: Peter Chen <Peter.Chen@nxp.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-24USB: move many drivers to use DEVICE_ATTR_WOGreg Kroah-Hartman1-2/+2
Instead of "open coding" a DEVICE_ATTR() define, use the DEVICE_ATTR_WO() macro instead, which does everything properly instead. This does require a few static functions to be renamed to work properly, but thanks to a script from Joe Perches, this was easily done. Reported-by: Joe Perches <joe@perches.com> Cc: Peter Chen <Peter.Chen@nxp.com> Cc: Valentina Manea <valentina.manea.m@gmail.com> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Johan Hovold <johan@kernel.org> Acked-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-24USB: move many drivers to use DEVICE_ATTR_RWGreg Kroah-Hartman2-13/+12
Instead of "open coding" a DEVICE_ATTR() define, use the DEVICE_ATTR_RW() macro instead, which does everything properly instead. This does require a few static functions to be renamed to work properly, but thanks to a script from Joe Perches, this was easily done. Reported-by: Joe Perches <joe@perches.com> Cc: Matthieu CASTET <castet.matthieu@free.fr> Cc: Stanislaw Gruszka <stf_xl@wp.pl> Cc: Peter Chen <Peter.Chen@nxp.com> Cc: Mathias Nyman <mathias.nyman@intel.com> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-10Merge tag 'usb-ci-v4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-nextGreg Kroah-Hartman1-1/+1
Peter writes: Just one small update: Use aligned DMA on Tegra30, and USB Ethernet gadget now works on it.
2017-12-21usb: chipidea: tegra: Use aligned DMA on Tegra30Dmitry Osipenko1-1/+1
USB Ethernet gadget now works on Tegra30. Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2017-12-13USB: chipidea: msm: fix ulpi-node lookupJohan Hovold1-1/+1
Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at the parent rather than just matching on its children. Note that the original premature free of the parent node has already been fixed separately, but that fix was apparently never backported to stable. Fixes: 47654a162081 ("usb: chipidea: msm: Restore wrapper settings after reset") Fixes: b74c43156c0c ("usb: chipidea: msm: ci_hdrc_msm_probe() missing of_node_get()") Cc: stable <stable@vger.kernel.org> # 4.10: b74c43156c0c Cc: Stephen Boyd <stephen.boyd@linaro.org> Cc: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2017-11-13Merge tag 'usb-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usbLinus Torvalds20-103/+25
Pull USB/PHY updates from Greg KH: "Here is the big set of USB and PHY driver updates for 4.15-rc1. There is the usual amount of gadget and xhci driver updates, along with phy and chipidea enhancements. There's also a lot of SPDX tags and license boilerplate cleanups as well, which provide some churn in the diffstat. Other major thing is the typec code that moved out of staging and into the "real" part of the drivers/usb/ tree, which was nice to see happen. All of these have been in linux-next with no reported issues for a while" * tag 'usb-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (263 commits) usb: gadget: f_fs: Fix use-after-free in ffs_free_inst USB: usbfs: compute urb->actual_length for isochronous usb: core: message: remember to reset 'ret' to 0 when necessary USB: typec: Remove remaining redundant license text USB: typec: add SPDX identifiers to some files USB: renesas_usbhs: rcar?.h: add SPDX tags USB: chipidea: ci_hdrc_tegra.c: add SPDX line USB: host: xhci-debugfs: add SPDX lines USB: add SPDX identifiers to all remaining Makefiles usb: host: isp1362-hcd: remove a couple of redundant assignments USB: adutux: remove redundant variable minor usb: core: add a new usb_get_ptm_status() helper usb: core: add a 'type' parameter to usb_get_status() usb: core: introduce a new usb_get_std_status() helper usb: core: rename usb_get_status() 'type' argument to 'recip' usb: core: add Status Type definitions USB: gadget: Remove redundant license text USB: gadget: function: Remove redundant license text USB: gadget: udc: Remove redundant license text USB: gadget: legacy: Remove redundant license text ...
2017-11-07USB: chipidea: ci_hdrc_tegra.c: add SPDX lineGreg Kroah-Hartman1-0/+1
The license text was removed from this file, yet they somehow missed the big "add SPDX tags to all files" sweep due to them being new. So add the proper SPDX license tag to them, based on the original license text in the file. Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Jonathan Hunter <jonathanh@nvidia.com> Acked-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-07USB: chipidea: Remove redundant license textGreg Kroah-Hartman19-102/+1
Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Jonathan Hunter <jonathanh@nvidia.com> Acked-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-04USB: add SPDX identifiers to all remaining files in drivers/usb/Greg Kroah-Hartman18-0/+18
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/usb/ and include/linux/usb* files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman3-0/+3
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-26usb: chipidea: fix trivial typo in KconfigChristoph Fritz1-1/+1
This patch fixes a trivial typo to get the module name ci_hdrc.ko correct. Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2017-09-21usb: chipidea: do charger detection in vbus sessionLi Jun1-0/+4
In case the usb phy has the capability to detect usb charger type, do it when vbus is on. Signed-off-by: Li Jun <jun.li@nxp.com> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2017-08-28usb: chipidea: usb2: check memory allocation failureChristophe JAILLET1-0/+2
Check memory allocation failure and return -ENOMEM in such a case, as already done few lines below for another memory allocation. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-28Merge tag 'usb-ci-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-nextGreg Kroah-Hartman5-7/+163
Peter writes: Chipidea changes for v4.14-rc1 - Add chipidea support at Nvidia SoCs - Improvement for extcon support - Some code refines
2017-08-24usb: chipidea: Add support for Tegra20/30/114/124Thierry Reding2-0/+156
All of these Tegra SoC generations have a ChipIdea UDC IP block that can be used for device mode communication with a host. Implement rudimentary support that doesn't allow switching between host and device modes. Tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Thierry Reding <treding@nvidia.com> [digetx@gmail.com: rebased patches and added DMA alignment quirk for Tegra20] Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Acked-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2017-08-24usb: chipidea: udc: Support SKB alignment quirkDmitry Osipenko1-0/+3
NVIDIA Tegra20 UDC can't cope with unaligned DMA and require a USB gadget quirk that avoids SKB buffer alignment to be set in order to make Ethernet Gadget working. Later Tegra generations do not require that quirk. Let's add a new platform data flag that allows to enable USB gadget quirk for platforms that require it. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Acked-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2017-08-10usb: chipidea: constify attribute_group structures.Arvind Yadav1-1/+1
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-10usb: chipidea: otg_fsm: constify attribute_group structures.Arvind Yadav1-1/+1
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-25usb: chipidea: core: do not register extcon notifier if extcon device is not existedPeter Chen1-2/+2
This issue is detected when the system has another device driver which registers USB connector extcon device, fix it by adding extcon device check. Signed-off-by: Peter Chen <peter.chen@nxp.com>
2017-07-22USB: chipidea: remove unneeded MODULE_VERSION() usageGreg Kroah-Hartman1-1/+0
MODULE_VERSION is useless for in-kernel drivers, so remove the use of it in the chipidea CI13XXX driver. Acked-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-19usb: chipidea: msm: ci_hdrc_msm_probe() missing of_node_get()Frank Rowand1-1/+1
Boot fails for qcom-apq8074-dragonboard on 4.13-rc1 with error: OF: ERROR: Bad of_node_put() on /soc/usb@f9a55000 The error will occur if the configuration is set to: CONFIG_OF_OVERLAY y CONFIG_OF_UNITTEST y CONFIG_OF_DYNAMIC y CONFIG_OF_RESOLVE y If CONFIG_OF_DYNAMIC is enabled then of_node_release() detects an attempt to release a node that is still attached to the device tree. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2017-07-19usb: chipidea: udc: compress return logic into lineGustavo A. R. Silva1-4/+1
Simplify return logic to avoid unnecessary variable assignment. This issue was detected using Coccinelle and the following semantic patch: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Peter Chen <peter.chen@nxp.com>
2017-06-27Merge tag 'usb-ci-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-nextGreg Kroah-Hartman1-8/+21
Peter writes: One patch to improve error handling at chipidea core