From: Kevin Hilman <khilman@baylibre.com>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
Ulf Hansson <ulf.hansson@linaro.org>,
Jon Medhurst <tixy@linaro.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: Re: [PATCH v2 3/3] firmware: scpi: add device power domain support using genpd
Date: Mon, 20 Jun 2016 10:53:33 -0700 [thread overview]
Message-ID: <m2eg7rbvc2.fsf@baylibre.com> (raw)
In-Reply-To: <1466073481-697-4-git-send-email-sudeep.holla@arm.com> (Sudeep Holla's message of "Thu, 16 Jun 2016 11:38:01 +0100")
Sudeep Holla <sudeep.holla@arm.com> writes:
> This patch hooks up the support for device power domain provided by
> SCPI using the Linux generic power domain infrastructure.
>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Kevin Hilman <khilman@kernel.org>
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: linux-pm@vger.kernel.org
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
[...]
> +static int scpi_pd_power(struct scpi_pm_domain *pd, bool power_on)
> +{
> + int ret;
> + enum scpi_power_domain_state state;
> +
> + if (power_on)
> + state = SCPI_PD_STATE_ON;
> + else
> + state = SCPI_PD_STATE_OFF;
> +
> + ret = pd->ops->device_set_power_state(pd->domain, state);
There should probably be some sanity checks here that these function
pointers are non-NULL.
> + if (ret)
> + return ret;
> +
> + return !(state == pd->ops->device_get_power_state(pd->domain));
> +}
Kevin
next prev parent reply other threads:[~2016-06-20 21:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-16 10:37 [PATCH v2 0/3] firmware: scpi: add device power domain support Sudeep Holla
2016-06-16 10:37 ` [PATCH v2 1/3] firmware: arm_scpi: add support for device power state management Sudeep Holla
2016-06-16 18:03 ` Jon Medhurst (Tixy)
2016-06-17 8:46 ` Sudeep Holla
2016-06-16 10:38 ` [PATCH v2 2/3] Documentation: add DT bindings for ARM SCPI power domains Sudeep Holla
2016-06-16 10:38 ` [PATCH v2 3/3] firmware: scpi: add device power domain support using genpd Sudeep Holla
2016-06-16 17:47 ` Jon Medhurst (Tixy)
2016-06-16 17:59 ` Sudeep Holla
2016-06-17 8:19 ` Jon Medhurst (Tixy)
2016-06-17 8:38 ` Sudeep Holla
2016-06-20 17:50 ` Kevin Hilman
2016-06-20 17:57 ` Sudeep Holla
2016-06-17 8:55 ` Sudeep Holla
2016-06-17 8:55 ` Sudeep Holla
2016-06-20 17:53 ` Kevin Hilman [this message]
2016-06-20 18:06 ` Sudeep Holla
2016-06-16 13:14 ` [PATCH v2 0/3] firmware: scpi: add device power domain support Jon Medhurst (Tixy)
2016-06-16 13:26 ` Sudeep Holla
2016-06-17 8:56 ` Ulf Hansson
2016-06-17 15:22 ` Mathieu Poirier
2016-06-17 15:34 ` Sudeep Holla
2016-06-20 17:56 ` Kevin Hilman
2016-06-20 18:02 ` Sudeep Holla
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=m2eg7rbvc2.fsf@baylibre.com \
--to=khilman@baylibre.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=rjw@rjwysocki.net \
--cc=sudeep.holla@arm.com \
--cc=suzuki.poulose@arm.com \
--cc=tixy@linaro.org \
--cc=ulf.hansson@linaro.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;
as well as URLs for NNTP newsgroup(s).