summaryrefslogtreecommitdiff
path: root/drivers/usb/host/max3421-hcd.c
AgeCommit message (Collapse)Author
2016-08-30usb: host: max3421-hcd: don't print on ENOMEMWolfram Sang
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>
2016-08-09usb: host: max3421-hcd: fix mask of IO control registerJaewon Kim
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>
2016-01-24usb: host: max3421-hcd: use list_for_each_entry*Geliang Tang
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>
2015-10-28spi: Drop owner assignment from spi_driversAndrew F. Davis
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>
2015-04-03max3421-hcd: use USB_DT_HUBSergei Shtylyov
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>
2015-01-25max3421-hcd: use HUB_CHAR_*Sergei Shtylyov
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>
2015-01-09usb: host: max3421-hcd: use time_after()Asaf Vertz
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>
2014-07-09usb: host: max3421-hcd: unconditionally use GFP_ATOMIC in max3421_urb_enqueue()Alexey Khoroshilov
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>
2014-07-09usb: host: max3421-hcd: Fix max3421_reset_port() to set USB_PORT_STAT_RESETDavid Mosberger-Tang
Signed-off-by: David Mosberger <davidm@egauge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09usb: host: max3421-hcd: Use atomic bitops in lieu of bit fieldsDavid Mosberger-Tang
Bit fields are not MP-safe. Signed-off-by: David Mosberger <davidm@egauge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-29usb: host: max3421-hcd: Use module_spi_driverSachin Kamat
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>
2014-05-29usb: host: max3421-hcd: Allow platform-data to specify Vbus polarityDavid Mosberger-Tang
Signed-off-by: Davidm Mosberger <davidm@egauge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-29usb: host: max3421-hcd: fix "spi_rd8" uses dynamic stack allocation warningDavid Mosberger-Tang
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>
2014-05-28usb: host: max3421-hcd: Fix missing unlock in max3421_urb_enqueue()David Mosberger-Tang
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>
2014-05-28usb: host: max3421-hcd: Fix potential NULL urb dereferenceDavid Mosberger-Tang
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>
2014-05-27Add support for using a MAX3421E chip as a host driver.David Mosberger
Signed-off-by: David Mosberger <davidm@egauge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>