All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@kernel.org>,
	Gregor Boirie <gregor.boirie@parrot.com>,
	linux-iio@vger.kernel.org
Subject: Re: [RFC PATCH v1 1/3] iio:core: timestamping clock selection support
Date: Sun, 14 Feb 2016 18:43:57 +0100	[thread overview]
Message-ID: <56C0BCDD.3080006@metafoo.de> (raw)
In-Reply-To: <56BF3A49.1000908@kernel.org>

On 02/13/2016 03:14 PM, Jonathan Cameron wrote:
> On 11/02/16 10:04, Gregor Boirie wrote:
>> Adds a new per-device sysfs attribute "clockid" to allow userspace to select a
>> particular POSIX clock for buffered samples and events timestamping.
>>
>> When read, the attribute file returns a stringifi'ed clockid_t matching the
>> currently selected clock.
>> Writing a stringifi'ed clockid_t to the attribute file will select the
>> corresponding clock for the device.
>>
>> Following clocks, as listed in clock_gettime(2), are supported: CLOCK_REALTIME,
>> CLOCK_MONOTONIC, CLOCK_MONOTONIC_RAW, CLOCK_REALTIME_COARSE,
>> CLOCK_MONOTONIC_COARSE, CLOCK_BOOTTIME and CLOCK_TAI.
>>
>> Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com>
>> ---
>>  Documentation/ABI/testing/sysfs-bus-iio |   7 +++
>>  Documentation/DocBook/iio.tmpl          |   2 +-
>>  drivers/iio/iio_core.h                  |   3 +
>>  drivers/iio/industrialio-core.c         | 107 ++++++++++++++++++++++++++++++--
>>  drivers/iio/industrialio-event.c        |  19 +++++-
>>  drivers/iio/industrialio-trigger.c      |   2 +-
>>  include/linux/iio/iio.h                 |  10 +--
>>  7 files changed, 134 insertions(+), 16 deletions(-)
>>
>> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
>> index 3c66248..4602006 100644
>> --- a/Documentation/ABI/testing/sysfs-bus-iio
>> +++ b/Documentation/ABI/testing/sysfs-bus-iio
>> @@ -32,6 +32,13 @@ Description:
>>  		Description of the physical chip / device for device X.
>>  		Typically a part number.
>>  
>> +What:		/sys/bus/iio/devices/iio:deviceX/clockid
>> +KernelVersion:	4.5
>> +Contact:	linux-iio@vger.kernel.org
>> +Description:
>> +		Identifier (clockid_t) of current posix clock used to timestamp
>> +		buffered samples and events for device X.
> As it's been written into a sysfs attribute I'd normally prefer to see a
> descriptive string for something like this.  What do others think?
> clockid_t is clearly fixed abi so this makes reasonable sense.  Are there
> other sysfs attributes to select the clock already present elsewhere in the
> kernel?

Very same thoughts here. clockid_t is already ABI so we don't have to be
afraid exposing values that might change, but at the same time a string
would be more suitable for sysfs.

  reply	other threads:[~2016-02-14 17:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 10:04 [RFC PATCH v1 0/3] iio: introduce timestamping clock selection Gregor Boirie
2016-02-11 10:04 ` [RFC PATCH v1 1/3] iio:core: timestamping clock selection support Gregor Boirie
2016-02-13 14:14   ` Jonathan Cameron
2016-02-14 17:43     ` Lars-Peter Clausen [this message]
2016-02-15  9:42       ` Gregor Boirie
2016-02-17 19:38         ` Jonathan Cameron
2016-02-18  9:25           ` Gregor Boirie
2016-02-11 10:04 ` [RFC PATCH v1 2/3] iio:core: timestamping clock resolution support Gregor Boirie
2016-02-11 10:04 ` [RFC PATCH v1 3/3] iio: make drivers use new timestamping clock API Gregor Boirie
2016-02-13 14:19   ` Jonathan Cameron
2016-02-15  9:11     ` Gregor Boirie
2016-02-13 14:12 ` [RFC PATCH v1 0/3] iio: introduce timestamping clock selection Jonathan Cameron

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=56C0BCDD.3080006@metafoo.de \
    --to=lars@metafoo.de \
    --cc=gregor.boirie@parrot.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.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 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.