Re: [RFC PATCH 2/2] counter: Introduce the COUNTER_COMP_ARRAY_U64 component type

From: Julien Panis
Date: Tue Sep 06 2022 - 11:31:59 EST




On 29/08/2022 17:17, William Breathitt Gray wrote:
The COUNTER_COMP_ARRAY_U64 Counter component type is introduced to
enable support for Counter array components. With Counter array
components, exposure for buffers on counter devices can be defined via
new Counter array component macros. This should simplify code for driver
authors who would otherwise need to define individual Counter components
for each array element.

Three Counter array component macros are introduced::

COUNTER_COMP_DEVICE_ARRAY_U64(_name, _read, _write, _length)
COUNTER_COMP_COUNT_ARRAY_U64(_name, _read, _write, _length)
COUNTER_COMP_SIGNAL_ARRAY_U64(_name, _read, _write, _length)

Hi William,

I have 2 comments :

1) What about ENUM ? I guess that it will not be possible to handle ARRAY of ENUM ?
    That would be useful for polarity0/1/2/3 in my ECAP driver
    (something like COUNTER_COMP_SIGNAL_ARRAY_ENUM for instance)

2) I made some tests with COUNTER_COMP_COUNT_ARRAY_U64
        COUNTER_COMP_COUNT_ARRAY_U64("capture", ecap_cnt_cap_read, NULL, ECAP_NB_CEVT)
    I can get consistent data value when using 'cat captureX' linux commands.
    But I get weird values when using watches from userspace application code (I will send my test results to you).

Julien Panis