All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ajay Gupta <ajaykuee@gmail.com>
To: heikki.krogerus@linux.intel.com, wsa@the-dreams.de
Cc: linux-usb@vger.kernel.org, linux-i2c@vger.kernel.org,
	Ajay Gupta <ajayg@nvidia.com>
Subject: [PATCH v2 0/5] usb: typec: ucsi: ccg: add runtime pm support
Date: Mon, 20 May 2019 11:37:45 -0700	[thread overview]
Message-ID: <20190520183750.2932-1-ajayg@nvidia.com> (raw)

Hi Heikki and Wolfram

These patches add support for runtime power management for UCSI CCGx driver.
I have tested them with NVIDIA GPU card which has i2c interface to talk to
CCG controller. I have added runtime pm support for the i2c bus driver as well.

First patch refactors master_xfer() of i2c driver fixing comment from Wolfram.
Second and third patch add support for runtime pm in i2c bus driver and UCSI CCGx
driver.

Last two patches add workaround for an old version of ccg firmware
which has known issue of missing interrupt when a device is connected
to runtime resume the ccg controller. The workaround is needed because
if a GPU card doesn't get new firmware but gets new kernel then also it
should continue to work. The workaround is to request runtime resume of
i2c client which is UCSI Cypress CCGx driver. CCG driver will call the ISR
for any connector change event only if NVIDIA GPU has old CCG firmware 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 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-gpu.c |  60 ++++++++----
 drivers/usb/typec/ucsi/ucsi.c       |   1 +
 drivers/usb/typec/ucsi/ucsi_ccg.c   | 140 +++++++++++++++++++++++++++-
 3 files changed, 181 insertions(+), 20 deletions(-)

-- 
2.17.1


             reply	other threads:[~2019-05-20 18:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20 18:37 Ajay Gupta [this message]
2019-05-20 18:37 ` [PATCH v2 1/5] i2c: nvidia-gpu: refactor master_xfer Ajay Gupta
2019-05-20 18:37 ` [PATCH v2 2/5] i2c: nvidia-gpu: add runtime pm support Ajay Gupta
2019-05-20 18:37 ` [PATCH v2 3/5] usb: typec: ucsi: ccg: enable " Ajay Gupta
2019-05-21 13:37   ` Heikki Krogerus
2019-05-21 13:49     ` Heikki Krogerus
2019-05-21 17:44     ` Ajay Gupta
2019-05-22 11:12       ` Heikki Krogerus
2019-05-20 18:37 ` [PATCH v2 4/5] i2c: nvidia-gpu: resume ccgx i2c client Ajay Gupta
2019-05-20 18:37 ` [PATCH v2 5/5] usb: typec: ucsi: ccg: add runtime pm workaround Ajay Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190520183750.2932-1-ajayg@nvidia.com \
    --to=ajaykuee@gmail.com \
    --cc=ajayg@nvidia.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.