RE: [PATCH v7 00/11] usb: musb: adding multi instance support

2012-08-03 Thread Ajay Gupta
Hi, > On 03.08.2012 02:54, B, Ravi wrote: > >> On 02.08.2012 14:12, Ravi Babu wrote: > >>> This series of patches adds, > >>> a) Multi instances support in musb driver > >>> b) DT support for musb_dsps glue layer > >>> c) DT support for NOP transceiver > >>> > >>> AM33xx and TI81xx has dual musb co

XHCI: URB not cancelled during disconnect of a MSC device

2012-09-12 Thread Ajay Gupta
Hi, I am using v3.5 kernel and running a test where I disconnect a SS MSC device while a big file is being written to it. I am also watching the lsusb output in parallel. Expectation is that SS MSC device should immediately disappear from lsusb output but sometime I see that SS MSC is listed for 3

Re: XHCI: URB not cancelled during disconnect of a MSC device

2012-09-12 Thread Ajay Gupta
Hi, >> I am using v3.5 kernel and running a test where I disconnect >> a SS MSC device while a big file is being written to it. I am >> also watching the lsusb output in parallel. Expectation is >> that SS MSC device should immediately disappear from lsusb >> output but sometime I see that SS MSC i

Re: XHCI: URB not cancelled during disconnect of a MSC device

2012-09-13 Thread Ajay Gupta
Hi Sarah On Thu, Sep 13, 2012 at 2:37 AM, Sarah Sharp wrote: > On Wed, Sep 12, 2012 at 03:36:39PM +0530, Ajay Gupta wrote: >> Hi, >> >> I am using v3.5 kernel and running a test where I disconnect a SS MSC >> device while a big file is being written to it. I am also w

Re: XHCI: URB not cancelled during disconnect of a MSC device

2012-09-13 Thread Ajay Gupta
Hi >> >> I am using v3.5 kernel and running a test where I disconnect a SS MSC >> >> device while a big file is being written to it. I am also watching the >> >> lsusb output in parallel. Expectation is that SS MSC device should >> >> immediately disappear from lsusb output but sometime I see that

RE: XHCI: URB not cancelled during disconnect of a MSC device

2012-09-24 Thread Ajay Gupta
Hi, > Ajay, which host controller are you seeing the disconnect lags on? Can you > send me the output of `sudo lspci -vvv -n`? I was on leave last week so will get the data at earliest. Ajay > > Sarah Sharp > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in the > b

RE: [PATCH v2 0/2] usb: typec: ucsi: Support for DP alt mode

2019-03-25 Thread Ajay Gupta
Hi Heikki, > -Original Message- > From: linux-usb-ow...@vger.kernel.org On > Behalf Of Heikki Krogerus > Sent: Wednesday, March 20, 2019 4:45 AM > To: Ajay Gupta ; Michael Hsu > Cc: linux-usb@vger.kernel.org > Subject: [PATCH v2 0/2] usb: typec: ucsi: Support fo

[PATCH 2/2] usb: typec: Add driver for NVIDIA Alt Modes

2019-04-10 Thread Ajay Gupta
From: Ajay Gupta Latest NVIDIA GPUs support VirtualLink device. Since USBIF has not assigned a Standard ID (SID) for VirtualLink so using NVIDA VID 0x955 as SVID. Signed-off-by: Ajay Gupta --- drivers/usb/typec/altmodes/Kconfig | 10 +++ drivers/usb/typec/altmodes/Makefile | 2

[PATCH 1/2] usb: typec: displayport: Export probe and remove functions

2019-04-10 Thread Ajay Gupta
d two warnings from checkpatch.pl script -Ajay] Signed-off-by: Heikki Krogerus Signed-off-by: Ajay Gupta Tested-by: Ajay Gupta --- drivers/usb/typec/altmodes/displayport.c | 12 +++- drivers/usb/typec/altmodes/displayport.h | 8 2 files changed, 15 insertions(+), 5 deletions(-) c

[PATCH 0/2] Add VirtualLink display altmode support

2019-04-10 Thread Ajay Gupta
l and patches at [1] forwarded to Greg from you. [1] https://marc.info/?l=linux-usb&m=155488414908414&w=2 Thanks Ajay Ajay Gupta (1): usb: typec: Add driver for NVIDIA Alt Modes Heikki Krogerus (1): usb: typec: displayport: Export probe and remove functions drivers/usb/typec/alt

[PATCH v6 1/2] usb: typec: ucsi: ccg: add get_fw_info function

2019-04-11 Thread Ajay Gupta
Function is to get the details of ccg firmware and device version. It will be useful in debugging and also during firmware update. Signed-off-by: Ajay Gupta Signed-off-by: Heikki Krogerus --- Changes from v5 to v6 - None drivers/usb/typec/ucsi/ucsi_ccg.c | 66

[PATCH v6 0/2] Add support for firmware update on Cypres CCGx

2019-04-11 Thread Ajay Gupta
://marc.info/?l=linux-usb&m=155491396220133&w=2 [2] https://marc.info/?l=linux-usb&m=155006182508289&w=2 Ajay Gupta (2): usb: typec: ucsi: ccg: add get_fw_info function usb: typec: ucsi: ccg: add firmware flashing support drivers/usb/typec/ucsi/ucsi_ccg.c | 887 +

[PATCH v6 2/2] usb: typec: ucsi: ccg: add firmware flashing support

2019-04-11 Thread Ajay Gupta
port number information is added which is required while sending PD_PORT_ENABLE command Signed-off-by: Ajay Gupta --- Changes from v5 to v6 - Fixed below sparse warnings "restricted __le16 degrades to integer" drivers/usb/typec/ucsi/ucsi_c

RE: [PATCH 2/4] usb: typec: ucsi: ccg: add firmware flashing support

2019-04-11 Thread Ajay Gupta
Hi Heikki, > -Original Message- > From: Heikki Krogerus > Sent: Thursday, April 11, 2019 12:40 AM > To: Ajay Gupta > Cc: kbuild test robot ; kbuild-...@01.org; Greg Kroah-Hartman > ; linux-usb@vger.kernel.org > Subject: Re: [PATCH 2/4] usb: typec: ucsi: ccg:

RE: [PATCH v6 2/2] usb: typec: ucsi: ccg: add firmware flashing support

2019-04-12 Thread Ajay Gupta
Hi Heikki, > -Original Message- > From: linux-usb-ow...@vger.kernel.org On > Behalf Of Heikki Krogerus > Sent: Friday, April 12, 2019 8:02 AM > To: Ajay Gupta > Cc: linux-usb@vger.kernel.org; Ajay Gupta > Subject: Re: [PATCH v6 2/2] usb: typec: ucsi: ccg:

[PATCH v7 0/3] Add support for firmware update on Cypres CCGx

2019-04-12 Thread Ajay Gupta
tails are at [2]. Please help review this set. Thanks Ajay [1] https://marc.info/?l=linux-usb&m=155508466310059&w=2 [2] https://marc.info/?l=linux-usb&m=155006182508289&w=2 Ajay Gupta (2): usb: typec: ucsi: ccg: add get_fw_info function usb: typec: ucsi: ccg: add firmware flashi

[PATCH v7 1/3] usb: typec: ucsi: ccg: add get_fw_info function

2019-04-12 Thread Ajay Gupta
Function is to get the details of ccg firmware and device version. It will be useful in debugging and also during firmware update. Signed-off-by: Ajay Gupta Signed-off-by: Heikki Krogerus --- Changes from v6 to v7 - None drivers/usb/typec/ucsi/ucsi_ccg.c | 66

[PATCH v7 2/3] i2c: nvidia-gpu: Supply CCGx driver the fw build info

2019-04-12 Thread Ajay Gupta
From: Heikki Krogerus Adding device property "ccgx,firmware-build" for the CCGx device, so the CCGx driver knows which firmware binary to use for a specific vendor. Signed-off-by: Heikki Krogerus Signed-off-by: Ajay Gupta --- drivers/i2c/busses/i2c-nvidia-gpu.c | 7 +++ 1 file

[PATCH v7 3/3] usb: typec: ucsi: ccg: add firmware flashing support

2019-04-12 Thread Ajay Gupta
port number information is added which is required while sending PD_PORT_ENABLE command Signed-off-by: Ajay Gupta --- Changes from v6 -> v7 - Read fw_build from device property - remove unused level ccg_check_fw_version() drivers/usb/typec/ucsi/ucsi_ccg.c |

RE: [PATCH v2 6/7] usb: typec: displayport: Export probe and remove functions

2019-04-15 Thread Ajay Gupta
Hi Heikki, > -Original Message- > From: linux-usb-ow...@vger.kernel.org On > Behalf Of Heikki Krogerus > Sent: Monday, April 15, 2019 5:10 AM > To: Greg Kroah-Hartman > Cc: Ajay Gupta ; linux-usb@vger.kernel.org > Subject: [PATCH v2 6/7] usb: typec: displayport: Ex

[PATCH v8 0/3] Add support for firmware update on Cypres CCGx

2019-04-16 Thread Ajay Gupta
://marc.info/?l=linux-usb&m=15554931927&w=2 [2] https://marc.info/?l=linux-usb&m=155006182508289&w=2 Ajay Gupta (2): usb: typec: ucsi: ccg: add get_fw_info function usb: typec: ucsi: ccg: add firmware flashing support Heikki Krogerus (1): i2c: nvidia-gpu: Supply CCGx driver t

[PATCH v8 1/3] usb: typec: ucsi: ccg: add get_fw_info function

2019-04-16 Thread Ajay Gupta
From: Ajay Gupta Function is to get the details of ccg firmware and device version. It will be useful in debugging and also during firmware update. Signed-off-by: Ajay Gupta Signed-off-by: Heikki Krogerus --- Changes from v7 -> v8 - None drivers/usb/typec/ucsi/ucsi_ccg.c |

[PATCH v8 2/3] i2c: nvidia-gpu: Supply CCGx driver the fw build info

2019-04-16 Thread Ajay Gupta
From: Ajay Gupta Adding device property "ccgx,firmware-build" for the CCGx device, so the CCGx driver knows which firmware binary to use for a specific vendor. Suggested-by: Heikki Krogerus Signed-off-by: Ajay Gupta Signed-off-by: Heikki Krogerus --- Changes from v7->v8

[PATCH v8 3/3] usb: typec: ucsi: ccg: add firmware flashing support

2019-04-16 Thread Ajay Gupta
From: Ajay Gupta CCGx has two copies of the firmware in addition to the bootloader. If the device is running FW1, FW2 can be updated with the new version. Dual firmware mode allows the CCG device to stay in a PD contract and support USB PD and Type-C functionality while a firmware update is in

RE: [PATCH -next] usb: typec: ucsi: ccg: fix missing unlock on error in ccg_cmd_write_flash_row()

2019-04-29 Thread Ajay Gupta
Hi Wei > -Original Message- > From: Wei Yongjun > Sent: Monday, April 29, 2019 5:27 AM > To: Heikki Krogerus ; Greg Kroah-Hartman > ; Ajay Gupta ; Wolfram Sang > > Cc: Wei Yongjun ; linux-usb@vger.kernel.org; > kernel-janit...@vger.kernel.org > Subject: [PA

[PATCH 2/4] usb: typec: ucsi: ccg: enable runtime pm support

2019-05-17 Thread Ajay Gupta
From: Ajay Gupta The change enables runtime pm support to UCSI CCG driver. ucsi_send_command() is used in resume path and so exported ucsi_send_command() symbol in ucsi.c for modular build. Signed-off-by: Ajay Gupta --- drivers/usb/typec/ucsi/ucsi.c | 1 + drivers/usb/typec/ucsi

[PATCH 1/4] i2c: nvidia-gpu: add runtime pm support

2019-05-17 Thread Ajay Gupta
From: Ajay Gupta Enable runtime pm support with autosuspend delay of three second. This is to make sure I2C client device Cypress CCGx has completed all transaction. Signed-off-by: Ajay Gupta --- drivers/i2c/busses/i2c-nvidia-gpu.c | 24 +--- 1 file changed, 21 insertions

[PATCH 4/4] usb: typec: ucsi: ccg: add runtime pm workaround

2019-05-17 Thread Ajay Gupta
From: Ajay Gupta Cypress USB Type-C CCGx controller firmware verson 3.1.10 (which is being used in many NVIDIA GPU cards) has known issue of not triggering interrupt when a USB device is hot plugged to runtime resume the controller. Many of these cards may get latest kernel but may not get

[PATCH 0/4] usb: typec: ucsi: ccg: add runtime pm support

2019-05-17 Thread Ajay Gupta
s new kernel then also it should continue to work. Thanks Ajay Ajay Gupta (4): i2c: nvidia-gpu: add runtime pm support usb: typec: ucsi: ccg: enable runtime pm support i2c: nvidia-gpu: resume ccgx i2c client usb: typec: ucsi: ccg: add runtime pm workaround drivers/i2c/busses/i2c-nvidia-gpu.c

[PATCH 3/4] i2c: nvidia-gpu: resume ccgx i2c client

2019-05-17 Thread Ajay Gupta
From: Ajay Gupta Cypress USB Type-C CCGx controller firmware (which is being used in many NVIDIA GPU cards) has known issue of not triggering interrupt when a USB device is hot plugged to runtime resume the controller. Many of these cards may get latest kernel but may not get latest fixed

RE: [PATCH 1/4] i2c: nvidia-gpu: add runtime pm support

2019-05-20 Thread Ajay Gupta
Hi Wolfram, > -Original Message- > From: Wolfram Sang > Sent: Sunday, May 19, 2019 7:47 AM > To: Ajay Gupta > Cc: heikki.kroge...@linux.intel.com; linux-usb@vger.kernel.org; linux- > i...@vger.kernel.org; Ajay Gupta > Subject: Re: [PATCH 1/4] i2c: nvidia-gpu: a

RE: [PATCH 3/4] i2c: nvidia-gpu: resume ccgx i2c client

2019-05-20 Thread Ajay Gupta
Hi Wolfram, > -Original Message- > From: Wolfram Sang > Sent: Sunday, May 19, 2019 7:49 AM > To: Ajay Gupta > Cc: heikki.kroge...@linux.intel.com; linux-usb@vger.kernel.org; linux- > i...@vger.kernel.org; Ajay Gupta > Subject: Re: [PATCH 3/4] i2c: nvidia-gpu: r

[PATCH v2 4/5] i2c: nvidia-gpu: resume ccgx i2c client

2019-05-20 Thread Ajay Gupta
From: Ajay Gupta Cypress USB Type-C CCGx controller firmware version 3.1.10 (which is being used in many NVIDIA GPU cards) has known issue of not triggering interrupt when a USB device is hot plugged to runtime resume the controller. If any GPU card gets latest kernel with runtime pm support but

[PATCH v2 2/5] i2c: nvidia-gpu: add runtime pm support

2019-05-20 Thread Ajay Gupta
From: Ajay Gupta Enable runtime pm support with autosuspend delay of three second. This is to make sure I2C client device Cypress CCGx has completed all transaction. Signed-off-by: Ajay Gupta --- Changes from v1->v2: None drivers/i2c/busses/i2c-nvidia-gpu.c | 19 ++- 1 f

[PATCH v2 0/5] usb: typec: ucsi: ccg: add runtime pm support

2019-05-20 Thread Ajay Gupta
eries. Thanks Ajay Ajay Gupta (5): i2c: nvidia-gpu: refactor master_xfer i2c: nvidia-gpu: add runtime pm support usb: typec: ucsi: ccg: enable runtime pm support i2c: nvidia-gpu: resume ccgx i2c client usb: typec: ucsi: ccg: add runtime pm workaround drivers/i2c/busses/i2c-nvidia-

[PATCH v2 5/5] usb: typec: ucsi: ccg: add runtime pm workaround

2019-05-20 Thread Ajay Gupta
From: Ajay Gupta Cypress USB Type-C CCGx controller firmware version 3.1.10 (which is being used in many NVIDIA GPU cards) has known issue of not triggering interrupt when a USB device is hot plugged to runtime resume the controller. If any GPU card gets latest kernel with runtime pm support but

[PATCH v2 1/5] i2c: nvidia-gpu: refactor master_xfer

2019-05-20 Thread Ajay Gupta
From: Ajay Gupta Added a local variable "send_stop" to simplify "goto" statements. The "send_stop" handles below two case 1) When first i2c start fails and so i2c stop is not sent before exiting 2) When i2c stop failed after all transfers and we do not need to se

[PATCH v2 3/5] usb: typec: ucsi: ccg: enable runtime pm support

2019-05-20 Thread Ajay Gupta
From: Ajay Gupta The change enables runtime pm support to UCSI CCG driver. ucsi_send_command() is used in resume path and so exported ucsi_send_command() symbol in ucsi.c for modular build. Signed-off-by: Ajay Gupta --- Changes from v1->v2 : None drivers/usb/typec/ucsi/ucsi.c |

RE: [PATCH v2 3/5] usb: typec: ucsi: ccg: enable runtime pm support

2019-05-21 Thread Ajay Gupta
Hi Heikki > > +static int ucsi_ccg_resume(struct device *dev) { > > + struct i2c_client *client = to_i2c_client(dev); > > + struct ucsi_ccg *uc = i2c_get_clientdata(client); > > + struct ucsi *ucsi = uc->ucsi; > > + struct ucsi_control c; > > + int ret; > > + > > + /* restore UCSI noti

[PATCH v3 1/5] i2c: nvidia-gpu: refactor master_xfer

2019-05-22 Thread Ajay Gupta
From: Ajay Gupta Added a local variable "send_stop" to simplify "goto" statements. The "send_stop" handles below two case 1) When first i2c start fails and so i2c stop is not sent before exiting 2) When i2c stop failed after all transfers and we do not need to se

[PATCH v3 4/5] i2c: nvidia-gpu: resume ccgx i2c client

2019-05-22 Thread Ajay Gupta
From: Ajay Gupta Cypress USB Type-C CCGx controller firmware version 3.1.10 (which is being used in many NVIDIA GPU cards) has known issue of not triggering interrupt when a USB device is hot plugged to runtime resume the controller. If any GPU card gets latest kernel with runtime pm support but

[PATCH v3 3/5] usb: typec: ucsi: ccg: enable runtime pm support

2019-05-22 Thread Ajay Gupta
From: Ajay Gupta The change enables runtime pm support to UCSI CCG driver. Added ucsi_resume() function to enable notification after system reusme. Exported both ucsi_resume() and ucsi_send_command() symbols in ucsi.c for modular build. Signed-off-by: Ajay Gupta --- Changes from v2->v3 : N

[PATCH v3 0/5] usb: typec: ucsi: ccg: add runtime pm support

2019-05-22 Thread Ajay Gupta
me pm wokaround. I would prefer it to go through usb-tree since usb ucsi_ccg driver is the main driver getting runtime pm functionality with the series. Thanks Ajay Ajay Gupta (5): i2c: nvidia-gpu: refactor master_xfer i2c: nvidia-gpu: add runtime pm support usb: typec: ucsi: ccg: enable runti

[PATCH v3 2/5] i2c: nvidia-gpu: add runtime pm support

2019-05-22 Thread Ajay Gupta
From: Ajay Gupta Enable runtime pm support with autosuspend delay of three second. This is to make sure I2C client device Cypress CCGx has completed all transaction. Signed-off-by: Ajay Gupta --- Changes from v1->v2: - Added __maybe_unused in gpu_i2c_suspend to avoid warn

[PATCH v3 5/5] usb: typec: ucsi: ccg: add runtime pm workaround

2019-05-22 Thread Ajay Gupta
From: Ajay Gupta Cypress USB Type-C CCGx controller firmware version 3.1.10 (which is being used in many NVIDIA GPU cards) has known issue of not triggering interrupt when a USB device is hot plugged to runtime resume the controller. If any GPU card gets latest kernel with runtime pm support but

RE: [PATCH v3 2/5] i2c: nvidia-gpu: add runtime pm support

2019-05-28 Thread Ajay Gupta
Hi Wolfram, > -Original Message- > From: linux-usb-ow...@vger.kernel.org > On Behalf Of Wolfram Sang > Sent: Saturday, May 25, 2019 12:57 PM > To: Ajay Gupta > Cc: heikki.kroge...@linux.intel.com; linux-usb@vger.kernel.org; linux- > i...@vger.kernel.org; Ajay

RE: [PATCH v3 2/5] i2c: nvidia-gpu: add runtime pm support

2019-05-31 Thread Ajay Gupta
Hi Wolfram, > > -Original Message- > > From: linux-usb-ow...@vger.kernel.org ow...@vger.kernel.org> > > On Behalf Of Wolfram Sang > > Sent: Saturday, May 25, 2019 12:57 PM > > To: Ajay Gupta > > Cc: heikki.kroge...@linux.intel.com;

[PATCH v4 0/5] usb: typec: ucsi: ccg: add runtime pm support

2019-06-03 Thread Ajay Gupta
tches should go together since ucsi_ccg driver is dependent on i2c driver for runtime pm wokaround. I would prefer it to go through usb-tree since usb ucsi_ccg driver is the main driver getting runtime pm functionality with the series. Thanks Ajay Ajay Gupta (5): i2c: nvidia-gpu: ref

[PATCH v4 4/5] i2c: nvidia-gpu: resume ccgx i2c client

2019-06-03 Thread Ajay Gupta
From: Ajay Gupta Cypress USB Type-C CCGx controller firmware version 3.1.10 (which is being used in many NVIDIA GPU cards) has known issue of not triggering interrupt when a USB device is hot plugged to runtime resume the controller. If any GPU card gets latest kernel with runtime pm support but

[PATCH v4 5/5] usb: typec: ucsi: ccg: add runtime pm workaround

2019-06-03 Thread Ajay Gupta
From: Ajay Gupta Cypress USB Type-C CCGx controller firmware version 3.1.10 (which is being used in many NVIDIA GPU cards) has known issue of not triggering interrupt when a USB device is hot plugged to runtime resume the controller. If any GPU card gets latest kernel with runtime pm support but

[PATCH v4 1/5] i2c: nvidia-gpu: refactor master_xfer

2019-06-03 Thread Ajay Gupta
From: Ajay Gupta Added a local variable "send_stop" to simplify "goto" statements. The "send_stop" handles below two case 1) When first i2c start fails and so i2c stop is not sent before exiting 2) When i2c stop failed after all transfers and we do not need to se

[PATCH v4 2/5] i2c: nvidia-gpu: add runtime pm support

2019-06-03 Thread Ajay Gupta
From: Ajay Gupta Enable runtime pm support with autosuspend delay of three second. This is to make sure I2C client device Cypress CCGx has completed all transaction. Signed-off-by: Ajay Gupta --- Changes from v3->v4: - Added comment on why stub gpu_i2c_suspend() is needed

[PATCH v4 3/5] usb: typec: ucsi: ccg: enable runtime pm support

2019-06-03 Thread Ajay Gupta
From: Ajay Gupta The change enables runtime pm support to UCSI CCG driver. Added ucsi_resume() function to enable notification after system reusme. Exported both ucsi_resume() and ucsi_send_command() symbols in ucsi.c for modular build. Signed-off-by: Ajay Gupta --- Changes from v3->v4 : N

RE: [PATCH v4 3/5] usb: typec: ucsi: ccg: enable runtime pm support

2019-06-07 Thread Ajay Gupta
Hi Heikki and Wolfram, > -Original Message- > From: linux-i2c-ow...@vger.kernel.org > On Behalf Of Wolfram Sang > Sent: Friday, June 7, 2019 1:27 AM > To: Heikki Krogerus > Cc: Ajay Gupta ; linux-usb@vger.kernel.org; linux- > i...@vger.kernel.org; Ajay Gupta >

RE: [PATCH v4 1/5] i2c: nvidia-gpu: refactor master_xfer

2019-06-07 Thread Ajay Gupta
Hi Wolfram, > -Original Message- > From: Wolfram Sang > Sent: Friday, June 7, 2019 1:33 AM > To: Ajay Gupta > Cc: heikki.kroge...@linux.intel.com; linux-usb@vger.kernel.org; linux- > i...@vger.kernel.org; Ajay Gupta > Subject: Re: [PATCH v4 1/5] i2c: nvidia-gpu:

RE: [PATCH v4 2/5] i2c: nvidia-gpu: add runtime pm support

2019-06-07 Thread Ajay Gupta
Hi Wolfram, > -Original Message- > From: linux-i2c-ow...@vger.kernel.org > On Behalf Of Wolfram Sang > Sent: Friday, June 7, 2019 1:33 AM > To: Ajay Gupta > Cc: heikki.kroge...@linux.intel.com; linux-usb@vger.kernel.org; linux- > i...@vger.kernel.org; Ajay Gupta

[PATCH v5 1/5] i2c: nvidia-gpu: refactor master_xfer

2019-06-07 Thread Ajay Gupta
From: Ajay Gupta Added a local variable "send_stop" to simplify "goto" statements. The "send_stop" handles below two case 1) When first i2c start fails and so i2c stop is not sent before exiting 2) When i2c stop failed after all transfers and we do not need to se

[PATCH v5 0/5] usb: typec: ucsi: ccg: add runtime pm support

2019-06-07 Thread Ajay Gupta
mware with the known issue. All the five patches should go together since ucsi_ccg driver is dependent on i2c driver for runtime pm wokaround. I would prefer it to go through usb-tree since usb ucsi_ccg driver is the main driver getting runtime pm functionality with the series. Thanks Ajay Ajay

[PATCH v5 4/5] i2c: nvidia-gpu: resume ccgx i2c client

2019-06-07 Thread Ajay Gupta
From: Ajay Gupta Cypress USB Type-C CCGx controller firmware version 3.1.10 (which is being used in many NVIDIA GPU cards) has known issue of not triggering interrupt when a USB device is hot plugged to runtime resume the controller. If any GPU card gets latest kernel with runtime pm support but

[PATCH v5 3/5] usb: typec: ucsi: ccg: enable runtime pm support

2019-06-07 Thread Ajay Gupta
From: Ajay Gupta The change enables runtime pm support to UCSI CCG driver. Added ucsi_resume() function to enable notification after system reusme. Exported both ucsi_resume() and ucsi_send_command() symbols in ucsi.c for modular build. Signed-off-by: Ajay Gupta Acked-by: Heikki Krogerus

[PATCH v5 2/5] i2c: nvidia-gpu: add runtime pm support

2019-06-07 Thread Ajay Gupta
From: Ajay Gupta Enable runtime pm support with autosuspend delay of three second. This is to make sure I2C client device Cypress CCGx has completed all transaction. Signed-off-by: Ajay Gupta --- Changes from v4->v5: - Removed extra comments for gpu_i2c_suspend() based

[PATCH v5 5/5] usb: typec: ucsi: ccg: add runtime pm workaround

2019-06-07 Thread Ajay Gupta
From: Ajay Gupta Cypress USB Type-C CCGx controller firmware version 3.1.10 (which is being used in many NVIDIA GPU cards) has known issue of not triggering interrupt when a USB device is hot plugged to runtime resume the controller. If any GPU card gets latest kernel with runtime pm support but

[RFC] usb: typec: ucsi: add support for separate DP altmode devices

2019-06-27 Thread Ajay Gupta
modes into one. Signed-off-by: Ajay Gupta --- drivers/usb/typec/ucsi/ucsi.c | 191 +- drivers/usb/typec/ucsi/ucsi.h | 12 +++ 2 files changed, 199 insertions(+), 4 deletions(-) diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index ba288b9

Re: [RFC] usb: typec: ucsi: add support for separate DP altmode devices

2019-06-28 Thread Ajay Gupta
Hi Heikki, > On Jun 28, 2019, at 3:47 AM, Heikki Krogerus > wrote: > >> On Thu, Jun 27, 2019 at 10:45:47PM -0700, Ajay Gupta wrote: >> CCGx controller used on NVIDIA GPU card has two separate display >> altmode for two DP pin assignments. UCSI specification doesn&#x

[PATCH] usb: typec: ucsi: add support for separate DP altmode devices

2019-06-28 Thread Ajay Gupta
From: Ajay Gupta CCGx controller used on NVIDIA GPU card has two separate display altmode for two DP pin assignments. UCSI specification doesn't prohibits using separate display altmode. Current UCSI Type-C framework expects only one display altmode for all DP pin assignment. This

[PATCH v2] usb: typec: ucsi: add support for separate DP altmode devices

2019-08-05 Thread Ajay Gupta
From: Ajay Gupta CCGx controller used on NVIDIA GPU card has two separate display altmode for two DP pin assignments. UCSI specification doesn't prohibits using separate display altmode. Current UCSI Type-C framework expects only one display altmode for all DP pin assignment. This

[PATCH] usb: xhci: increase CRS timeout value

2018-06-07 Thread Ajay Gupta
Some controllers take almost 55ms to complete controller restore state (CRS). There is no timeout limit mentioned in xhci specification so fix the issue by increasing the timeout limit to 55ms Signed-off-by: Ajay Gupta Signed-off-by: Nagaraj Annaiah --- drivers/usb/host/xhci.c | 2 +- 1 file

[PATCH v2] usb: xhci: increase CRS timeout value

2018-06-11 Thread Ajay Gupta
Some controllers take almost 55ms to complete controller restore state (CRS). There is no timeout limit mentioned in xhci specification so fixing the issue by increasing the timeout limit to 55ms Signed-off-by: Ajay Gupta Signed-off-by: Nagaraj Annaiah --- drivers/usb/host/xhci.c | 7

[PATCH v3] usb: xhci: increase CRS timeout value

2018-06-11 Thread Ajay Gupta
Some controllers take almost 55ms to complete controller restore state (CRS). There is no timeout limit mentioned in xhci specification so fixing the issue by increasing the timeout limit to 100ms Signed-off-by: Ajay Gupta Signed-off-by: Nagaraj Annaiah --- Changes from v2->v3 Updated com

Re: [PATCH v2] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-21 Thread Ajay Gupta
Hi Loic On 6/21/18, Loic Poulain wrote: > Most of FTDI's devices have an EEPROM which records FTDI devices > configuration setting (e.g. the VID, PID, I/O config...) and user > data. FT230R chip integrates a 128-byte eeprom, FT230X a 2048-byte > eeprom... > > This patch adds support for FTDI EEPR

Re: [PATCH v6] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-29 Thread Ajay Gupta
> Reviewed-by: Andy Shevchenko > Signed-off-by: Loic Poulain Reviewed-by: Ajay Gupta > --- > v2: Use ifdef instead of IS_ENABLED > error message in case of nvmem registering failure > Fix space/tab in Kconfig > v3: Make nvmem a child of the usb dev instead of the s

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

2018-08-24 Thread Ajay Gupta
Latest NVIDIA GPU card has USB Type-C interface. There is a Type-C controller which can be accessed over I2C. This driver add I2C bus driver to communicate with Type-C controller. I2C client driver will be part of USB Type-C UCSI driver. Signed-off-by: Ajay Gupta --- Documentation/i2c/busses

[PATCH 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-08-24 Thread Ajay Gupta
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller over I2C interface. This UCSI I2C driver uses I2C bus driver interface for communicating with Type-C controller. Signed-off-by: Ajay Gupta --- drivers/usb/typec/ucsi/Kconfig| 10 + drivers/usb/typec/ucsi/Makefile

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

2018-08-24 Thread Ajay Gupta
Latest NVIDIA GPU card has USB Type-C interface. There is a Type-C controller which can be accessed over I2C. This driver add I2C bus driver to communicate with Type-C controller. I2C client driver will be part of USB Type-C UCSI driver. Signed-off-by: Ajay Gupta --- Changes from v1 -> v2: N

[PATCH v2 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-08-24 Thread Ajay Gupta
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller over I2C interface. This UCSI I2C driver uses I2C bus driver interface for communicating with Type-C controller. Signed-off-by: Ajay Gupta --- Changes from v1 -> v2: Fixed identation in drivers/usb/typec/ucsi/Kconfig drivers/

RE: [PATCH v2 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-08-29 Thread Ajay Gupta
Hi Andy, > > Latest NVIDIA GPU card has USB Type-C interface. There is a > > Type-C controller which can be accessed over I2C. > > > > This driver add I2C bus driver to communicate with Type-C controller. > > I2C client driver will be part of USB Type-C UCSI driver. > > > drivers/i2c/busses/i2c-

RE: [v2,1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-08-29 Thread Ajay Gupta
-- /dev/null > > +++ b/Documentation/i2c/busses/i2c-gpu > > I think this is too generic. Maybe use something like i2c-nvidia-gpu here and > everywhere else, to make it explicit that this is for NVIDIA GPUs rather than > GPUs in general. ok > > @@ -0,0 +1,18 @@ > >

RE: [PATCH v2 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-08-29 Thread Ajay Gupta
Hi Heikki, > On Fri, Aug 24, 2018 at 02:33:36PM -0700, Ajay Gupta wrote: > > Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller > > over I2C interface. > > > > This UCSI I2C driver uses I2C bus driver interface for communicating > > with Type-C contr

RE: [PATCH v3 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-08-30 Thread Ajay Gupta
. > > > > Some small comments below, after addressing them > > Reviewed-by: Andy Shevchenko > > > Signed-off-by: Ajay Gupta > > --- > > Changes from v1 -> v2 > > None > > Changes from v2 -> v3 > >

RE: [PATCH v3 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-08-30 Thread Ajay Gupta
irq_handler(int irq, void *data) { > > + struct ucsi_ccg *uc = data; > > + > > + ucsi_notify(uc->ucsi); > > + > > + return IRQ_HANDLED; > > +} > > + > > > +static int ucsi_ccg_probe(struct i2c_client *client, > > +

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

2018-08-30 Thread Ajay Gupta
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 part of USB Type-C UCSI driver. Signed-off-by: Ajay Gupta --- Changes from v1 ->

[PATCH v4 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-08-30 Thread Ajay Gupta
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller over I2C interface. This UCSI I2C driver uses I2C bus driver interface for communicating with Type-C controller. Signed-off-by: Ajay Gupta --- Changes from v1 -> v2 Fixed identation in drivers/usb/typec/ucsi/Kconfig Chan

RE: [PATCH v4 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-08-31 Thread Ajay Gupta
Hi Andy, > > 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 part of USB Type-C UCSI driver. > > Thanks for an update, my c

RE: [PATCH v4 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-08-31 Thread Ajay Gupta
Hi Andy > > > Latest NVIDIA GPU card has USB Type-C interface. There is a Type-C > > > controller which can be accessed over I2C. > > > + val &= ~(I2C_MST_CNTL_GEN_START | I2C_MST_CNTL_GEN_STOP > > > + | I2C_MST_CNTL_GEN_RAB); > > > > "|" should be on previous line to follow co

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

2018-08-31 Thread Ajay Gupta
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 part of USB Type-C UCSI driver. Signed-off-by: Ajay Gupta --- Changes from v1 ->

[PATCH v5 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-08-31 Thread Ajay Gupta
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller over I2C interface. This UCSI I2C driver uses I2C bus driver interface for communicating with Type-C controller. Signed-off-by: Ajay Gupta --- Changes from v1 -> v2 Fixed identation in drivers/usb/typec/ucsi/Kconfig Chan

RE: [PATCH v4 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-08-31 Thread Ajay Gupta
Hi Andy, > > Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller over I2C > > interface. > > > > This UCSI I2C driver uses I2C bus driver interface for communicating > > with Type-C controller. > > > Changes from v3 -> v4 > > Fixed comments from Andy > > Unfortunatelly not all c

RE: [PATCH v5 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-09-05 Thread Ajay Gupta
Hi Greg, > On Fri, Aug 31, 2018 at 01:22:21PM -0700, Ajay Gupta wrote: > > + dev_info(dev, "Silicon id %2ph", data + > CCGX_I2C_RAB_READ_SILICON_ID); > > + dev_info(dev, "FW1 version %8ph\n", data + > CCGX_I2C_RAB_FW1_VERSION); > &g

RE: [PATCH v5 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-09-05 Thread Ajay Gupta
Hi Greg, > > +static int ccg_read(struct ucsi_ccg *uc, u16 rab, u8 *data, u32 len) > > +{ > > + struct device *dev = uc->dev; > > + struct i2c_client *client = uc->client; > > + unsigned char buf[2]; > > + struct i2c_msg msgs[] = { > > + { > > + .addr = client

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

2018-09-05 Thread Ajay Gupta
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 part of USB Type-C UCSI driver. Signed-off-by: Ajay Gupta --- Changes from v1 ->

[PATCH v6 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-09-05 Thread Ajay Gupta
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller over I2C interface. This UCSI I2C driver uses I2C bus driver interface for communicating with Type-C controller. Signed-off-by: Ajay Gupta --- Changes from v1 -> v2 Fixed identation in drivers/usb/typec/ucsi/Kconfig Chan

RE: [PATCH v6 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-06 Thread Ajay Gupta
dev_err(&pdev->dev, "pci_alloc_irq_vectors err %d\n", > status); > > + return status; > > + } > > + > > + i2cd->do_start = true; > > + mutex_init(&i2cd->mutex); > > + enable_i2c_bus(i2cd); >

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

2018-09-06 Thread Ajay Gupta
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 part of USB Type-C UCSI driver. Signed-off-by: Ajay Gupta Reviewed-by: Andy Shevchenko

[PATCH v7 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-09-06 Thread Ajay Gupta
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller over I2C interface. This UCSI I2C driver uses I2C bus driver interface for communicating with Type-C controller. Signed-off-by: Ajay Gupta Reviewed-by: Andy Shevchenko Acked-by: Heikki Krogerus --- Changes from v1 ->

RE: [PATCH v6 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-06 Thread Ajay Gupta
+ > >>> + status = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI); > >>> + if (status < 0) { > >>> + dev_err(&pdev->dev, "pci_alloc_irq_vectors err %d\n", > >> status); > >>> + return status; > >>> + } > >>> + > >>> + i2cd->do_start = true; > >>> + mutex_init(&i2cd->mutex); > >>> + enable_i2c_bus(i2cd); > >>> + > >>> + i2c_set_adapdata(&i2cd->adapter, i2cd); > >>> + i2cd->adapter.owner = THIS_MODULE; > >>> + strlcpy(i2cd->adapter.name, "NVIDIA GPU I2C adapter", > >>> + sizeof(i2cd->adapter.name)); > >>> + i2cd->adapter.algo = &gpu_i2c_algorithm; > >>> + i2cd->adapter.dev.parent = &pdev->dev; > >>> + status = i2c_add_adapter(&i2cd->adapter); > >>> + if (status < 0) { > >>> + dev_err(&pdev->dev, "i2c_add_adapter failed %d\n", status); > >>> + goto free_irq_vectors; > >>> + } > >>> + > >>> + status = gpu_populate_client(i2cd, pdev->irq); > >>> + if (status < 0) { > >>> + dev_err(&pdev->dev, "gpu_populate_client failed %d\n", > >> status); > >>> + goto del_adapter; > >>> + } > >>> + > >>> + return 0; > >>> + > >>> +del_adapter: > >>> + i2c_del_adapter(&i2cd->adapter); > >>> +free_irq_vectors: > >>> + pci_free_irq_vectors(pdev); > >>> + return status; > >>> +} > >>> + > >>> +static void gpu_i2c_remove(struct pci_dev *pdev) { > >>> + struct gpu_i2c_dev *i2cd = dev_get_drvdata(&pdev->dev); > >>> + > >>> + i2c_del_adapter(&i2cd->adapter); > >>> + pci_free_irq_vectors(pdev); > >>> +} > >>> + > >>> +static int gpu_i2c_resume(struct device *dev) { > >>> + struct gpu_i2c_dev *i2cd = dev_get_drvdata(dev); > >>> + > >>> + enable_i2c_bus(i2cd); > >>> + return 0; > >>> +} > >>> + > >>> +static int gpu_i2c_idle(struct device *dev) { > >>> + struct gpu_i2c_dev *i2cd = dev_get_drvdata(dev); > >>> + > >>> + if (!mutex_trylock(&i2cd->mutex)) { > >>> + dev_info(dev, "-EBUSY\n"); > >>> + return -EBUSY; > >>> + } > >>> + mutex_unlock(&i2cd->mutex); > >>> + > >>> + return 0; > >>> +} > >>> + > >>> +UNIVERSAL_DEV_PM_OPS(gpu_i2c_driver_pm, NULL, gpu_i2c_resume, > >>> +gpu_i2c_idle); > >>> + > >>> +static struct pci_driver gpu_i2c_driver = { > >>> + .name = "nvidia-gpu", > >>> + .id_table = gpu_i2c_ids, > >>> + .probe = gpu_i2c_probe, > >>> + .remove = gpu_i2c_remove, > >>> + .driver = { > >>> + .pm = &gpu_i2c_driver_pm, > >>> + }, > >>> +}; > >>> + > >>> +module_pci_driver(gpu_i2c_driver); > >>> + > >>> +MODULE_AUTHOR("Ajay Gupta "); > >>> +MODULE_DESCRIPTION("Nvidia GPU I2C controller Driver"); > >>> +MODULE_LICENSE("GPL v2"); > >>> > >

RE: [PATCH v7 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-09-06 Thread Ajay Gupta
= devm_kzalloc(dev, sizeof(*uc), GFP_KERNEL); > > + if (!uc) > > + return -ENOMEM; > > + > > + uc->ppm.data = devm_kzalloc(dev, sizeof(struct ucsi_data), > GFP_KERNEL); > > + if (!uc->ppm.data) > > + return -ENOMEM; > > + > > + uc->ppm.cmd = ucsi_ccg_cmd; > > + uc->ppm.sync = ucsi_ccg_sync; > > + uc->dev = dev; > > + uc->client = client; > > + > > + /* reset ccg device and initialize ucsi */ > > + status = ucsi_ccg_init(uc); > > + if (status < 0) { > > + dev_err(uc->dev, "ucsi_ccg_init failed - %d\n", status); > > + return status; > > + } > > + > > + uc->irq = client->irq; > > + > > + status = devm_request_threaded_irq(dev, uc->irq, NULL, > ccg_irq_handler, > > + IRQF_ONESHOT | > IRQF_TRIGGER_HIGH, > > + dev_name(dev), uc); > > + if (status < 0) { > > + dev_err(uc->dev, "request_threaded_irq failed - %d\n", > status); > > + return status; > > + } > > + > > + uc->ucsi = ucsi_register_ppm(dev, &uc->ppm); > > + if (IS_ERR(uc->ucsi)) { > > + dev_err(uc->dev, "ucsi_register_ppm failed\n"); > > + return PTR_ERR(uc->ucsi); > > + } > > + > > + i2c_set_clientdata(client, uc); > > + return 0; > > +} > > + > > +static int ucsi_ccg_remove(struct i2c_client *client) { > > + struct ucsi_ccg *uc = i2c_get_clientdata(client); > > + > > + ucsi_unregister_ppm(uc->ucsi); > > + > > + return 0; > > +} > > + > > +static const struct i2c_device_id ucsi_ccg_device_id[] = { > > + {"ccgx-ucsi", 0}, > > + {} > > +}; > > +MODULE_DEVICE_TABLE(i2c, ucsi_ccg_device_id); > > + > > +static struct i2c_driver ucsi_ccg_driver = { > > + .driver = { > > + .name = "ucsi_ccg", > > + }, > > + .probe = ucsi_ccg_probe, > > + .remove = ucsi_ccg_remove, > > + .id_table = ucsi_ccg_device_id, > > +}; > > + > > +module_i2c_driver(ucsi_ccg_driver); > > + > > +MODULE_AUTHOR("Ajay Gupta "); > > +MODULE_DESCRIPTION("UCSI driver for Cypress CCGx Type-C controller"); > > +MODULE_LICENSE("GPL v2"); > >

[PATCH v8 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-09-06 Thread Ajay Gupta
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller over I2C interface. This UCSI I2C driver uses I2C bus driver interface for communicating with Type-C controller. Signed-off-by: Ajay Gupta --- Changes from v1 -> v2 Fixed identation in drivers/usb/typec/ucsi/Kconfig Chan

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

2018-09-06 Thread Ajay Gupta
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 part of USB Type-C UCSI driver. Signed-off-by: Ajay Gupta Reviewed-by: Andy Shevchenko

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

2018-09-06 Thread Ajay Gupta
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 part of USB Type-C UCSI driver. Signed-off-by: Ajay Gupta Reviewed-by: Andy Shevchenko

[PATCH v9 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-09-06 Thread Ajay Gupta
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller over I2C interface. This UCSI I2C driver uses I2C bus driver interface for communicating with Type-C controller. Signed-off-by: Ajay Gupta Reviewed-by: Andy Shevchenko Acked-by: Heikki Krogerus --- Changes from v1 ->

  1   2   3   >