[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <416fe56e-bfb3-3f46-7f03-17009fa27dee@lechnology.com>
Date: Wed, 30 Dec 2020 12:18:48 -0600
From: David Lechner <david@...hnology.com>
To: William Breathitt Gray <vilhelm.gray@...il.com>, jic23@...nel.org
Cc: kernel@...gutronix.de, linux-stm32@...md-mailman.stormreply.com,
a.fatoum@...gutronix.de, kamel.bouhara@...tlin.com,
gwendal@...omium.org, alexandre.belloni@...tlin.com,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, syednwaris@...il.com,
patrick.havelange@...ensium.com, fabrice.gasnier@...com,
mcoquelin.stm32@...il.com, alexandre.torgue@...com
Subject: Re: [PATCH v7 4/5] docs: counter: Document character device interface
On 12/25/20 6:15 PM, William Breathitt Gray wrote:
> +Userspace
> +---------
> +Userspace applications can configure Counter events via ioctl operations
> +on the Counter character device node. There following ioctl codes are
> +supported and provided by the `linux/counter.h` userspace header file:
> +
> +* COUNTER_CLEAR_WATCHES_IOCTL:
> + Clear all Counter watches from all events
> +
> +* COUNTER_ADD_WATCH_IOCTL:
> + Add a Counter watch for the specified event
> +
> +* COUNTER_LOAD_WATCHES_IOCTL:
> + Activates the Counter watches added earlier
Would it make more sense to call the last and first ones
COUNTER_ENABLE_EVENTS_IOCTL and COUNTER_DISABLE_EVENTS_IOCTL?
In any case, more explanation would be helpful.
* COUNTER_ADD_WATCH_IOCTL:
Queues a Counter watch for the specified event. The queued watches
will not be applied until COUNTER_ENABLE_EVENTS_IOCTL is called.
* COUNTER_ENABLE_EVENTS_IOCTL:
Enables monitoring the events specified by the Counter watches that were
queued by COUNTER_ADD_WATCH_IOCTL. If events are already enabled, the new
set of watches replaces the old one. Calling this ioctl also has the
effect of clearing the queue of watches added by COUNTER_ADD_WATCH_IOCTL.
* COUNTER_DISABLE_EVENTS_IOCTL:
Stops monitoring the previously enabled events.
> +
> +To configure events to gather Counter data, users first populate a
> +`struct counter_watch` with the relevant event id, event channel id, and
> +the information for the desired Counter component from which to read,
> +and then pass it via the `COUNTER_ADD_WATCH_IOCTL` ioctl command.
for restructured text, two backticks are needed for ``code`` formatting
Powered by blists - more mailing lists