X86 platform drivers
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: Samuel Xu <samuel.xu.tech@gmail.com>
Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>,
	platform-driver-x86@vger.kernel.org
Subject: Re: How to read time stamp from HPET timer from device driver?
Date: Thu, 15 Jul 2010 18:39:35 +0200	[thread overview]
Message-ID: <201007151839.35690.trenn@suse.de> (raw)
In-Reply-To: <AANLkTimILvk8XUGeoct6_DZKtAvjSSg9wmQwXRkt42_h@mail.gmail.com>

On Tuesday 13 July 2010 03:34:50 pm Samuel Xu wrote:
> Hi, Cascardo:
> Thanks for reply! I just want to get the guide on some sample code of
> HPET usage invoked from kernel mode driver.
You must not use hpet directly to keep track of the time.
There is HW which does not have an hpet, or the kernel may choose a better
(faster, eventually broken hpet timers workarounds, whatever...)
time source to retrieve the time.

> Any directly guide?
Have a look at: include/linux/time.h
An example making a bit use of it is:
drivers/cpufreq/cpufreq_ondemand.c
grepping for time shows some examples.

      Thomas

      parent reply	other threads:[~2010-07-15 16:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-13  9:36 How to read time stamp from HPET timer from device driver? Samuel Xu
2010-07-13  9:39 ` Samuel Xu
2010-07-13 13:08   ` Thadeu Lima de Souza Cascardo
2010-07-13 13:34     ` Samuel Xu
2010-07-13 14:03       ` Thadeu Lima de Souza Cascardo
2010-07-15 16:39       ` Thomas Renninger [this message]

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=201007151839.35690.trenn@suse.de \
    --to=trenn@suse.de \
    --cc=cascardo@holoscopio.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=samuel.xu.tech@gmail.com \
    /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