From: Sudeep Holla <sudeep.holla@arm.com>
To: "Jon Medhurst (Tixy)" <tixy@linaro.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
linux-kernel@vger.kernel.org,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/3] firmware: arm_scpi: add support for device power state management
Date: Tue, 7 Jun 2016 14:00:55 +0100 [thread overview]
Message-ID: <5756C587.7090105@arm.com> (raw)
In-Reply-To: <1465304305.2833.13.camel@linaro.org>
On 07/06/16 13:58, Jon Medhurst (Tixy) wrote:
> On Mon, 2016-06-06 at 16:53 +0100, Sudeep Holla wrote:
>> SCPI protocol supports device power state management. This deals with
>> power states of various peripheral devices in the system other than the
>> core compute subsystem.
>>
>> This patch adds support for the power state management of those
>> peripheral devices.
>>
>> Cc: linux-arm-kernel@lists.infradead.org
>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>> ---
>> drivers/firmware/arm_scpi.c | 29 +++++++++++++++++++++++++++++
>> include/linux/scpi_protocol.h | 2 ++
>> 2 files changed, 31 insertions(+)
>>
>> diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c
>> index 51c6db0774cc..ca6afd2217a8 100644
>> --- a/drivers/firmware/arm_scpi.c
>> +++ b/drivers/firmware/arm_scpi.c
>> @@ -231,6 +231,11 @@ struct sensor_value {
>> __le32 hi_val;
>> } __packed;
>>
>> +struct dev_pstate_set {
>> + u16 dev_id;
>> + u8 pstate;
>> +} __packed;
>> +
>> static struct scpi_drvinfo *scpi_info;
>>
>> static int scpi_linux_errmap[SCPI_ERR_MAX] = {
>> @@ -537,6 +542,28 @@ static int scpi_sensor_get_value(u16 sensor, u64 *val)
>> return ret;
>> }
>>
>> +static int scpi_device_get_power_state(u16 dev_id)
>> +{
>> + int ret;
>> + u8 pstate;
>> +
>> + ret = scpi_send_message(SCPI_CMD_GET_DEVICE_PWR_STATE, &dev_id,
>> + sizeof(dev_id), &pstate, sizeof(pstate));
>
> Don't you need to run translate dev_id to little-endian before sending
> it? You remembered to do that next function...
>
Good catch, that's the reason I added the get_power_state call in
scpi_genpd code to cover testing but still I failed.
Thanks for catching this.
--
Regards,
Sudeep
next prev parent reply other threads:[~2016-06-07 13:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 15:53 [PATCH 0/3] firmware: scpi: add device power domain support Sudeep Holla
2016-06-06 15:53 ` [PATCH 1/3] firmware: arm_scpi: add support for device power state management Sudeep Holla
2016-06-07 12:58 ` Jon Medhurst (Tixy)
2016-06-07 13:00 ` Sudeep Holla [this message]
2016-06-06 15:53 ` [PATCH 2/3] Documentation: add DT bindings for ARM SCPI power domains Sudeep Holla
2016-06-07 13:22 ` Mark Rutland
2016-06-07 13:39 ` Sudeep Holla
2016-06-07 14:45 ` Mark Rutland
2016-06-06 15:53 ` [PATCH 3/3] firmware: scpi: add device power domain support using genpd Sudeep Holla
2016-06-07 13:18 ` Jon Medhurst (Tixy)
2016-06-07 13:29 ` Sudeep Holla
2016-06-10 16:19 ` Sudeep Holla
2016-06-15 13:05 ` Ulf Hansson
2016-06-15 13:23 ` Sudeep Holla
2016-06-15 13:29 ` Ulf Hansson
2016-06-15 13:44 ` 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=5756C587.7090105@arm.com \
--to=sudeep.holla@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=suzuki.poulose@arm.com \
--cc=tixy@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).