From: "Nuno Sá" <noname.nuno@gmail.com>
To: Angelo Dureghello <adureghello@baylibre.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Jonathan Cameron <jic23@kernel.org>,
David Lechner <dlechner@baylibre.com>,
Nuno Sa <nuno.sa@analog.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 9/9] iio: dac: ad3552r-hs: update function name (non functional)
Date: Mon, 13 Jan 2025 16:11:14 +0000 [thread overview]
Message-ID: <4436a3be542569959a640c78397db67d3152c895.camel@gmail.com> (raw)
In-Reply-To: <20250110-wip-bl-ad3552r-axi-v0-iio-testing-carlos-v3-9-ab42aef0d840@baylibre.com>
On Fri, 2025-01-10 at 11:24 +0100, Angelo Dureghello wrote:
> From: Angelo Dureghello <adureghello@baylibre.com>
>
> Update ad3552r_qspi_update_reg_bits function name to a more
> generic name, since used mode can be SIMPLE/DUAL/QUAD SPI.
>
> Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
> ---
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
> drivers/iio/dac/ad3552r-hs.c | 64 ++++++++++++++++++++-----------------------
> -
> 1 file changed, 29 insertions(+), 35 deletions(-)
>
> diff --git a/drivers/iio/dac/ad3552r-hs.c b/drivers/iio/dac/ad3552r-hs.c
> index 4600a9e84dfc..7f3a70cfbef8 100644
> --- a/drivers/iio/dac/ad3552r-hs.c
> +++ b/drivers/iio/dac/ad3552r-hs.c
> @@ -56,9 +56,9 @@ struct ad3552r_hs_state {
> u32 config_d;
> };
>
> -static int ad3552r_qspi_update_reg_bits(struct ad3552r_hs_state *st,
> - u32 reg, u32 mask, u32 val,
> - size_t xfer_size)
> +static int ad3552r_update_reg_bits(struct ad3552r_hs_state *st,
> + u32 reg, u32 mask, u32 val,
> + size_t xfer_size)
> {
> u32 rval;
> int ret;
> @@ -206,9 +206,8 @@ static int ad3552r_hs_buffer_postenable(struct iio_dev
> *indio_dev)
> */
>
> /* Primary region access, set streaming mode (now in SPI + SDR). */
> - ret = ad3552r_qspi_update_reg_bits(st,
> -
> AD3552R_REG_ADDR_INTERFACE_CONFIG_B,
> - AD3552R_MASK_SINGLE_INST, 0, 1);
> + ret = ad3552r_update_reg_bits(st,
> AD3552R_REG_ADDR_INTERFACE_CONFIG_B,
> + AD3552R_MASK_SINGLE_INST, 0, 1);
> if (ret)
> return ret;
>
> @@ -217,10 +216,9 @@ static int ad3552r_hs_buffer_postenable(struct iio_dev
> *indio_dev)
> * len value so it's not cleared hereafter when enabling streaming
> mode
> * (cleared by CS_ up).
> */
> - ret = ad3552r_qspi_update_reg_bits(st,
> - AD3552R_REG_ADDR_TRANSFER_REGISTER,
> - AD3552R_MASK_STREAM_LENGTH_KEEP_VALUE,
> - AD3552R_MASK_STREAM_LENGTH_KEEP_VALUE, 1);
> + ret = ad3552r_update_reg_bits(st, AD3552R_REG_ADDR_TRANSFER_REGISTER,
> + AD3552R_MASK_STREAM_LENGTH_KEEP_VALUE,
> + AD3552R_MASK_STREAM_LENGTH_KEEP_VALUE,
> 1);
> if (ret)
> goto exit_err_streaming;
>
> @@ -250,7 +248,7 @@ static int ad3552r_hs_buffer_postenable(struct iio_dev
> *indio_dev)
>
> /*
> * From here onward mode is DDR, so reading any register is not
> possible
> - * anymore, including calling "ad3552r_qspi_update_reg_bits"
> function.
> + * anymore, including calling "ad3552r_update_reg_bits" function.
> */
>
> /* Set target to best high speed mode (D or QSPI). */
> @@ -351,18 +349,16 @@ static int ad3552r_hs_buffer_predisable(struct iio_dev
> *indio_dev)
> * Back to simple SPI for secondary region too now, so to be able to
> * dump/read registers there too if needed.
> */
> - ret = ad3552r_qspi_update_reg_bits(st,
> -
> AD3552R_REG_ADDR_TRANSFER_REGISTER,
> - AD3552R_MASK_MULTI_IO_MODE,
> - AD3552R_SPI, 1);
> + ret = ad3552r_update_reg_bits(st, AD3552R_REG_ADDR_TRANSFER_REGISTER,
> + AD3552R_MASK_MULTI_IO_MODE,
> + AD3552R_SPI, 1);
> if (ret)
> return ret;
>
> /* Back to single instruction mode, disabling loop. */
> - ret = ad3552r_qspi_update_reg_bits(st,
> -
> AD3552R_REG_ADDR_INTERFACE_CONFIG_B,
> - AD3552R_MASK_SINGLE_INST,
> - AD3552R_MASK_SINGLE_INST, 1);
> + ret = ad3552r_update_reg_bits(st,
> AD3552R_REG_ADDR_INTERFACE_CONFIG_B,
> + AD3552R_MASK_SINGLE_INST,
> + AD3552R_MASK_SINGLE_INST, 1);
> if (ret)
> return ret;
>
> @@ -379,10 +375,10 @@ static inline int ad3552r_hs_set_output_range(struct
> ad3552r_hs_state *st,
> else
> val = FIELD_PREP(AD3552R_MASK_CH1_RANGE, mode);
>
> - return ad3552r_qspi_update_reg_bits(st,
> -
> AD3552R_REG_ADDR_CH0_CH1_OUTPUT_RANGE,
> - AD3552R_MASK_CH_OUTPUT_RANGE_SEL(ch),
> - val, 1);
> + return ad3552r_update_reg_bits(st,
> + AD3552R_REG_ADDR_CH0_CH1_OUTPUT_RANGE,
> + AD3552R_MASK_CH_OUTPUT_RANGE_SEL(ch),
> + val, 1);
> }
>
> static int ad3552r_hs_reset(struct ad3552r_hs_state *st)
> @@ -398,10 +394,10 @@ static int ad3552r_hs_reset(struct ad3552r_hs_state *st)
> fsleep(10);
> gpiod_set_value_cansleep(st->reset_gpio, 0);
> } else {
> - ret = ad3552r_qspi_update_reg_bits(st,
> - AD3552R_REG_ADDR_INTERFACE_CONFIG_A,
> - AD3552R_MASK_SOFTWARE_RESET,
> - AD3552R_MASK_SOFTWARE_RESET, 1);
> + ret = ad3552r_update_reg_bits(st,
> + AD3552R_REG_ADDR_INTERFACE_CONFIG_A,
> + AD3552R_MASK_SOFTWARE_RESET,
> + AD3552R_MASK_SOFTWARE_RESET, 1);
> if (ret)
> return ret;
> }
> @@ -534,19 +530,17 @@ static int ad3552r_hs_setup(struct ad3552r_hs_state *st)
>
> val = ret;
>
> - ret = ad3552r_qspi_update_reg_bits(st,
> - AD3552R_REG_ADDR_SH_REFERENCE_CONFIG,
> - AD3552R_MASK_REFERENCE_VOLTAGE_SEL,
> - val, 1);
> + ret = ad3552r_update_reg_bits(st,
> AD3552R_REG_ADDR_SH_REFERENCE_CONFIG,
> + AD3552R_MASK_REFERENCE_VOLTAGE_SEL,
> + val, 1);
> if (ret)
> return ret;
>
> ret = ad3552r_get_drive_strength(st->dev, &val);
> if (!ret) {
> - ret = ad3552r_qspi_update_reg_bits(st,
> - AD3552R_REG_ADDR_INTERFACE_CONFIG_D,
> - AD3552R_MASK_SDO_DRIVE_STRENGTH,
> - val, 1);
> + ret = ad3552r_update_reg_bits(st,
> + AD3552R_REG_ADDR_INTERFACE_CONFIG_D,
> + AD3552R_MASK_SDO_DRIVE_STRENGTH, val, 1);
> if (ret)
> return ret;
> }
>
next prev parent reply other threads:[~2025-01-13 16:11 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 10:24 [PATCH v3 0/9] iio: ad3552r-hs: add support for ad3541/42r Angelo Dureghello Angelo Dureghello
2025-01-10 10:24 ` [PATCH v3 1/9] iio: dac: ad3552r-common: fix ad3541/2r ranges Angelo Dureghello
2025-01-13 15:56 ` Nuno Sá
2025-01-10 10:24 ` [PATCH v3 2/9] iio: dac: ad3552r-hs: clear reset status flag Angelo Dureghello
2025-01-12 15:04 ` Jonathan Cameron
2025-01-13 15:58 ` Nuno Sá
2025-01-13 16:57 ` Angelo Dureghello
2025-01-10 10:24 ` [PATCH v3 3/9] iio: dac: adi-axi-dac: modify stream enable Angelo Dureghello
2025-01-13 16:00 ` Nuno Sá
2025-01-10 10:24 ` [PATCH v3 4/9] iio: dac: adi-axi-dac: add bus mode setup Angelo Dureghello
2025-01-13 16:05 ` Nuno Sá
2025-01-10 10:24 ` [PATCH v3 5/9] iio: dac: ad3552r-hs: fix message on wrong chip id Angelo Dureghello
2025-01-13 16:07 ` Nuno Sá
2025-01-10 10:24 ` [PATCH v3 6/9] iio: dac: ad3552r-hs: use instruction mode for configuration Angelo Dureghello
2025-01-10 15:37 ` David Lechner
2025-01-13 16:08 ` Nuno Sá
2025-01-10 10:24 ` [PATCH v3 7/9] iio: dac: ad3552r: share model data structures Angelo Dureghello
2025-01-10 15:39 ` David Lechner
2025-01-13 16:10 ` Nuno Sá
2025-01-10 10:24 ` [PATCH v3 8/9] iio: dac: ad3552r-hs: add ad3541/2r support Angelo Dureghello
2025-01-10 16:12 ` David Lechner
2025-01-12 15:06 ` Jonathan Cameron
2025-01-10 10:24 ` [PATCH v3 9/9] iio: dac: ad3552r-hs: update function name (non functional) Angelo Dureghello
2025-01-10 16:14 ` David Lechner
2025-01-13 16:11 ` Nuno Sá [this message]
2025-01-13 20:55 ` Angelo Dureghello
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=4436a3be542569959a640c78397db67d3152c895.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=Michael.Hennerich@analog.com \
--cc=adureghello@baylibre.com \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@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