From: Wolfram Sang <wsa@the-dreams.de>
To: Ajay Gupta <ajaykuee@gmail.com>
Cc: heikki.krogerus@linux.intel.com, linux-usb@vger.kernel.org,
linux-i2c@vger.kernel.org, Ajay Gupta <ajayg@nvidia.com>
Subject: Re: [PATCH v3 2/5] i2c: nvidia-gpu: add runtime pm support
Date: Sat, 25 May 2019 21:56:30 +0200 [thread overview]
Message-ID: <20190525195630.GB12538@kunai> (raw)
In-Reply-To: <20190522183142.11061-3-ajayg@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 815 bytes --]
> @@ -211,6 +212,8 @@ static int gpu_i2c_master_xfer(struct i2c_adapter *adap,
> goto exit;
> }
>
> + pm_runtime_mark_last_busy(i2cd->dev);
> + pm_runtime_put_autosuspend(i2cd->dev);
> return i;
> exit:
> if (send_stop) {
> @@ -218,6 +221,8 @@ static int gpu_i2c_master_xfer(struct i2c_adapter *adap,
> if (status2 < 0)
> dev_err(i2cd->dev, "i2c stop failed %d\n", status2);
> }
> + pm_runtime_mark_last_busy(i2cd->dev);
> + pm_runtime_put_autosuspend(i2cd->dev);
Maybe another worthwhile refactorization possible here? The exit code
path and 'all good' code path look very similar. This can be done
incrementally, though. I think for now it is okay.
> +static __maybe_unused int gpu_i2c_suspend(struct device *dev)
> +{
> + return 0;
> +}
Why do we need this?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-05-25 19:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-22 18:31 [PATCH v3 0/5] usb: typec: ucsi: ccg: add runtime pm support Ajay Gupta
2019-05-22 18:31 ` [PATCH v3 1/5] i2c: nvidia-gpu: refactor master_xfer Ajay Gupta
2019-05-25 19:54 ` Wolfram Sang
2019-05-22 18:31 ` [PATCH v3 2/5] i2c: nvidia-gpu: add runtime pm support Ajay Gupta
2019-05-25 19:56 ` Wolfram Sang [this message]
2019-05-28 14:25 ` Ajay Gupta
2019-05-31 19:42 ` Ajay Gupta
2019-05-22 18:31 ` [PATCH v3 3/5] usb: typec: ucsi: ccg: enable " Ajay Gupta
2019-05-22 18:31 ` [PATCH v3 4/5] i2c: nvidia-gpu: resume ccgx i2c client Ajay Gupta
2019-05-25 19:58 ` Wolfram Sang
2019-05-22 18:31 ` [PATCH v3 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=20190525195630.GB12538@kunai \
--to=wsa@the-dreams.de \
--cc=ajayg@nvidia.com \
--cc=ajaykuee@gmail.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox