summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/max3421-hcd.c
Commit message (Collapse)AuthorAgeFilesLines
* USB: add SPDX identifiers to all remaining files in drivers/usb/Greg Kroah-Hartman2017-11-041-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>
* usb: host: max3421-hcd: Remove pdata test in max3421_hub_control()Jules Maselbas2017-11-011-13/+2
| | | | | | | | | | | | We do not have to test if platform_data pointer is null in max3421_hub_control(), as the driver probe will fail if no platform_data is found. Fixes: 721fdc83b31b ("usb: max3421: Add devicetree support") Signed-off-by: Jules Maselbas <jules.maselbas@grenoble-inp.org> Reported-by: Julia Lawall <julia.lawall@lip6.fr> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: max3421: Add devicetree supportJules Maselbas2017-10-041-1/+86
| | | | | | | Adds support for devicetree to the max3421 driver. Signed-off-by: Jules Maselbas <jules.maselbas@grenoble-inp.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: host: max3421-hcd: constify hc_driver structuresJulia Lawall2017-07-301-1/+1
| | | | | | | | | | | The hc_driver structure is only passed as the first argument to usb_create_hcd, which is declared as const. Thus the hc_driver structure itself can be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: host: max3421-hcd: don't print on ENOMEMWolfram Sang2016-08-301-6/+2
| | | | | | | All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: host: max3421-hcd: fix mask of IO control registerJaewon Kim2016-08-091-1/+1
| | | | | | | | | | GPIO control register is divided into IOPINS1 and IOPINS2. And low 4-bit of register is controls output. So, this patch fixes wrong mask of GPIO output. Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: host: max3421-hcd: use list_for_each_entry*Geliang Tang2016-01-241-11/+5
| | | | | | | | Use list_for_each_entry*() instead of list_for_each*() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* spi: Drop owner assignment from spi_driversAndrew F. Davis2015-10-281-1/+0
| | | | | | | | | An spi_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* max3421-hcd: use USB_DT_HUBSergei Shtylyov2015-04-031-1/+1
| | | | | | | | Fix using the bare number to set the 'bDescriptorType' field of the Hub Descriptor while the value is #define'd in <linux/usb/ch11.h>. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* max3421-hcd: use HUB_CHAR_*Sergei Shtylyov2015-01-251-1/+2
| | | | | | | | Fix using the bare number to set the 'wHubCharacteristics' field of the Hub Descriptor while the values are #define'd in <linux/usb/ch11.h>. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: host: max3421-hcd: use time_after()Asaf Vertz2015-01-091-1/+2
| | | | | | | | | To be future-proof and for better readability the time comparisons are modified to use time_after() instead of plain, error-prone math. Signed-off-by: Asaf Vertz <asaf.vertz@tandemg.com> Acked-by: David Mosberger <davidm@egauge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: host: max3421-hcd: unconditionally use GFP_ATOMIC in max3421_urb_enqueue()Alexey Khoroshilov2014-07-091-1/+1
| | | | | | | | | | | As far as kzalloc() is called with spinlock held, we have to pass GFP_ATOMIC regardless of mem_flags argument. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Acked-by: David Mosberger <davidm@egauge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: host: max3421-hcd: Fix max3421_reset_port() to set USB_PORT_STAT_RESETDavid Mosberger-Tang2014-07-091-0/+1
| | | | | Signed-off-by: David Mosberger <davidm@egauge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: host: max3421-hcd: Use atomic bitops in lieu of bit fieldsDavid Mosberger-Tang2014-07-091-25/+20
| | | | | | | Bit fields are not MP-safe. Signed-off-by: David Mosberger <davidm@egauge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: host: max3421-hcd: Use module_spi_driverSachin Kamat2014-05-291-14/+1
| | | | | | | | | module_spi_driver simplifies the code by eliminating boilerplate code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: David Mosberger <davidm@egauge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: host: max3421-hcd: Allow platform-data to specify Vbus polarityDavid Mosberger-Tang2014-05-291-2/+4
| | | | | Signed-off-by: Davidm Mosberger <davidm@egauge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: host: max3421-hcd: fix "spi_rd8" uses dynamic stack allocation warningDavid Mosberger-Tang2014-05-291-34/+60
| | | | | | | | | | | | kmalloc the SPI rx and tx data buffers. This appears to be the only portable way to guarantee that the buffers are DMA-safe (e.g., in separate DMA cache-lines). This patch makes the spi_rdX()/spi_wrX() non-reentrant, but that's OK because calls to them are guaranteed to be serialized by the per-HCD SPI-thread. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: David Mosberger <davidm@egauge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: host: max3421-hcd: Fix missing unlock in max3421_urb_enqueue()David Mosberger-Tang2014-05-281-2/+5
| | | | | | Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David Mosberger <davidm@egauge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: host: max3421-hcd: Fix potential NULL urb dereferenceDavid Mosberger-Tang2014-05-281-1/+3
| | | | | | Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David Mosberger <davidm@egauge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Add support for using a MAX3421E chip as a host driver.David Mosberger2014-05-271-0/+1937
Signed-off-by: David Mosberger <davidm@egauge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud