Re: [PATCH v10 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-08 Thread Peter Rosin
Andy, there's a question for you below. On 2018-09-08 02:09, Ajay Gupta wrote: > Latest NVIDIA GPU card has USB Type-C interface. There is a > Type-C controller which can be accessed over I2C. > > This driver adds I2C bus driver to communicate with Type-C controller. > I2C client driver will be p

[PATCH v4 0/8] usb: dwc3: Fix broken BULK stream support to dwc3 gadget driver

2018-09-08 Thread Anurag Kumar Vulisha
These patch series fixes the broken BULK streaming support in dwc3 gadget driver. Changes in v4: 1. Corrected the commit messgae and stream timeout description as suggested by "Thinh Nguyen" Changes in v3: 1. Added the changes suggested by "Thinh Nguyen" Changes in v2:

[PATCH v4 4/8] usb: dwc3: implement stream transfer timeout

2018-09-08 Thread Anurag Kumar Vulisha
According to dwc3 databook when streams are used, it may be possible for the host and device become out of sync, where device may wait for host to issue prime transcation and host may wait for device to issue erdy. To avoid such deadlock, timeout needs to be implemented. After timeout occurs, devic

[PATCH v4 3/8] usb: dwc3: make controller clear transfer resources after complete

2018-09-08 Thread Anurag Kumar Vulisha
To start transfer with another stream id, controller needs to free previously allocated transfer resource. This will be automatically done by the controller at the time of XferComplete Event. This patch updates the code to issue XferComplete event once all transfers are done by setting LST bit in t

[PATCH v4 2/8] usb: dwc3: update stream id in depcmd

2018-09-08 Thread Anurag Kumar Vulisha
For stream capable endpoints, stream id related information needs to be updated into DEPCMD while issuing START TRANSFER. This patch does the same. Signed-off-by: Anurag Kumar Vulisha Reviewed-by: Thinh Nguyen --- Changes in v4: 1. None Changes in v3: 1. None Changes in v2:

[PATCH v4 5/8] usb: dwc3: don't issue no-op trb for stream capable endpoints

2018-09-08 Thread Anurag Kumar Vulisha
The stream capable endpoints require stream id to be given when issuing START TRANSFER. While issuing no-op trb the stream id is not yet known, so don't issue no-op trb's on stream capable endpoints. Signed-off-by: Anurag Kumar Vulisha Reviewed-by: Thinh Nguyen --- Changes in v4: 1. Non

[PATCH v4 8/8] usb: dwc3: Check MISSED ISOC bit only for ISOC endpoints

2018-09-08 Thread Anurag Kumar Vulisha
When streaming is enabled on BULK endpoints and LST bit is set observed MISSED ISOC bit set in event->status for BULK ep. Since this bit is only valid for isocronous endpoints, changed the code to check for isocrnous endpoints when MISSED ISOC bit is set. Signed-off-by: Anurag Kumar Vulisha Revie

[PATCH v4 7/8] usb: dwc3: Check for IOC/LST bit in both event->status and TRB->ctrl fields

2018-09-08 Thread Anurag Kumar Vulisha
The present code in dwc3_gadget_ep_reclaim_completed_trb() will check for IOC/LST bit in the event->status and returns if IOC/LST bit is set. This logic doesn't work if multiple TRBs are queued per request and the IOC/LST bit is set on the last TRB of that request. Consider an example where a queue

[PATCH v4 1/8] usb: dwc3: Correct the logic for checking TRB full in __dwc3_prepare_one_trb()

2018-09-08 Thread Anurag Kumar Vulisha
Availability of TRB's is calculated using dwc3_calc_trbs_left(), which determines total available TRB's based on the HWO bit set in a TRB. In the present code, __dwc3_prepare_one_trb() is called with a TRB which needs to be prepared for transfer. This __dwc3_prepare_one_trb() calls dwc3_calc_trbs_

[PATCH v4 6/8] usb: dwc3: check for requests in started list for stream capable endpoints

2018-09-08 Thread Anurag Kumar Vulisha
For stream capable endpoints, uas layer can queue mulpile requests on single ep with different stream ids. So, there can be multiple pending requests waiting to be transferred. This patch changes the code to check for any pending requests waiting to be transferred on ep started_list and calls __dwc

Re: [PATCH v9 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-08 Thread Peter Rosin
On 2018-09-08 16:13, Ajay Gupta wrote: > > Hi Peter, > > . > >> SMBUS has nothing to do with the >problem, that was just an example. An I2C >> >client driver can issue such I2C xfers all by >itself without going through >> emulation, so >just dropping the _EMUL flag is not the >answer. And

Re: [PATCH v9 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-08 Thread Ajay Gupta
Hi Peter, . >SMBUS has nothing to do with the >problem, that was just an example. An I2C >>client driver can issue such I2C xfers all by >itself without going through >emulation, so >just dropping the _EMUL flag is not the >answer. And I'd be >surprised if the >hardware doesn't support s

Re: [PATCH] usb: typec: Group all TCPCI/TCPM code together

2018-09-08 Thread Guenter Roeck
On 09/08/2018 04:12 AM, Hans de Goede wrote: HI, On 07-09-18 18:19, Guenter Roeck wrote: On Fri, Sep 07, 2018 at 05:06:12PM +0300, Heikki Krogerus wrote: On Fri, Sep 07, 2018 at 06:35:12AM -0700, Guenter Roeck wrote: On 09/07/2018 05:56 AM, Heikki Krogerus wrote: Moving all the drivers that

[PATCH] option: Improve Quectel EP06 detection

2018-09-08 Thread Kristian Evensen
The Quectel EP06 (and EM06/EG06) LTE modem supports updating the USB configuration, without the VID/PID or configuration number changing. When the configuration is updated and interfaces are added/removed, the interface numbers are updated. This causes our current code for matching EP06 not to work

Re: [PATCH] usb: typec: Group all TCPCI/TCPM code together

2018-09-08 Thread Hans de Goede
HI, On 07-09-18 18:19, Guenter Roeck wrote: On Fri, Sep 07, 2018 at 05:06:12PM +0300, Heikki Krogerus wrote: On Fri, Sep 07, 2018 at 06:35:12AM -0700, Guenter Roeck wrote: On 09/07/2018 05:56 AM, Heikki Krogerus wrote: Moving all the drivers that depend on the Port Controller Manager under a