mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Greg KH <greg@kroah.com>,
	Chunyan Zhang <zhang.chunyan@linaro.org>,
	laurent.fert@intel.com, yann.fouassier@intel.com,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [QUEUED v20160630 1/4] stm class: Add runtime power management handling
Date: Fri, 01 Jul 2016 10:10:02 +0300	[thread overview]
Message-ID: <87ziq1rfzp.fsf@ashishki-desk.ger.corp.intel.com> (raw)
In-Reply-To: <CANLsYkx8DPhijLOOeGA7poKBqz+YF02aQNmH7OmeL7r+cVu9rQ@mail.gmail.com>

Mathieu Poirier <mathieu.poirier@linaro.org> writes:

> On 30 June 2016 at 09:30, Alexander Shishkin
> <alexander.shishkin@linux.intel.com> wrote:
>> Mathieu Poirier <mathieu.poirier@linaro.org> writes:
>>
>>> On 30 June 2016 at 06:56, Alexander Shishkin
>>> <alexander.shishkin@linux.intel.com> wrote:
>>>> Currently, there's no runtime pm in stm class devices, which makes it
>>>> harder for the underlying hardware drivers to handle their power
>>>> management.
>>>>
>>>> This patch applies the following runtime pm policy to stm class devices,
>>>> which their parents can rely on for their power management tracking:
>>>>
>>>>   * device is in use during character device writes,
>>>>   * delayed autosuspend is used to keep it active between adjacent
>>>>   writes,
>>>>   * device is in use while mmio regions are mapped,
>>>>   * device is is use while any stm_source devices are linked to it.
>>>>
>>>> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
>>>> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
>>>> Cc: Chunyan Zhang <zhang.chunyan@linaro.org>
>>>
>>> Coresight power management on my Juno board (the only device with an
>>> STM I have access to) is broken and as such, can't test if this code
>>> does what is intended.  But theoretically it looks good.
>>
>> Thanks for taking a look.
>>
>>> Throughout the driver, wouldn't it be better to use
>>> pm_runtime_put_sync() rather than autosuspending with a hard coded
>>> value?
>>
>> Yeah, the autosuspend is for the char write()ers that are likely to send
>> multiple consequent write()s, so that we don't have to go in and out of
>> suspend every time that happens.
>>
>
> Yes, it's a trade off.  Please add a comment in stm_register_device()
> that explains the usage of the autosuspend functions and the choice of
> '2000' value.

Will do. The 2000 is arbitrary, but it has to be configurable from a
sysfs attribute and I thought that's a start as good as any.

> Thanks,
>
> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>

Thanks,
--
Alex

  reply	other threads:[~2016-07-01  7:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30 12:56 [QUEUED v20160630 0/4] stm class/intel_th: Updates for char-misc-next Alexander Shishkin
2016-06-30 12:56 ` [QUEUED v20160630 1/4] stm class: Add runtime power management handling Alexander Shishkin
2016-06-30 15:19   ` Mathieu Poirier
2016-06-30 15:30     ` Alexander Shishkin
2016-06-30 15:59       ` Mathieu Poirier
2016-07-01  7:10         ` Alexander Shishkin [this message]
2016-06-30 12:56 ` [QUEUED v20160630 2/4] intel_th: " Alexander Shishkin
2016-06-30 12:56 ` [QUEUED v20160630 3/4] intel_th: gth: Fix a source comment Alexander Shishkin
2016-07-01  2:37   ` Chunyan Zhang
2016-07-01  7:10     ` Alexander Shishkin
2016-06-30 12:56 ` [QUEUED v20160630 4/4] intel_th: Document output device callbacks Alexander Shishkin

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=87ziq1rfzp.fsf@ashishki-desk.ger.corp.intel.com \
    --to=alexander.shishkin@linux.intel.com \
    --cc=greg@kroah.com \
    --cc=laurent.fert@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=yann.fouassier@intel.com \
    --cc=zhang.chunyan@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

all inboxes | Powered by JetHome®