diff mbox series

[v8,3/5] iio: adc: qcom-spmi-adc5: add ADC5_VREF_VADC to rev2 ADC5

Message ID 20220818221815.346233-3-robimarko@gmail.com
State Accepted
Commit 83de806074980ea94930ca4ff6754fecf9ad8290
Headers show
Series [v8,1/5] dt-bindings: mfd: qcom-spmi-pmic: add support for PMP8074 | expand

Commit Message

Robert Marko Aug. 18, 2022, 10:18 p.m. UTC
Add support for ADC5_VREF_VADC channel to rev2 ADC5 channel list.
This channel measures the VADC reference LDO output.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/adc/qcom-spmi-adc5.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jonathan Cameron Aug. 19, 2022, 5:30 p.m. UTC | #1
On Fri, 19 Aug 2022 00:18:13 +0200
Robert Marko <robimarko@gmail.com> wrote:

> Add support for ADC5_VREF_VADC channel to rev2 ADC5 channel list.
> This channel measures the VADC reference LDO output.
> 
> Signed-off-by: Robert Marko <robimarko@gmail.com>
> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

I've changed my mind on this, mostly because we've reached a new
cycle and I'd rather not see a v9 series + Lee is (I think)
keen to only take stuff through MFD if there is a build time
dependency.

Applied this patch directly to the togreg branch of iio.git
and pushed that out as testing for 0-day to play with it.
> ---
>  drivers/iio/adc/qcom-spmi-adc5.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c
> index e96da2ef1964..821fee60a765 100644
> --- a/drivers/iio/adc/qcom-spmi-adc5.c
> +++ b/drivers/iio/adc/qcom-spmi-adc5.c
> @@ -597,6 +597,8 @@ static const struct adc5_channels adc5_chans_rev2[ADC5_MAX_CHANNEL] = {
>  					SCALE_HW_CALIB_DEFAULT)
>  	[ADC5_1P25VREF]		= ADC5_CHAN_VOLT("vref_1p25", 0,
>  					SCALE_HW_CALIB_DEFAULT)
> +	[ADC5_VREF_VADC]	= ADC5_CHAN_VOLT("vref_vadc", 0,
> +					SCALE_HW_CALIB_DEFAULT)
>  	[ADC5_VPH_PWR]		= ADC5_CHAN_VOLT("vph_pwr", 1,
>  					SCALE_HW_CALIB_DEFAULT)
>  	[ADC5_VBAT_SNS]		= ADC5_CHAN_VOLT("vbat_sns", 1,
Robert Marko Aug. 20, 2022, 10:06 a.m. UTC | #2
On Fri, 19 Aug 2022 at 19:20, Jonathan Cameron <jic23@kernel.org> wrote:
>
> On Fri, 19 Aug 2022 00:18:13 +0200
> Robert Marko <robimarko@gmail.com> wrote:
>
> > Add support for ADC5_VREF_VADC channel to rev2 ADC5 channel list.
> > This channel measures the VADC reference LDO output.
> >
> > Signed-off-by: Robert Marko <robimarko@gmail.com>
> > Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> I've changed my mind on this, mostly because we've reached a new
> cycle and I'd rather not see a v9 series + Lee is (I think)
> keen to only take stuff through MFD if there is a build time
> dependency.
>
> Applied this patch directly to the togreg branch of iio.git
> and pushed that out as testing for 0-day to play with it.

Thanks,
Robert

> > ---
> >  drivers/iio/adc/qcom-spmi-adc5.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c
> > index e96da2ef1964..821fee60a765 100644
> > --- a/drivers/iio/adc/qcom-spmi-adc5.c
> > +++ b/drivers/iio/adc/qcom-spmi-adc5.c
> > @@ -597,6 +597,8 @@ static const struct adc5_channels adc5_chans_rev2[ADC5_MAX_CHANNEL] = {
> >                                       SCALE_HW_CALIB_DEFAULT)
> >       [ADC5_1P25VREF]         = ADC5_CHAN_VOLT("vref_1p25", 0,
> >                                       SCALE_HW_CALIB_DEFAULT)
> > +     [ADC5_VREF_VADC]        = ADC5_CHAN_VOLT("vref_vadc", 0,
> > +                                     SCALE_HW_CALIB_DEFAULT)
> >       [ADC5_VPH_PWR]          = ADC5_CHAN_VOLT("vph_pwr", 1,
> >                                       SCALE_HW_CALIB_DEFAULT)
> >       [ADC5_VBAT_SNS]         = ADC5_CHAN_VOLT("vbat_sns", 1,
>
diff mbox series

Patch

diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c
index e96da2ef1964..821fee60a765 100644
--- a/drivers/iio/adc/qcom-spmi-adc5.c
+++ b/drivers/iio/adc/qcom-spmi-adc5.c
@@ -597,6 +597,8 @@  static const struct adc5_channels adc5_chans_rev2[ADC5_MAX_CHANNEL] = {
 					SCALE_HW_CALIB_DEFAULT)
 	[ADC5_1P25VREF]		= ADC5_CHAN_VOLT("vref_1p25", 0,
 					SCALE_HW_CALIB_DEFAULT)
+	[ADC5_VREF_VADC]	= ADC5_CHAN_VOLT("vref_vadc", 0,
+					SCALE_HW_CALIB_DEFAULT)
 	[ADC5_VPH_PWR]		= ADC5_CHAN_VOLT("vph_pwr", 1,
 					SCALE_HW_CALIB_DEFAULT)
 	[ADC5_VBAT_SNS]		= ADC5_CHAN_VOLT("vbat_sns", 1,