Re: [PATCH v3 4/4] staging: iio: ad7816: Add device tree table.

2018-11-14 Thread Nishad Kamdar
On Sun, Nov 11, 2018 at 12:38:02PM +, Jonathan Cameron wrote:
> On Fri, 9 Nov 2018 08:11:57 +
> "Ardelean, Alexandru"  wrote:
> 
> > On Fri, 2018-11-09 at 13:08 +0530, Nishad Kamdar wrote:
> > > Add device tree table for matching vendor ID.  
> > 
> > One comment inline for this.
> > 
> > Thanks
> > Alex
> > 
> > > 
> > > Signed-off-by: Nishad Kamdar 
> > > ---
> > >  drivers/staging/iio/adc/ad7816.c | 7 +++
> > >  1 file changed, 7 insertions(+)
> > > 
> > > diff --git a/drivers/staging/iio/adc/ad7816.c
> > > b/drivers/staging/iio/adc/ad7816.c
> > > index a2fead85cd46..b8a9149fbac1 100644
> > > --- a/drivers/staging/iio/adc/ad7816.c
> > > +++ b/drivers/staging/iio/adc/ad7816.c
> > > @@ -422,6 +422,12 @@ static int ad7816_probe(struct spi_device *spi_dev)
> > >   return 0;
> > >  }
> > >  
> > > +static const struct of_device_id ad7816_of_match[] = {
> > > + { .compatible = "adi,ad7816", },  
> > 
> > I think you also need to add:
> > +   { .compatible = "adi,ad7817", },
> > +   { .compatible = "adi,ad7818", },
> > 
> 
> Yes, please add all parts to the dt binding.
> Particularly as they are functionally different in this case!
> 
> Please send a v4 for just this patch as the rest have now been
> applied.
> 
> Thanks,
> 
> 
> Jonathan
> 
> > > + { }
> > > +};
> > > +MODULE_DEVICE_TABLE(of, ad7816_of_match);
> > > +
> > >  static const struct spi_device_id ad7816_id[] = {
> > >   { "ad7816", ID_AD7816 },
> > >   { "ad7817", ID_AD7817 },
> > > @@ -434,6 +440,7 @@ MODULE_DEVICE_TABLE(spi, ad7816_id);
> > >  static struct spi_driver ad7816_driver = {
> > >   .driver = {
> > >   .name = "ad7816",
> > > + .of_match_table = of_match_ptr(ad7816_of_match),
> > >   },
> > >   .probe = ad7816_probe,
> > >   .id_table = ad7816_id,  
>

Ok. I'll do that.

Thanks for the reivew.

regards,
Nishad


Re: [PATCH v3 4/4] staging: iio: ad7816: Add device tree table.

2018-11-14 Thread Nishad Kamdar
On Sun, Nov 11, 2018 at 12:38:02PM +, Jonathan Cameron wrote:
> On Fri, 9 Nov 2018 08:11:57 +
> "Ardelean, Alexandru"  wrote:
> 
> > On Fri, 2018-11-09 at 13:08 +0530, Nishad Kamdar wrote:
> > > Add device tree table for matching vendor ID.  
> > 
> > One comment inline for this.
> > 
> > Thanks
> > Alex
> > 
> > > 
> > > Signed-off-by: Nishad Kamdar 
> > > ---
> > >  drivers/staging/iio/adc/ad7816.c | 7 +++
> > >  1 file changed, 7 insertions(+)
> > > 
> > > diff --git a/drivers/staging/iio/adc/ad7816.c
> > > b/drivers/staging/iio/adc/ad7816.c
> > > index a2fead85cd46..b8a9149fbac1 100644
> > > --- a/drivers/staging/iio/adc/ad7816.c
> > > +++ b/drivers/staging/iio/adc/ad7816.c
> > > @@ -422,6 +422,12 @@ static int ad7816_probe(struct spi_device *spi_dev)
> > >   return 0;
> > >  }
> > >  
> > > +static const struct of_device_id ad7816_of_match[] = {
> > > + { .compatible = "adi,ad7816", },  
> > 
> > I think you also need to add:
> > +   { .compatible = "adi,ad7817", },
> > +   { .compatible = "adi,ad7818", },
> > 
> 
> Yes, please add all parts to the dt binding.
> Particularly as they are functionally different in this case!
> 
> Please send a v4 for just this patch as the rest have now been
> applied.
> 
> Thanks,
> 
> 
> Jonathan
> 
> > > + { }
> > > +};
> > > +MODULE_DEVICE_TABLE(of, ad7816_of_match);
> > > +
> > >  static const struct spi_device_id ad7816_id[] = {
> > >   { "ad7816", ID_AD7816 },
> > >   { "ad7817", ID_AD7817 },
> > > @@ -434,6 +440,7 @@ MODULE_DEVICE_TABLE(spi, ad7816_id);
> > >  static struct spi_driver ad7816_driver = {
> > >   .driver = {
> > >   .name = "ad7816",
> > > + .of_match_table = of_match_ptr(ad7816_of_match),
> > >   },
> > >   .probe = ad7816_probe,
> > >   .id_table = ad7816_id,  
>

Ok. I'll do that.

Thanks for the reivew.

regards,
Nishad


Re: [PATCH v3 4/4] staging: iio: ad7816: Add device tree table.

2018-11-14 Thread Nishad Kamdar
On Fri, Nov 09, 2018 at 08:11:57AM +, Ardelean, Alexandru wrote:
> On Fri, 2018-11-09 at 13:08 +0530, Nishad Kamdar wrote:
> > Add device tree table for matching vendor ID.
> 
> One comment inline for this.
> 
> Thanks
> Alex
> 
> > 
> > Signed-off-by: Nishad Kamdar 
> > ---
> >  drivers/staging/iio/adc/ad7816.c | 7 +++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/drivers/staging/iio/adc/ad7816.c
> > b/drivers/staging/iio/adc/ad7816.c
> > index a2fead85cd46..b8a9149fbac1 100644
> > --- a/drivers/staging/iio/adc/ad7816.c
> > +++ b/drivers/staging/iio/adc/ad7816.c
> > @@ -422,6 +422,12 @@ static int ad7816_probe(struct spi_device *spi_dev)
> > return 0;
> >  }
> >  
> > +static const struct of_device_id ad7816_of_match[] = {
> > +   { .compatible = "adi,ad7816", },
> 
> I think you also need to add:
> + { .compatible = "adi,ad7817", },
> + { .compatible = "adi,ad7818", },
> 
> > +   { }
> > +};
> > +MODULE_DEVICE_TABLE(of, ad7816_of_match);
> > +
> >  static const struct spi_device_id ad7816_id[] = {
> > { "ad7816", ID_AD7816 },
> > { "ad7817", ID_AD7817 },
> > @@ -434,6 +440,7 @@ MODULE_DEVICE_TABLE(spi, ad7816_id);
> >  static struct spi_driver ad7816_driver = {
> > .driver = {
> > .name = "ad7816",
> > +   .of_match_table = of_match_ptr(ad7816_of_match),
> > },
> > .probe = ad7816_probe,
> > .id_table = ad7816_id,

Ok. I'll do that.

Thanks for the review.

regards,
Nishad


Re: [PATCH v3 4/4] staging: iio: ad7816: Add device tree table.

2018-11-14 Thread Nishad Kamdar
On Fri, Nov 09, 2018 at 08:11:57AM +, Ardelean, Alexandru wrote:
> On Fri, 2018-11-09 at 13:08 +0530, Nishad Kamdar wrote:
> > Add device tree table for matching vendor ID.
> 
> One comment inline for this.
> 
> Thanks
> Alex
> 
> > 
> > Signed-off-by: Nishad Kamdar 
> > ---
> >  drivers/staging/iio/adc/ad7816.c | 7 +++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/drivers/staging/iio/adc/ad7816.c
> > b/drivers/staging/iio/adc/ad7816.c
> > index a2fead85cd46..b8a9149fbac1 100644
> > --- a/drivers/staging/iio/adc/ad7816.c
> > +++ b/drivers/staging/iio/adc/ad7816.c
> > @@ -422,6 +422,12 @@ static int ad7816_probe(struct spi_device *spi_dev)
> > return 0;
> >  }
> >  
> > +static const struct of_device_id ad7816_of_match[] = {
> > +   { .compatible = "adi,ad7816", },
> 
> I think you also need to add:
> + { .compatible = "adi,ad7817", },
> + { .compatible = "adi,ad7818", },
> 
> > +   { }
> > +};
> > +MODULE_DEVICE_TABLE(of, ad7816_of_match);
> > +
> >  static const struct spi_device_id ad7816_id[] = {
> > { "ad7816", ID_AD7816 },
> > { "ad7817", ID_AD7817 },
> > @@ -434,6 +440,7 @@ MODULE_DEVICE_TABLE(spi, ad7816_id);
> >  static struct spi_driver ad7816_driver = {
> > .driver = {
> > .name = "ad7816",
> > +   .of_match_table = of_match_ptr(ad7816_of_match),
> > },
> > .probe = ad7816_probe,
> > .id_table = ad7816_id,

Ok. I'll do that.

Thanks for the review.

regards,
Nishad


Re: [PATCH v3 4/4] staging: iio: ad7816: Add device tree table.

2018-11-11 Thread Jonathan Cameron
On Fri, 9 Nov 2018 08:11:57 +
"Ardelean, Alexandru"  wrote:

> On Fri, 2018-11-09 at 13:08 +0530, Nishad Kamdar wrote:
> > Add device tree table for matching vendor ID.  
> 
> One comment inline for this.
> 
> Thanks
> Alex
> 
> > 
> > Signed-off-by: Nishad Kamdar 
> > ---
> >  drivers/staging/iio/adc/ad7816.c | 7 +++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/drivers/staging/iio/adc/ad7816.c
> > b/drivers/staging/iio/adc/ad7816.c
> > index a2fead85cd46..b8a9149fbac1 100644
> > --- a/drivers/staging/iio/adc/ad7816.c
> > +++ b/drivers/staging/iio/adc/ad7816.c
> > @@ -422,6 +422,12 @@ static int ad7816_probe(struct spi_device *spi_dev)
> > return 0;
> >  }
> >  
> > +static const struct of_device_id ad7816_of_match[] = {
> > +   { .compatible = "adi,ad7816", },  
> 
> I think you also need to add:
> + { .compatible = "adi,ad7817", },
> + { .compatible = "adi,ad7818", },
> 

Yes, please add all parts to the dt binding.
Particularly as they are functionally different in this case!

Please send a v4 for just this patch as the rest have now been
applied.

Thanks,


Jonathan

> > +   { }
> > +};
> > +MODULE_DEVICE_TABLE(of, ad7816_of_match);
> > +
> >  static const struct spi_device_id ad7816_id[] = {
> > { "ad7816", ID_AD7816 },
> > { "ad7817", ID_AD7817 },
> > @@ -434,6 +440,7 @@ MODULE_DEVICE_TABLE(spi, ad7816_id);
> >  static struct spi_driver ad7816_driver = {
> > .driver = {
> > .name = "ad7816",
> > +   .of_match_table = of_match_ptr(ad7816_of_match),
> > },
> > .probe = ad7816_probe,
> > .id_table = ad7816_id,  



Re: [PATCH v3 4/4] staging: iio: ad7816: Add device tree table.

2018-11-11 Thread Jonathan Cameron
On Fri, 9 Nov 2018 08:11:57 +
"Ardelean, Alexandru"  wrote:

> On Fri, 2018-11-09 at 13:08 +0530, Nishad Kamdar wrote:
> > Add device tree table for matching vendor ID.  
> 
> One comment inline for this.
> 
> Thanks
> Alex
> 
> > 
> > Signed-off-by: Nishad Kamdar 
> > ---
> >  drivers/staging/iio/adc/ad7816.c | 7 +++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/drivers/staging/iio/adc/ad7816.c
> > b/drivers/staging/iio/adc/ad7816.c
> > index a2fead85cd46..b8a9149fbac1 100644
> > --- a/drivers/staging/iio/adc/ad7816.c
> > +++ b/drivers/staging/iio/adc/ad7816.c
> > @@ -422,6 +422,12 @@ static int ad7816_probe(struct spi_device *spi_dev)
> > return 0;
> >  }
> >  
> > +static const struct of_device_id ad7816_of_match[] = {
> > +   { .compatible = "adi,ad7816", },  
> 
> I think you also need to add:
> + { .compatible = "adi,ad7817", },
> + { .compatible = "adi,ad7818", },
> 

Yes, please add all parts to the dt binding.
Particularly as they are functionally different in this case!

Please send a v4 for just this patch as the rest have now been
applied.

Thanks,


Jonathan

> > +   { }
> > +};
> > +MODULE_DEVICE_TABLE(of, ad7816_of_match);
> > +
> >  static const struct spi_device_id ad7816_id[] = {
> > { "ad7816", ID_AD7816 },
> > { "ad7817", ID_AD7817 },
> > @@ -434,6 +440,7 @@ MODULE_DEVICE_TABLE(spi, ad7816_id);
> >  static struct spi_driver ad7816_driver = {
> > .driver = {
> > .name = "ad7816",
> > +   .of_match_table = of_match_ptr(ad7816_of_match),
> > },
> > .probe = ad7816_probe,
> > .id_table = ad7816_id,  



Re: [PATCH v3 4/4] staging: iio: ad7816: Add device tree table.

2018-11-09 Thread Ardelean, Alexandru
On Fri, 2018-11-09 at 13:08 +0530, Nishad Kamdar wrote:
> Add device tree table for matching vendor ID.

One comment inline for this.

Thanks
Alex

> 
> Signed-off-by: Nishad Kamdar 
> ---
>  drivers/staging/iio/adc/ad7816.c | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/staging/iio/adc/ad7816.c
> b/drivers/staging/iio/adc/ad7816.c
> index a2fead85cd46..b8a9149fbac1 100644
> --- a/drivers/staging/iio/adc/ad7816.c
> +++ b/drivers/staging/iio/adc/ad7816.c
> @@ -422,6 +422,12 @@ static int ad7816_probe(struct spi_device *spi_dev)
>   return 0;
>  }
>  
> +static const struct of_device_id ad7816_of_match[] = {
> + { .compatible = "adi,ad7816", },

I think you also need to add:
+   { .compatible = "adi,ad7817", },
+   { .compatible = "adi,ad7818", },

> + { }
> +};
> +MODULE_DEVICE_TABLE(of, ad7816_of_match);
> +
>  static const struct spi_device_id ad7816_id[] = {
>   { "ad7816", ID_AD7816 },
>   { "ad7817", ID_AD7817 },
> @@ -434,6 +440,7 @@ MODULE_DEVICE_TABLE(spi, ad7816_id);
>  static struct spi_driver ad7816_driver = {
>   .driver = {
>   .name = "ad7816",
> + .of_match_table = of_match_ptr(ad7816_of_match),
>   },
>   .probe = ad7816_probe,
>   .id_table = ad7816_id,


Re: [PATCH v3 4/4] staging: iio: ad7816: Add device tree table.

2018-11-09 Thread Ardelean, Alexandru
On Fri, 2018-11-09 at 13:08 +0530, Nishad Kamdar wrote:
> Add device tree table for matching vendor ID.

One comment inline for this.

Thanks
Alex

> 
> Signed-off-by: Nishad Kamdar 
> ---
>  drivers/staging/iio/adc/ad7816.c | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/staging/iio/adc/ad7816.c
> b/drivers/staging/iio/adc/ad7816.c
> index a2fead85cd46..b8a9149fbac1 100644
> --- a/drivers/staging/iio/adc/ad7816.c
> +++ b/drivers/staging/iio/adc/ad7816.c
> @@ -422,6 +422,12 @@ static int ad7816_probe(struct spi_device *spi_dev)
>   return 0;
>  }
>  
> +static const struct of_device_id ad7816_of_match[] = {
> + { .compatible = "adi,ad7816", },

I think you also need to add:
+   { .compatible = "adi,ad7817", },
+   { .compatible = "adi,ad7818", },

> + { }
> +};
> +MODULE_DEVICE_TABLE(of, ad7816_of_match);
> +
>  static const struct spi_device_id ad7816_id[] = {
>   { "ad7816", ID_AD7816 },
>   { "ad7817", ID_AD7817 },
> @@ -434,6 +440,7 @@ MODULE_DEVICE_TABLE(spi, ad7816_id);
>  static struct spi_driver ad7816_driver = {
>   .driver = {
>   .name = "ad7816",
> + .of_match_table = of_match_ptr(ad7816_of_match),
>   },
>   .probe = ad7816_probe,
>   .id_table = ad7816_id,


[PATCH v3 4/4] staging: iio: ad7816: Add device tree table.

2018-11-08 Thread Nishad Kamdar
Add device tree table for matching vendor ID.

Signed-off-by: Nishad Kamdar 
---
 drivers/staging/iio/adc/ad7816.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/drivers/staging/iio/adc/ad7816.c b/drivers/staging/iio/adc/ad7816.c
index a2fead85cd46..b8a9149fbac1 100644
--- a/drivers/staging/iio/adc/ad7816.c
+++ b/drivers/staging/iio/adc/ad7816.c
@@ -422,6 +422,12 @@ static int ad7816_probe(struct spi_device *spi_dev)
return 0;
 }
 
+static const struct of_device_id ad7816_of_match[] = {
+   { .compatible = "adi,ad7816", },
+   { }
+};
+MODULE_DEVICE_TABLE(of, ad7816_of_match);
+
 static const struct spi_device_id ad7816_id[] = {
{ "ad7816", ID_AD7816 },
{ "ad7817", ID_AD7817 },
@@ -434,6 +440,7 @@ MODULE_DEVICE_TABLE(spi, ad7816_id);
 static struct spi_driver ad7816_driver = {
.driver = {
.name = "ad7816",
+   .of_match_table = of_match_ptr(ad7816_of_match),
},
.probe = ad7816_probe,
.id_table = ad7816_id,
-- 
2.17.1



[PATCH v3 4/4] staging: iio: ad7816: Add device tree table.

2018-11-08 Thread Nishad Kamdar
Add device tree table for matching vendor ID.

Signed-off-by: Nishad Kamdar 
---
 drivers/staging/iio/adc/ad7816.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/drivers/staging/iio/adc/ad7816.c b/drivers/staging/iio/adc/ad7816.c
index a2fead85cd46..b8a9149fbac1 100644
--- a/drivers/staging/iio/adc/ad7816.c
+++ b/drivers/staging/iio/adc/ad7816.c
@@ -422,6 +422,12 @@ static int ad7816_probe(struct spi_device *spi_dev)
return 0;
 }
 
+static const struct of_device_id ad7816_of_match[] = {
+   { .compatible = "adi,ad7816", },
+   { }
+};
+MODULE_DEVICE_TABLE(of, ad7816_of_match);
+
 static const struct spi_device_id ad7816_id[] = {
{ "ad7816", ID_AD7816 },
{ "ad7817", ID_AD7817 },
@@ -434,6 +440,7 @@ MODULE_DEVICE_TABLE(spi, ad7816_id);
 static struct spi_driver ad7816_driver = {
.driver = {
.name = "ad7816",
+   .of_match_table = of_match_ptr(ad7816_of_match),
},
.probe = ad7816_probe,
.id_table = ad7816_id,
-- 
2.17.1