linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Sergiu Cuciurean <sergiu.cuciurean@analog.com>
Cc: <linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<knaack.h@gmx.de>, <Michael.Hennerich@analog.com>
Subject: Re: [PATCH] iio: adc: ad7768-1: Fix channel endian spec
Date: Sun, 3 May 2020 12:42:11 +0100	[thread overview]
Message-ID: <20200503124211.41933e29@archlinux> (raw)
In-Reply-To: <20200429104535.82988-1-sergiu.cuciurean@analog.com>

On Wed, 29 Apr 2020 13:45:35 +0300
Sergiu Cuciurean <sergiu.cuciurean@analog.com> wrote:

> This change removes the endian description from the iio channel spec.
> In this way, the default (IIO_CPU) endian will be used, matching the
> be32_to_cpu() conversion from ad7768_spi_reg_read().
> 
> Fixes: 8a15c73a9bcfe ("iio: adc: Add AD7768-1 ADC basic support")
> 
> Signed-off-by: Sergiu Cuciurean <sergiu.cuciurean@analog.com>

Hi Sergiu,

The endian marking only applies to the push_to_buffers data.  That
is read from the hardware using spi_read, not the ad7768_spi_reg_read
function.  So logic above doesn't hold.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/ad7768-1.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c
> index a0027797a7fe..99da13c3511a 100644
> --- a/drivers/iio/adc/ad7768-1.c
> +++ b/drivers/iio/adc/ad7768-1.c
> @@ -144,7 +144,6 @@ static const struct iio_chan_spec ad7768_channels[] = {
>  			.realbits = 24,
>  			.storagebits = 32,
>  			.shift = 8,
> -			.endianness = IIO_BE,
>  		},
>  	},
>  };


      reply	other threads:[~2020-05-03 11:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 10:45 [PATCH] iio: adc: ad7768-1: Fix channel endian spec Sergiu Cuciurean
2020-05-03 11:42 ` Jonathan Cameron [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=20200503124211.41933e29@archlinux \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=knaack.h@gmx.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sergiu.cuciurean@analog.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).