Linux IIO development
 help / color / mirror / Atom feed
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>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: dac: ad3552r-hs: add debugfs reg access
Date: Wed, 19 Mar 2025 12:11:03 +0000	[thread overview]
Message-ID: <83ee5dd5c427355b38c1c5a63cdae4a114acd1ce.camel@gmail.com> (raw)
In-Reply-To: <20250319-wip-bl-ad3552r-fixes-v1-1-cf10d6fae52a@baylibre.com>

On Wed, 2025-03-19 at 12:02 +0100, Angelo Dureghello wrote:
> From: Angelo Dureghello <adureghello@baylibre.com>
> 
> Add debugfs register access.
> 
> Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
> ---

Minor nit you might consider to change if a v2 is needed for some reason...

Reviewed-by: Nuno Sá <nuno.sa@analog.com>

>  drivers/iio/dac/ad3552r-hs.c | 31 +++++++++++++++++++++++++++++++
>  drivers/iio/dac/ad3552r.h    |  2 ++
>  2 files changed, 33 insertions(+)
> 
> diff --git a/drivers/iio/dac/ad3552r-hs.c b/drivers/iio/dac/ad3552r-hs.c
> index
> cd8dabb60c5548780f0fce5d1b68c494cd71321d..7bb6d8817a545f16de9432526ae28787af1a
> 0146 100644
> --- a/drivers/iio/dac/ad3552r-hs.c
> +++ b/drivers/iio/dac/ad3552r-hs.c
> @@ -7,6 +7,7 @@
>   */
>  
>  #include <linux/bitfield.h>
> +#include <linux/debugfs.h>
>  #include <linux/delay.h>
>  #include <linux/gpio/consumer.h>
>  #include <linux/iio/backend.h>
> @@ -56,6 +57,15 @@ struct ad3552r_hs_state {
>  	u32 config_d;
>  };
>  
> +static int ad3552r_hs_get_reg_length(unsigned int reg)
> +{
> +	/*
> +	 * There is no 3 or 4 bytes r/w len possible in HDL, so keeping 2
> +	 * also for the 24bit area.
> +	 */
> +	return (reg > AD3552R_SECONDARY_REGION_START) ? 2 : 1;
> +}
> +

I wonder about the added value of the above. Since it's really only used once, I
would do it inline


      reply	other threads:[~2025-03-19 12:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19 11:02 [PATCH] iio: dac: ad3552r-hs: add debugfs reg access Angelo Dureghello
2025-03-19 12:11 ` Nuno Sá [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=83ee5dd5c427355b38c1c5a63cdae4a114acd1ce.camel@gmail.com \
    --to=noname.nuno@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=adureghello@baylibre.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