Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1416147
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/3] firmware: arm_scpi: add support for device power state management |
| Date | 2016-06-07 15:10 +0200 |
| Message-ID | <rHoVA-37S-35@gated-at.bofh.it> (permalink) |
| References | <rH56x-6VJ-11@gated-at.bofh.it> <rH56y-6VJ-31@gated-at.bofh.it> <rHoLT-2Pn-7@gated-at.bofh.it> |
| Organization | ARM |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/3] firmware: scpi: add device power domain support Sudeep Holla <sudeep.holla@arm.com> - 2016-06-06 18:00 +0200
[PATCH 1/3] firmware: arm_scpi: add support for device power state management Sudeep Holla <sudeep.holla@arm.com> - 2016-06-06 18:00 +0200
Re: [PATCH 1/3] firmware: arm_scpi: add support for device power state management "Jon Medhurst (Tixy)" <tixy@linaro.org> - 2016-06-07 15:00 +0200
Re: [PATCH 1/3] firmware: arm_scpi: add support for device power state management Sudeep Holla <sudeep.holla@arm.com> - 2016-06-07 15:10 +0200
csiph-web