mbox series

[v3,0/7] iio: adc: stm32-adc: add internal channels support

Message ID 20210924083410.12332-1-olivier.moysan@foss.st.com (mailing list archive)
Headers show
Series iio: adc: stm32-adc: add internal channels support | expand

Message

Olivier Moysan Sept. 24, 2021, 8:34 a.m. UTC
This patchset adds support of ADC2 internal channels VDDCORE, VREFINT and VBAT
on STM32MP15x SoCs. The generic IIO channel bindings is also introduced here
to provide this feature. The legacy channel binding is kept for backward compatibility.

Changes in v2:
- Add 'deprecated' to channels legacy properties in ADC bindings
- Add set/clr service for common registers, to make code more generic in
  internal channels enable/disable services.
- Expose vrefint channel as a processed channel to return
  the actual value of vrefp.
- Minor code improvements

Changes in v3:
- fix vrefint sampling time check.

Olivier Moysan (7):
  dt-bindings: iio: stm32-adc: add generic channel binding
  dt-bindings: iio: stm32-adc: add nvmem support for vrefint internal
    channel
  iio: adc: stm32-adc: split channel init into several routines
  iio: adc: stm32-adc: add support of generic channels binding
  iio: adc: stm32-adc: add support of internal channels
  iio: adc: stm32-adc: add vrefint calibration support
  iio: adc: stm32-adc: use generic binding for sample-time

 .../bindings/iio/adc/st,stm32-adc.yaml        | 108 ++++-
 drivers/iio/adc/stm32-adc-core.h              |   8 +
 drivers/iio/adc/stm32-adc.c                   | 426 ++++++++++++++++--
 3 files changed, 487 insertions(+), 55 deletions(-)

Comments

Jonathan Cameron Sept. 26, 2021, 12:23 p.m. UTC | #1
On Fri, 24 Sep 2021 10:34:03 +0200
Olivier Moysan <olivier.moysan@foss.st.com> wrote:

> This patchset adds support of ADC2 internal channels VDDCORE, VREFINT and VBAT
> on STM32MP15x SoCs. The generic IIO channel bindings is also introduced here
> to provide this feature. The legacy channel binding is kept for backward compatibility.

Hi Olivier,

I had a read through and am happy with how this looks now.
I'll leave it on the list for a while longer because Rob may well want to take
a final look at patch 1.

Obviously input from other people also welcome!

If it looks like I have forgotten it in a few weeks feel free to poke me.

Thanks,

Jonathan

> 
> Changes in v2:
> - Add 'deprecated' to channels legacy properties in ADC bindings
> - Add set/clr service for common registers, to make code more generic in
>   internal channels enable/disable services.
> - Expose vrefint channel as a processed channel to return
>   the actual value of vrefp.
> - Minor code improvements
> 
> Changes in v3:
> - fix vrefint sampling time check.
> 
> Olivier Moysan (7):
>   dt-bindings: iio: stm32-adc: add generic channel binding
>   dt-bindings: iio: stm32-adc: add nvmem support for vrefint internal
>     channel
>   iio: adc: stm32-adc: split channel init into several routines
>   iio: adc: stm32-adc: add support of generic channels binding
>   iio: adc: stm32-adc: add support of internal channels
>   iio: adc: stm32-adc: add vrefint calibration support
>   iio: adc: stm32-adc: use generic binding for sample-time
> 
>  .../bindings/iio/adc/st,stm32-adc.yaml        | 108 ++++-
>  drivers/iio/adc/stm32-adc-core.h              |   8 +
>  drivers/iio/adc/stm32-adc.c                   | 426 ++++++++++++++++--
>  3 files changed, 487 insertions(+), 55 deletions(-)
>
Fabrice Gasnier Sept. 27, 2021, 4:40 p.m. UTC | #2
On 9/24/21 10:34 AM, Olivier Moysan wrote:
> This patchset adds support of ADC2 internal channels VDDCORE, VREFINT and VBAT
> on STM32MP15x SoCs. The generic IIO channel bindings is also introduced here
> to provide this feature. The legacy channel binding is kept for backward compatibility.
> 
> Changes in v2:
> - Add 'deprecated' to channels legacy properties in ADC bindings
> - Add set/clr service for common registers, to make code more generic in
>   internal channels enable/disable services.
> - Expose vrefint channel as a processed channel to return
>   the actual value of vrefp.
> - Minor code improvements
> 
> Changes in v3:
> - fix vrefint sampling time check.
> 
> Olivier Moysan (7):
>   dt-bindings: iio: stm32-adc: add generic channel binding
>   dt-bindings: iio: stm32-adc: add nvmem support for vrefint internal
>     channel
>   iio: adc: stm32-adc: split channel init into several routines
>   iio: adc: stm32-adc: add support of generic channels binding
>   iio: adc: stm32-adc: add support of internal channels


Hi Olivier,

I've one remark on patch "... add support of internal channels".

For the other patches, you can add my
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>

Thanks!
Fabrice

>   iio: adc: stm32-adc: add vrefint calibration support
>   iio: adc: stm32-adc: use generic binding for sample-time>
>  .../bindings/iio/adc/st,stm32-adc.yaml        | 108 ++++-
>  drivers/iio/adc/stm32-adc-core.h              |   8 +
>  drivers/iio/adc/stm32-adc.c                   | 426 ++++++++++++++++--
>  3 files changed, 487 insertions(+), 55 deletions(-)
>