linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sa, Nuno" <Nuno.Sa@analog.com>
To: "Sa, Nuno" <Nuno.Sa@analog.com>,
	Jonathan Cameron <Jonathan.Cameron@Huawei.com>,
	Jonathan Cameron <jic23@kernel.org>
Cc: "Hennerich, Michael" <Michael.Hennerich@analog.com>,
	"zzzzArdelean, zzzzAlexandru" <alexandru.Ardelean@analog.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"lars@metafoo.de" <lars@metafoo.de>,
	"Bogdan, Dragos" <Dragos.Bogdan@analog.com>
Subject: RE: [PATCH v3 0/6] iio: Add output buffer support
Date: Mon, 8 Mar 2021 13:17:43 +0000	[thread overview]
Message-ID: <CY4PR03MB26318D0C0553CB04E53DA21299939@CY4PR03MB2631.namprd03.prod.outlook.com> (raw)
In-Reply-To: <CY4PR03MB26318FE58CDB5301224EAC9399939@CY4PR03MB2631.namprd03.prod.outlook.com>



> -----Original Message-----
> From: Sa, Nuno <Nuno.Sa@analog.com>
> Sent: Monday, March 8, 2021 2:01 PM
> To: Jonathan Cameron <Jonathan.Cameron@Huawei.com>; Jonathan
> Cameron <jic23@kernel.org>
> Cc: Hennerich, Michael <Michael.Hennerich@analog.com>;
> zzzzArdelean, zzzzAlexandru <alexandru.Ardelean@analog.com>;
> linux-kernel@vger.kernel.org; linux-iio@vger.kernel.org;
> lars@metafoo.de; Bogdan, Dragos <Dragos.Bogdan@analog.com>
> Subject: RE: [PATCH v3 0/6] iio: Add output buffer support
> 
> [External]
> 
> 
> 
> > -----Original Message-----
> > From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
> > Sent: Monday, March 8, 2021 12:52 PM
> > To: Sa, Nuno <Nuno.Sa@analog.com>; Jonathan Cameron
> > <jic23@kernel.org>
> > Cc: Hennerich, Michael <Michael.Hennerich@analog.com>;
> > zzzzArdelean, zzzzAlexandru <alexandru.Ardelean@analog.com>;
> > linux-kernel@vger.kernel.org; linux-iio@vger.kernel.org;
> > lars@metafoo.de; Bogdan, Dragos <Dragos.Bogdan@analog.com>
> > Subject: Re: [PATCH v3 0/6] iio: Add output buffer support
> >
> > [External]
> >
> > On Mon, 8 Mar 2021 10:07:05 +0000
> > "Sa, Nuno" <Nuno.Sa@analog.com> wrote:
> >
> > > > -----Original Message-----
> > > > From: Jonathan Cameron <jic23@kernel.org>
> > > > Sent: Saturday, March 6, 2021 6:35 PM
> > > > To: Hennerich, Michael <Michael.Hennerich@analog.com>
> > > > Cc: zzzzArdelean, zzzzAlexandru
> > <alexandru.Ardelean@analog.com>;
> > > > linux-kernel@vger.kernel.org; linux-iio@vger.kernel.org;
> > > > lars@metafoo.de; Sa, Nuno <Nuno.Sa@analog.com>; Bogdan,
> > Dragos
> > > > <Dragos.Bogdan@analog.com>
> > > > Subject: Re: [PATCH v3 0/6] iio: Add output buffer support
> > > >
> > > > On Fri, 5 Mar 2021 08:57:08 +0000
> > > > "Hennerich, Michael" <Michael.Hennerich@analog.com> wrote:
> > > >
> > > > > Hi Jonathan and others,
> > > > >
> > > > > With output/dac buffer support the semantics of the
> > scan_element
> > > > type may change.
> > > > >
> > > > > Today the Format is
> > [be|le]:[s|u]bits/storagebitsXrepeat[>>shift].
> > > > >
> > > > > While shift (if specified) is the shift that needs to be applied
> prior
> > to
> > > > masking out unused bits.
> > > > >
> > > > > So far so good and it sounds universal.
> > > > >
> > > > > However, we use the right shift (operator) for that, which
> makes
> > > > sense for capture devices.
> > > > > For output devices the more logical operator would be the left
> > shift.
> > > > >
> > > > > I'm not proposing a new Format here. I just want to get some
> > > > agreement that for an output device
> > > > >
> > > > > le:s12/16>>4
> > > > >
> > > > > is understood as a left shift of 4, since the unused bits are then
> > on
> > > > the LSB.
> > > >
> > > > Good question. Guess I wasn't thinking ahead when I came up
> with
> > > > that :)
> > > >
> > > > I'm not sure I'd mind if we did decide to define a new format for
> > > > output
> > > > buffers. Feels like it should be easy to do.
> > > >
> > > > What do others think?
> > > >
> > >
> > > I guess the most straight forward thing would be just to add a
> 'shift_l'
> > variable
> > > to 'struct scan_type'' and make sure either 'shift_l' or 'shift' is
> defined
> > and then
> > > properly export either ">>" or "<<" to userspace?
> >
> > Given we already know it's an output channel, can we not just use
> that
> > to make the decision?
> >
> > Jonathan
> 
> I would argue that having two variables gives us more flexibility for
> whatever
> the future brings us :). But if we can sanely say that an output buffer
> will
> always use left shifts, then we could definitely use that information... I
> mean,
> we are already doing that assumption for input buffers and right
> shifts...

Hmm, giving it a bit more thought I think you can disregard the above.
Using the information that it's an output channel should be more than
enough...

- Nuno Sá

      reply	other threads:[~2021-03-08 13:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 12:40 [PATCH v3 0/6] iio: Add output buffer support Alexandru Ardelean
2021-02-19 12:40 ` [PATCH v3 1/6] " Alexandru Ardelean
2021-02-19 12:40 ` [PATCH v3 2/6] iio: kfifo-buffer: " Alexandru Ardelean
2021-02-19 12:40 ` [PATCH v3 3/6] iio: triggered-buffer: extend support to configure output buffers Alexandru Ardelean
2021-02-19 12:40 ` [PATCH v3 4/6] iio: buffer-dma: Allow to provide custom buffer ops Alexandru Ardelean
2021-02-19 12:40 ` [PATCH v3 5/6] iio: buffer-dma: Add output buffer support Alexandru Ardelean
2021-02-19 12:40 ` [PATCH v3 6/6] iio: buffer-dma: add support for cyclic DMA transfers Alexandru Ardelean
2021-02-21 12:09   ` Jonathan Cameron
2021-02-23  6:34     ` Alexandru Ardelean
2021-02-21 12:01 ` [PATCH v3 0/6] iio: Add output buffer support Jonathan Cameron
2021-03-05  8:57   ` Hennerich, Michael
2021-03-06 17:34     ` Jonathan Cameron
2021-03-08 10:07       ` Sa, Nuno
2021-03-08 11:52         ` Jonathan Cameron
2021-03-08 13:00           ` Sa, Nuno
2021-03-08 13:17             ` Sa, Nuno [this message]

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=CY4PR03MB26318D0C0553CB04E53DA21299939@CY4PR03MB2631.namprd03.prod.outlook.com \
    --to=nuno.sa@analog.com \
    --cc=Dragos.Bogdan@analog.com \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=alexandru.Ardelean@analog.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@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 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).