From: Daniel Baluta <daniel.baluta@intel.com>
To: Vlad Dogaru <vlad.dogaru@intel.com>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH 1/4] iio: dummy: set scan_index for unbuffered channels
Date: Tue, 25 Nov 2014 18:11:02 +0200 [thread overview]
Message-ID: <CAEnQRZAeNkAp1=iCfaY02h_BaEVFueNA=wyf=NUOZe1_3PyTNw@mail.gmail.com> (raw)
In-Reply-To: <1416919687-14271-2-git-send-email-vlad.dogaru@intel.com>
On Tue, Nov 25, 2014 at 2:48 PM, Vlad Dogaru <vlad.dogaru@intel.com> wrote:
> If we do not set scan_index explicitly it will default to 0, causing
> more than one channel to have the same scan_index. This does not make
> sense, as scan_index is used to order values in a buffer sample.
>
> Set the activity and voltage output channels to unbuffered
> (scan_index = -1) to fix this.
>
> Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
> ---
> drivers/staging/iio/iio_simple_dummy.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/staging/iio/iio_simple_dummy.c b/drivers/staging/iio/iio_simple_dummy.c
> index 10a9e08..2948900 100644
> --- a/drivers/staging/iio/iio_simple_dummy.c
> +++ b/drivers/staging/iio/iio_simple_dummy.c
> @@ -242,6 +242,7 @@ static const struct iio_chan_spec iio_dummy_channels[] = {
> .output = 1,
> .indexed = 1,
> .channel = 0,
> + .scan_index = -1,
> },
> {
> .type = IIO_STEPS,
> @@ -259,6 +260,7 @@ static const struct iio_chan_spec iio_dummy_channels[] = {
> .modified = 1,
> .channel2 = IIO_MOD_RUNNING,
> .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED),
> + .scan_index = -1,
> #ifdef CONFIG_IIO_SIMPLE_DUMMY_EVENTS
> .event_spec = &iio_running_event,
> .num_event_specs = 1,
> @@ -269,6 +271,7 @@ static const struct iio_chan_spec iio_dummy_channels[] = {
> .modified = 1,
> .channel2 = IIO_MOD_WALKING,
> .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED),
> + .scan_index = -1,
> #ifdef CONFIG_IIO_SIMPLE_DUMMY_EVENTS
> .event_spec = &iio_walking_event,
> .num_event_specs = 1,
> --
> 1.9.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
next prev parent reply other threads:[~2014-11-25 16:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 12:48 [PATCH 0/4] Add valid sample channel Vlad Dogaru
2014-11-25 12:48 ` [PATCH 1/4] iio: dummy: set scan_index for unbuffered channels Vlad Dogaru
2014-11-25 16:11 ` Daniel Baluta [this message]
2014-12-12 11:48 ` Jonathan Cameron
2014-11-25 12:48 ` [PATCH 2/4] iio: ensure scan index is unique at buffer register Vlad Dogaru
2014-12-06 20:19 ` Hartmut Knaack
2014-12-12 11:50 ` Jonathan Cameron
2014-11-25 12:48 ` [RFC PATCH 3/4] iio: add valid sample channel Vlad Dogaru
2014-11-25 12:48 ` [RFC PATCH 4/4] iio: illustrate the use of a " Vlad Dogaru
2014-11-25 16:36 ` [PATCH 0/4] Add " Lars-Peter Clausen
2014-11-25 16:55 ` Daniel Baluta
2014-11-25 17:00 ` Lars-Peter Clausen
2014-11-25 17:29 ` Jonathan Cameron
2014-11-25 18:27 ` Octavian Purdila
2014-11-25 18:53 ` Lars-Peter Clausen
2014-11-26 12:58 ` Daniel Baluta
2014-12-01 20:06 ` Lars-Peter Clausen
2014-12-01 20:46 ` Daniel Baluta
2014-12-01 20:51 ` Lars-Peter Clausen
2014-12-01 21:03 ` Daniel Baluta
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='CAEnQRZAeNkAp1=iCfaY02h_BaEVFueNA=wyf=NUOZe1_3PyTNw@mail.gmail.com' \
--to=daniel.baluta@intel.com \
--cc=linux-iio@vger.kernel.org \
--cc=vlad.dogaru@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).