From: Lars-Peter Clausen <lars@metafoo.de>
To: Matt Ranostay <mranostay@gmail.com>, Keith Mok <ek9852@gmail.com>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH] iio: use boot time instead of realtime
Date: Thu, 4 Feb 2016 18:36:28 +0100 [thread overview]
Message-ID: <56B38C1C.3070104@metafoo.de> (raw)
In-Reply-To: <CAKzfze-+mu7f0myNAcgwMDtfVpXbPJTE4jgQcSX0nNs4vH7RWQ@mail.gmail.com>
On 02/04/2016 01:36 AM, Matt Ranostay wrote:
> Seems like doing a blanket change like this would break a lot of
> drivers since it changes the core ABI
And I think the commit does not quite do what the description says.
ktime_get_real_ns() should account for the time when the system is in suspend.
Keith, please have a look at this discussion for a better approach to
solving this problem while keeping ABI compatibility:
http://marc.info/?l=linux-iio&m=145449725410306&w=2
Thanks for looking into this important issue.
- Lars
>
> On Wed, Feb 3, 2016 at 11:29 AM, Keith Mok <ek9852@gmail.com> wrote:
>> From: Keith Mok <ek9852@gmail.com>
>>
>> Advanced sensor has fifo/ring buffer internally,
>> they can store data when the system is suspend,
>> we need a timestamp that is able to take into
>> account of the time when the system is suspend also.
>>
>> Signed-off-by: Keith Mok <ek9852@gmail.com>
>> ---
>> include/linux/iio/iio.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
>> index b589411..7092877 100644
>> --- a/include/linux/iio/iio.h
>> +++ b/include/linux/iio/iio.h
>> @@ -286,7 +286,7 @@ static inline bool iio_channel_has_info(const struct iio_chan_spec *chan,
>> **/
>> static inline s64 iio_get_time_ns(void)
>> {
>> - return ktime_get_real_ns();
>> + return ktime_get_boot_ns();
>> }
>>
>> /* Device operating modes */
>> --
>> 2.5.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2016-02-04 17:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 19:29 [PATCH] iio: use boot time instead of realtime Keith Mok
2016-02-04 0:36 ` Matt Ranostay
2016-02-04 17:36 ` Lars-Peter Clausen [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=56B38C1C.3070104@metafoo.de \
--to=lars@metafoo.de \
--cc=ek9852@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=mranostay@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.