aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/usb251xb.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-11-04USB: misc: Remove redundant license textGreg Kroah-Hartman1-10/+0
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: Keith Packard <keithp@keithp.com> Cc: Juergen Stuber <starblue@users.sourceforge.net> Cc: Cesar Miquel <miquel@df.uba.ar> Cc: Richard Leitner <richard.leitner@skidata.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-Hartman1-0/+1
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-01usb: usb251xb: Use GPIO descriptor consumer interfaceSerge Semin1-20/+13
The driver used to be developed with legacy GPIO API support. It's better to use descriptor-based interface for several reasons. First of all the legacy API doesn't support the ACTIVE_LOW/HIGH flag of dts nodes, which is essential since different hardware may have different GPIOs connectivity including the logical value inversion. Secondly, by requesting the reset GPIO descriptor the driver prevent the other applications from changing its value. And last but not least the legacy GPIO interface should be avoided in the new code due to it obsolescence. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01usb: usb251xb: Add max power/current dts property supportSerge Semin1-4/+20
This parameters may be varied in accordance with hardware specifics. So lets add the corresponding settings to the usb251xb driver dts specification. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01usb: usb251xb: Fix property_u32 NULL pointer dereferenceSerge Semin1-7/+7
The methods like of_property_read_u32 utilizing the specified pointer permit only the pointer to a preallocated u32 storage as the third argument. As a result the driver crashes on NULL pointer dereference in case if "oc-delay-us" or "power-on-time-ms" declared in dts file. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01usb: usb251xb: Add USB2517 LED settingsSerge Semin1-0/+12
USB2517 supports two LED modes: USB mode and speed (default) indication mode. The last one can be switched on by corresponding dts property. Since USB251xb hubs doesn't support LEDs settings, we need to ignore this setting. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01usb: usb251xb: Add battery enable setting flagSerge Semin1-0/+9
Battery charging settings are supported by USB251xb hubs only. USB2517i isn't one of them. So we need to reflect it within the device-specific data structure. The driver doesn't support dts property changing this setting, but instead defaults it with zero. So the flag isn't used anywhere in the driver, but still can be helpful in future, when necessity of the corresponding dts setting arises. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01usb: usb251xb: Add 5,6,7 ports boost settingsSerge Semin1-5/+10
USB electrical signaling drive strength boost bit is also supported by USB2517 hub. Since it got three addition ports, the designers needed to add one more register for initialization. It turned out to be formerly reserved 0xF7. As before we just initialize it with default zeros. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Acked-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01usb: usb251xb: Add 5,6,7 ports mapping def settingSerge Semin1-1/+11
USB2517 got three additionl downstream ports, which can as well be mapped to another logical ports. USB251xb driver currently doesn't fully support such setting configuration from dts file. This patch doesn't change this, but adds usb2517 spcific ports default liner mapping. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Acked-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01usb: usb251xb: Add USB251x specific port count settingSerge Semin1-3/+21
USB251xb as well as USB2517 datasheet states, that all these hubs differ by number of ports declared as the last digit in the model name. So USB2512 got two ports, USB2513 - three, and so on. Such setting must be reflected in the device specific data structure and corresponding dts property should be checked whether it doesn't get out of available ports. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01usb: usb251xb: Add USB2517i specific struct and IDsSerge Semin1-2/+21
There are USB2517 and USB2517i hubs, which have almost the same registers space as already supported USB251xBi series. The difference it in DIDs and in a few functions. This patch adds the USB2517/i data structures to the driver, so it would have different setting depending on the device discovered on i2c-bus. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-22USB: misc: remove unneeded MODULE_VERSION() usageGreg Kroah-Hartman1-1/+0
MODULE_VERSION is useless for in-kernel drivers, so just remove all usage of it in the USB misc drivers. Along with this, some DRIVER_VERSION macros were removed as they are also pointless. Cc: Keith Packard <keithp@keithp.com> Cc: Juergen Stuber <starblue@users.sourceforge.net> Cc: Cesar Miquel <miquel@df.uba.ar> Acked-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09usb: usb251xb: dt: add unit suffix to oc-delay and power-on-timeRichard Leitner1-15/+20
Rename oc-delay-* to oc-delay-us and make it expect a time value. Furthermore add -ms suffix to power-on-time. There changes were suggested by Rob Herring in https://lkml.org/lkml/2017/2/15/1283. Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09usb: usb251xb: remove max_{power,current}_{sp,bp} propertiesRichard Leitner1-20/+4
Remove the max_{power,current}_{sp,bp} properties of the usb251xb driver from devicetree. This is done to simplify the dt bindings as requested by Rob Herring in https://lkml.org/lkml/2017/2/15/1283. If those properties are ever needed by somebody they can be enabled again easily. Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-14usb: misc: add USB251xB/xBi Hi-Speed Hub Controller DriverRichard Leitner1-0/+605
This patch adds a driver for configuration of the Microchip USB251xB/xBi USB 2.0 hub controller series with USB 2.0 upstream connectivity, SMBus configuration interface and two to four USB 2.0 downstream ports. Furthermore add myself as a maintainer for this driver. The datasheet can be found at the manufacturers website, see [1]. All device-tree exposed configuration features have been tested on a i.MX6 platform with a USB2512B hub. [1] http://ww1.microchip.com/downloads/en/DeviceDoc/00001692C.pdf Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>