linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
To: Alexandru Ardelean <alexandru.ardelean@analog.com>
Cc: <linux-iio@vger.kernel.org>, <linux-spi@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Michael Hennerich <michael.hennerich@analog.com>
Subject: Re: [PATCH 3/5] iio: imu: adis: Add support for SPI transfer cs_change_stall_delay_us
Date: Wed, 26 Jun 2019 19:35:24 +0100	[thread overview]
Message-ID: <20190626193524.2bf08a14@archlinux> (raw)
In-Reply-To: <20190625131328.11883-3-alexandru.ardelean@analog.com>

On Tue, 25 Jun 2019 16:13:26 +0300
Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:

> The ADIS16460 requires a higher delay before the next transfer. Since the
> SPI framework supports configuring the delay before the next transfer, this
> driver will become the first user of it.
> 
> The support for this functionality in ADIS16460 requires an addition to the
> ADIS lib to support the `cs_change_stall_delay_us` functionality in SPI.
> 
> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Subject to previous patch naming etc, this is fine and I'll pick it up once
that's sorted.

Thanks,

Jonathan

> ---
>  drivers/iio/imu/adis.c       | 9 +++++++++
>  include/linux/iio/imu/adis.h | 2 ++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c
> index c771ae6803a9..90dac69910b3 100644
> --- a/drivers/iio/imu/adis.c
> +++ b/drivers/iio/imu/adis.c
> @@ -40,28 +40,33 @@ int adis_write_reg(struct adis *adis, unsigned int reg,
>  			.len = 2,
>  			.cs_change = 1,
>  			.delay_usecs = adis->data->write_delay,
> +			.cs_change_stall_delay_us = adis->data->cs_stall_delay,
>  		}, {
>  			.tx_buf = adis->tx + 2,
>  			.bits_per_word = 8,
>  			.len = 2,
>  			.cs_change = 1,
>  			.delay_usecs = adis->data->write_delay,
> +			.cs_change_stall_delay_us = adis->data->cs_stall_delay,
>  		}, {
>  			.tx_buf = adis->tx + 4,
>  			.bits_per_word = 8,
>  			.len = 2,
>  			.cs_change = 1,
>  			.delay_usecs = adis->data->write_delay,
> +			.cs_change_stall_delay_us = adis->data->cs_stall_delay,
>  		}, {
>  			.tx_buf = adis->tx + 6,
>  			.bits_per_word = 8,
>  			.len = 2,
>  			.delay_usecs = adis->data->write_delay,
> +			.cs_change_stall_delay_us = adis->data->cs_stall_delay,
>  		}, {
>  			.tx_buf = adis->tx + 8,
>  			.bits_per_word = 8,
>  			.len = 2,
>  			.delay_usecs = adis->data->write_delay,
> +			.cs_change_stall_delay_us = adis->data->cs_stall_delay,
>  		},
>  	};
>  
> @@ -134,12 +139,14 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
>  			.len = 2,
>  			.cs_change = 1,
>  			.delay_usecs = adis->data->write_delay,
> +			.cs_change_stall_delay_us = adis->data->cs_stall_delay,
>  		}, {
>  			.tx_buf = adis->tx + 2,
>  			.bits_per_word = 8,
>  			.len = 2,
>  			.cs_change = 1,
>  			.delay_usecs = adis->data->read_delay,
> +			.cs_change_stall_delay_us = adis->data->cs_stall_delay,
>  		}, {
>  			.tx_buf = adis->tx + 4,
>  			.rx_buf = adis->rx,
> @@ -147,11 +154,13 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
>  			.len = 2,
>  			.cs_change = 1,
>  			.delay_usecs = adis->data->read_delay,
> +			.cs_change_stall_delay_us = adis->data->cs_stall_delay,
>  		}, {
>  			.rx_buf = adis->rx + 2,
>  			.bits_per_word = 8,
>  			.len = 2,
>  			.delay_usecs = adis->data->read_delay,
> +			.cs_change_stall_delay_us = adis->data->cs_stall_delay,
>  		},
>  	};
>  
> diff --git a/include/linux/iio/imu/adis.h b/include/linux/iio/imu/adis.h
> index 469a493f7ae0..4aa248b6b3bd 100644
> --- a/include/linux/iio/imu/adis.h
> +++ b/include/linux/iio/imu/adis.h
> @@ -27,6 +27,7 @@ struct adis_burst;
>   * struct adis_data - ADIS chip variant specific data
>   * @read_delay: SPI delay for read operations in us
>   * @write_delay: SPI delay for write operations in us
> + * @cs_stall_delay: SPI stall delay between transfers in us
>   * @glob_cmd_reg: Register address of the GLOB_CMD register
>   * @msc_ctrl_reg: Register address of the MSC_CTRL register
>   * @diag_stat_reg: Register address of the DIAG_STAT register
> @@ -36,6 +37,7 @@ struct adis_burst;
>  struct adis_data {
>  	unsigned int read_delay;
>  	unsigned int write_delay;
> +	unsigned int cs_stall_delay;
>  
>  	unsigned int glob_cmd_reg;
>  	unsigned int msc_ctrl_reg;


  reply	other threads:[~2019-06-26 18:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25 13:13 [PATCH 1/5] MAINTAINERS: add ADIS IMU driver library entry Alexandru Ardelean
2019-06-25 13:13 ` [PATCH 2/5] drivers: spi: core: Add optional stall delay between cs_change transfers Alexandru Ardelean
2019-06-26 18:34   ` Jonathan Cameron
2019-06-27 13:29     ` Ardelean, Alexandru
2019-07-09 14:12     ` Mark Brown
2019-07-17 11:37       ` Ardelean, Alexandru
2019-06-25 13:13 ` [PATCH 3/5] iio: imu: adis: Add support for SPI transfer cs_change_stall_delay_us Alexandru Ardelean
2019-06-26 18:35   ` Jonathan Cameron [this message]
2019-06-25 13:13 ` [PATCH 4/5] iio: imu: Add support for the ADIS16460 IMU Alexandru Ardelean
2019-06-26 18:47   ` Jonathan Cameron
2019-06-27 13:44     ` Ardelean, Alexandru
2019-06-26 18:32 ` [PATCH 1/5] MAINTAINERS: add ADIS IMU driver library entry Jonathan Cameron
2019-06-27 13:26   ` Ardelean, Alexandru

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=20190626193524.2bf08a14@archlinux \
    --to=jic23@jic23.retrosnub.co.uk \
    --cc=alexandru.ardelean@analog.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=michael.hennerich@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).