[v1,0/2] adding support for Microchip PAC193X Power Monitor

Message ID 20230220123232.413029-1-marius.cristea@microchip.com
Headers
Series adding support for Microchip PAC193X Power Monitor |

Message

marius.cristea@microchip.com Feb. 20, 2023, 12:32 p.m. UTC
  From: Marius Cristea <marius.cristea@microchip.com>

Adding support for Microchip PAC193X series of Power Monitor with
Accumulator chip family.

Differences related to previous patch:

v1:
- first version comitted to review


Marius Cristea (2):
  dt-bindings: iio: adc: adding dt-bindings for PAC193X
  iio: adc: adding support for pac193x

 .../bindings/iio/adc/microchip,pac193x.yaml   |  122 +
 MAINTAINERS                                   |    7 +
 drivers/iio/adc/Kconfig                       |   12 +
 drivers/iio/adc/Makefile                      |    1 +
 drivers/iio/adc/pac193x.c                     | 2072 +++++++++++++++++
 5 files changed, 2214 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/microchip,pac193x.yaml
 create mode 100644 drivers/iio/adc/pac193x.c
  

Comments

Jonathan Cameron Feb. 25, 2023, 5:11 p.m. UTC | #1
On Mon, 20 Feb 2023 14:32:30 +0200
<marius.cristea@microchip.com> wrote:

> From: Marius Cristea <marius.cristea@microchip.com>
> 
> Adding support for Microchip PAC193X series of Power Monitor with
> Accumulator chip family.

This device is at the messy boundary between IIO and HWMON. Perhaps call out
the reasons you think IIO is more appropriate in this cover letter.
+ Often a good idea for these borderline parts to cc both mailing lists and
maintainers.

Often the conclusion is that it is fine to have these in IIO because we can
bridge to hwmon anyway with the iio-hwmon driver.

> 
> Differences related to previous patch:
> 
> v1:
> - first version comitted to review
> 
> 
> Marius Cristea (2):
>   dt-bindings: iio: adc: adding dt-bindings for PAC193X
>   iio: adc: adding support for pac193x
> 
>  .../bindings/iio/adc/microchip,pac193x.yaml   |  122 +
>  MAINTAINERS                                   |    7 +
>  drivers/iio/adc/Kconfig                       |   12 +
>  drivers/iio/adc/Makefile                      |    1 +
>  drivers/iio/adc/pac193x.c                     | 2072 +++++++++++++++++
>  5 files changed, 2214 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/microchip,pac193x.yaml
>  create mode 100644 drivers/iio/adc/pac193x.c
>
  
marius.cristea@microchip.com March 6, 2023, 2:03 p.m. UTC | #2
Hi Jonathan,

  Please, see my comments below...


On Sat, 2023-02-25 at 17:11 +0000, Jonathan Cameron wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> On Mon, 20 Feb 2023 14:32:30 +0200
> <marius.cristea@microchip.com> wrote:
> 
> > From: Marius Cristea <marius.cristea@microchip.com>
> > 
> > Adding support for Microchip PAC193X series of Power Monitor with
> > Accumulator chip family.
> 
> This device is at the messy boundary between IIO and HWMON. Perhaps
> call out
> the reasons you think IIO is more appropriate in this cover letter.
> + Often a good idea for these borderline parts to cc both mailing
> lists and
> maintainers.
> 
> Often the conclusion is that it is fine to have these in IIO because
> we can
> bridge to hwmon anyway with the iio-hwmon driver.
> 

Indeed the driver (the device) is at the boundary between IIO and
HWMON. I was thinking to start with a simple driver (this one that is
more apropiate to be a HWMON) and add more functionality later (like
data buffering that is quite important for example if someone wants to
profile power consumtion of the procesor itself, or a pheriperic, or a
battery)


> > 
> > Differences related to previous patch:
> > 
> > v1:
> > - first version comitted to review
> > 
> > 
> > Marius Cristea (2):
> >   dt-bindings: iio: adc: adding dt-bindings for PAC193X
> >   iio: adc: adding support for pac193x
> > 
> >  .../bindings/iio/adc/microchip,pac193x.yaml   |  122 +
> >  MAINTAINERS                                   |    7 +
> >  drivers/iio/adc/Kconfig                       |   12 +
> >  drivers/iio/adc/Makefile                      |    1 +
> >  drivers/iio/adc/pac193x.c                     | 2072
> > +++++++++++++++++
> >  5 files changed, 2214 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/iio/adc/microchip,pac193x.yaml
> >  create mode 100644 drivers/iio/adc/pac193x.c
> > 
> 

Thanks,
Marius
  
Jonathan Cameron March 12, 2023, 4:45 p.m. UTC | #3
On Mon, 6 Mar 2023 14:03:52 +0000
<Marius.Cristea@microchip.com> wrote:

> Hi Jonathan,
> 
>   Please, see my comments below...
> 
> 
> On Sat, 2023-02-25 at 17:11 +0000, Jonathan Cameron wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you
> > know the content is safe
> > 
> > On Mon, 20 Feb 2023 14:32:30 +0200
> > <marius.cristea@microchip.com> wrote:
> >   
> > > From: Marius Cristea <marius.cristea@microchip.com>
> > > 
> > > Adding support for Microchip PAC193X series of Power Monitor with
> > > Accumulator chip family.  
> > 
> > This device is at the messy boundary between IIO and HWMON. Perhaps
> > call out
> > the reasons you think IIO is more appropriate in this cover letter.
> > + Often a good idea for these borderline parts to cc both mailing
> > lists and
> > maintainers.
> > 
> > Often the conclusion is that it is fine to have these in IIO because
> > we can
> > bridge to hwmon anyway with the iio-hwmon driver.
> >   
> 
> Indeed the driver (the device) is at the boundary between IIO and
> HWMON. I was thinking to start with a simple driver (this one that is
> more apropiate to be a HWMON) and add more functionality later (like
> data buffering that is quite important for example if someone wants to
> profile power consumtion of the procesor itself, or a pheriperic, or a
> battery)
> 

OK. List out some of the things you want to do later as the reasoning
+CC hmwon maintainers just to be sure.  They are usually fine with this
sort of reasoning, but it is best to check anyway.

Thanks,

Jonathan


> 
> > > 
> > > Differences related to previous patch:
> > > 
> > > v1:
> > > - first version comitted to review
> > > 
> > > 
> > > Marius Cristea (2):
> > >   dt-bindings: iio: adc: adding dt-bindings for PAC193X
> > >   iio: adc: adding support for pac193x
> > > 
> > >  .../bindings/iio/adc/microchip,pac193x.yaml   |  122 +
> > >  MAINTAINERS                                   |    7 +
> > >  drivers/iio/adc/Kconfig                       |   12 +
> > >  drivers/iio/adc/Makefile                      |    1 +
> > >  drivers/iio/adc/pac193x.c                     | 2072
> > > +++++++++++++++++
> > >  5 files changed, 2214 insertions(+)
> > >  create mode 100644
> > > Documentation/devicetree/bindings/iio/adc/microchip,pac193x.yaml
> > >  create mode 100644 drivers/iio/adc/pac193x.c
> > >   
> >   
> 
> Thanks,
> Marius
>