All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Marcin Niestroj <m.niestroj@grinn-global.com>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Daniel Baluta <daniel.baluta@intel.com>,
	Gregor Boirie <gregor.boirie@parrot.com>,
	Sanchayan Maity <maitysanchayan@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH 1/2] iio: bmi160: Support hardware fifo
Date: Sat, 12 Nov 2016 15:53:31 +0000	[thread overview]
Message-ID: <cc8b323a-fd59-703b-cb4b-1ad0a5a96717@kernel.org> (raw)
In-Reply-To: <eed0df11-6520-c3fa-c6cd-46c13dcddc1f@grinn-global.com>

On 09/11/16 14:16, Marcin Niestroj wrote:
> Hi,
> Thanks for review, below are my comments.
> 
> On 03.11.2016 13:09, Peter Meerwald-Stadler wrote:
>>
>>> This patch was developed primarily based on bmc150_accel hardware fifo
>>> implementation.
>>
>> parts of the patch are cleanup and bugfixing; should be separate?
>>
>> more comments below
>>
>>> IRQ handler was added, which for now is responsible only for handling
>>> watermark interrupts. The BMI160 chip has two interrupt outputs. By
>>> default INT is considered to be connected. If INT2 is used instead, the
>>> interrupt-names device-tree property can be used to specify that.
>>>
>>> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
>>> ---
<snip>
>>> +    /* Handle demux */
>>> +    timestamp = last_timestamp - (last_samples * data->fifo_sample_period);
>>> +    buffer_iter = buffer;
>>> +    for (i = 0; i < fifo_samples; i++) {
>>> +        u8 tmp_buf[indio_dev->scan_bytes];
>>
>> non-constant array size, is this allowed these days?
> 
> I am not sure if this is permitted in kernel. [1] says that ISO C99 adds arrays of variable length.
> 
> The reason I have used it is that iio_push_to_buffers_with_timestamp uses indio_dev->scan_bytes to write timestamp to last element in array.
> One of the possiblities to get rid of non-constant array size is to determine maximum size. Is that what I should do?
Yes.
> 
> [1] https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html
> 
>>
<snip>

  parent reply	other threads:[~2016-11-12 15:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-03 11:25 [PATCH 1/2] iio: bmi160: Support hardware fifo Marcin Niestroj
2016-11-03 11:25 ` Marcin Niestroj
2016-11-03 11:25 ` [PATCH 2/2] Documentation: DT: Add bmi160 imu binding Marcin Niestroj
2016-11-03 11:25   ` Marcin Niestroj
2016-11-06 12:41   ` Jonathan Cameron
2016-11-06 12:41     ` Jonathan Cameron
2016-11-09 15:18     ` Marcin Niestroj
2016-11-09 15:18       ` Marcin Niestroj
2016-11-12 13:15       ` Jonathan Cameron
2016-11-12 13:15         ` Jonathan Cameron
2016-11-10 18:55   ` Rob Herring
2016-11-10 18:55     ` Rob Herring
2016-11-03 12:09 ` [PATCH 1/2] iio: bmi160: Support hardware fifo Peter Meerwald-Stadler
2016-11-09 14:16   ` Marcin Niestroj
2016-11-09 17:16     ` Marcin Niestroj
2016-11-12 15:55       ` Jonathan Cameron
2016-11-14 17:30         ` Marcin Niestroj
2016-11-19 12:43           ` Jonathan Cameron
2016-11-12 15:53     ` Jonathan Cameron [this message]
2016-11-06 12:35 ` Jonathan Cameron
2016-11-06 12:35   ` Jonathan Cameron
2016-11-09 14:52   ` Marcin Niestroj
2016-11-09 14:52     ` Marcin Niestroj
2016-11-12 13:13     ` Jonathan Cameron
2016-11-12 13:13       ` 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=cc8b323a-fd59-703b-cb4b-1ad0a5a96717@kernel.org \
    --to=jic23@kernel.org \
    --cc=daniel.baluta@intel.com \
    --cc=gregor.boirie@parrot.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=m.niestroj@grinn-global.com \
    --cc=maitysanchayan@gmail.com \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@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.