[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250412190203.731aa10d@jic23-huawei>
Date: Sat, 12 Apr 2025 19:02:03 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Jonathan Santos <Jonathan.Santos@...log.com>
Cc: <linux-iio@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-gpio@...r.kernel.org>,
<lars@...afoo.de>, <Michael.Hennerich@...log.com>,
<marcelo.schmitt@...log.com>, <robh@...nel.org>, <krzk+dt@...nel.org>,
<conor+dt@...nel.org>, <marcelo.schmitt1@...il.com>,
<linus.walleij@...aro.org>, <brgl@...ev.pl>, <lgirdwood@...il.com>,
<broonie@...nel.org>, <jonath4nns@...il.com>, <dlechner@...libre.com>
Subject: Re: [PATCH v5 08/14] iio: adc: ad7768-1: add regulator to control
VCM output
On Fri, 11 Apr 2025 12:57:42 -0300
Jonathan Santos <Jonathan.Santos@...log.com> wrote:
> The VCM output voltage can be used as a common-mode voltage within the
> amplifier preconditioning circuits external to the AD7768-1.
>
> This change allows the user to configure VCM output using the regulator
> framework.
>
> Acked-by: Marcelo Schmitt <marcelo.schmitt@...log.com>
> Signed-off-by: Jonathan Santos <Jonathan.Santos@...log.com>
Just one question from me inline.
> diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c
> index 66087fabe181..13d17a13b6ea 100644
> --- a/drivers/iio/adc/ad7768-1.c
> +++ b/drivers/iio/adc/ad7768-1.c
> +static const struct regulator_desc vcm_desc = {
> + .name = "ad7768-1-vcm",
> + .of_match = of_match_ptr("vcm-output"),
> + .regulators_node = of_match_ptr("regulators"),
I see this use of of_match_ptr() is common but not universal in regulator
drivers. Any idea if it really is just to save a string or if there
some more fundamental reason to make these go away when device
tree support is not built?
We spent a while getting other uses of this out of IIO so I'd like to know
more about this one!
Jonathan
> + .n_voltages = ARRAY_SIZE(vcm_voltage_table),
> + .volt_table = vcm_voltage_table,
> + .ops = &vcm_regulator_ops,
> + .type = REGULATOR_VOLTAGE,
> + .owner = THIS_MODULE,
> +};
Powered by blists - more mailing lists