linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging:iio:adc:ad7280a: add of_match_table entry
@ 2019-07-25 20:08 Kartik Kulkarni
  2019-07-26  5:30 ` Ardelean, Alexandru
  0 siblings, 1 reply; 5+ messages in thread
From: Kartik Kulkarni @ 2019-07-25 20:08 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Stefan Popa,
	Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
	Greg Kroah-Hartman
  Cc: linux-iio, devel, linux-kernel, kernel-usp, Kartik Kulkarni,
	Matheus Tavares

Add the of_device_id struct and the respective
of_match_device entry to complete device tree support.

Signed-off-by: Kartik Kulkarni <kartik.koolks@gmail.com>
Reviewed-by: Matheus Tavares <matheus.bernardino@usp.br>
---
 drivers/staging/iio/adc/ad7280a.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
index 19a5f244dcae..ded0ba093a28 100644
--- a/drivers/staging/iio/adc/ad7280a.c
+++ b/drivers/staging/iio/adc/ad7280a.c
@@ -1027,9 +1027,16 @@ static const struct spi_device_id ad7280_id[] = {
 };
 MODULE_DEVICE_TABLE(spi, ad7280_id);
 
+static const struct of_device_id ad7280_of_match[] = {
+	{ .compatible = "adi,ad7280a", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, ad7280_of_match);
+
 static struct spi_driver ad7280_driver = {
 	.driver = {
-		.name	= "ad7280",
+		.name	= "ad7280a",
+		.of_match_table = ad7280_of_match,
 	},
 	.probe		= ad7280_probe,
 	.id_table	= ad7280_id,
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging:iio:adc:ad7280a: add of_match_table entry
  2019-07-25 20:08 [PATCH] staging:iio:adc:ad7280a: add of_match_table entry Kartik Kulkarni
@ 2019-07-26  5:30 ` Ardelean, Alexandru
  2019-07-26 17:59   ` Matheus Tavares Bernardino
  0 siblings, 1 reply; 5+ messages in thread
From: Ardelean, Alexandru @ 2019-07-26  5:30 UTC (permalink / raw)
  To: Popa, Stefan Serban, gregkh, pmeerw, jic23, Hennerich, Michael,
	lars, knaack.h, kartik.koolks
  Cc: devel, kernel-usp, linux-kernel, linux-iio, matheus.bernardino

On Fri, 2019-07-26 at 01:38 +0530, Kartik Kulkarni wrote:
> Add the of_device_id struct and the respective
> of_match_device entry to complete device tree support.
> 

This would be a [V2] I suppose.

This change also does the rename of the driver name in a single go.
Since it's a trivial change, it's fine from my side.

Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>


> Signed-off-by: Kartik Kulkarni <kartik.koolks@gmail.com>
> Reviewed-by: Matheus Tavares <matheus.bernardino@usp.br>
> ---
>  drivers/staging/iio/adc/ad7280a.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
> index 19a5f244dcae..ded0ba093a28 100644
> --- a/drivers/staging/iio/adc/ad7280a.c
> +++ b/drivers/staging/iio/adc/ad7280a.c
> @@ -1027,9 +1027,16 @@ static const struct spi_device_id ad7280_id[] = {
>  };
>  MODULE_DEVICE_TABLE(spi, ad7280_id);
>  
> +static const struct of_device_id ad7280_of_match[] = {
> +	{ .compatible = "adi,ad7280a", },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(of, ad7280_of_match);
> +
>  static struct spi_driver ad7280_driver = {
>  	.driver = {
> -		.name	= "ad7280",
> +		.name	= "ad7280a",
> +		.of_match_table = ad7280_of_match,
>  	},
>  	.probe		= ad7280_probe,
>  	.id_table	= ad7280_id,

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging:iio:adc:ad7280a: add of_match_table entry
  2019-07-26  5:30 ` Ardelean, Alexandru
@ 2019-07-26 17:59   ` Matheus Tavares Bernardino
  2019-07-27 13:47     ` Jonathan Cameron
  0 siblings, 1 reply; 5+ messages in thread
From: Matheus Tavares Bernardino @ 2019-07-26 17:59 UTC (permalink / raw)
  To: Ardelean, Alexandru
  Cc: Popa, Stefan Serban, gregkh, pmeerw, jic23, Hennerich, Michael,
	lars, knaack.h, kartik.koolks, devel, kernel-usp, linux-kernel,
	linux-iio

On Fri, Jul 26, 2019 at 2:30 AM Ardelean, Alexandru
<alexandru.Ardelean@analog.com> wrote:
>
> On Fri, 2019-07-26 at 01:38 +0530, Kartik Kulkarni wrote:
> > Add the of_device_id struct and the respective
> > of_match_device entry to complete device tree support.
> >
>
> This would be a [V2] I suppose.
>
> This change also does the rename of the driver name in a single go.
> Since it's a trivial change, it's fine from my side.

I think there was a small confusion when we sent the patches. Sorry
for that. Originally, Kartik made the rename in its own patch. Would
it be better if we resend the two patches separately?

Thanks,
Matheus

> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
>
>
> > Signed-off-by: Kartik Kulkarni <kartik.koolks@gmail.com>
> > Reviewed-by: Matheus Tavares <matheus.bernardino@usp.br>
> > ---
> >  drivers/staging/iio/adc/ad7280a.c | 9 ++++++++-
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
> > index 19a5f244dcae..ded0ba093a28 100644
> > --- a/drivers/staging/iio/adc/ad7280a.c
> > +++ b/drivers/staging/iio/adc/ad7280a.c
> > @@ -1027,9 +1027,16 @@ static const struct spi_device_id ad7280_id[] = {
> >  };
> >  MODULE_DEVICE_TABLE(spi, ad7280_id);
> >
> > +static const struct of_device_id ad7280_of_match[] = {
> > +     { .compatible = "adi,ad7280a", },
> > +     { }
> > +};
> > +MODULE_DEVICE_TABLE(of, ad7280_of_match);
> > +
> >  static struct spi_driver ad7280_driver = {
> >       .driver = {
> > -             .name   = "ad7280",
> > +             .name   = "ad7280a",
> > +             .of_match_table = ad7280_of_match,
> >       },
> >       .probe          = ad7280_probe,
> >       .id_table       = ad7280_id,
>
> --
> You received this message because you are subscribed to the Google Groups "Kernel USP" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kernel-usp+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/kernel-usp/0e273486f1c4fb6249896225837cdf2da0fd2415.camel%40analog.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging:iio:adc:ad7280a: add of_match_table entry
  2019-07-26 17:59   ` Matheus Tavares Bernardino
@ 2019-07-27 13:47     ` Jonathan Cameron
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2019-07-27 13:47 UTC (permalink / raw)
  To: Matheus Tavares Bernardino
  Cc: Ardelean, Alexandru, Popa, Stefan Serban, gregkh, pmeerw,
	Hennerich, Michael, lars, knaack.h, kartik.koolks, devel,
	kernel-usp, linux-kernel, linux-iio

On Fri, 26 Jul 2019 14:59:16 -0300
Matheus Tavares Bernardino <matheus.bernardino@usp.br> wrote:

> On Fri, Jul 26, 2019 at 2:30 AM Ardelean, Alexandru
> <alexandru.Ardelean@analog.com> wrote:
> >
> > On Fri, 2019-07-26 at 01:38 +0530, Kartik Kulkarni wrote:  
> > > Add the of_device_id struct and the respective
> > > of_match_device entry to complete device tree support.
> > >  
> >
> > This would be a [V2] I suppose.
> >
> > This change also does the rename of the driver name in a single go.
> > Since it's a trivial change, it's fine from my side.  
> 
> I think there was a small confusion when we sent the patches. Sorry
> for that. Originally, Kartik made the rename in its own patch. Would
> it be better if we resend the two patches separately?
I would prefer that. They are two separate changes, and the driver
name one may be a little unexpected so let's make sure it's obvious.

There is also the question on whether we should tidy up all the
prefixing to make it clear that this is an ad7280a throughout.

Perhaps that's too painful though and we should leave it like this
for now.

Thanks,

Jonathan


> 
> Thanks,
> Matheus
> 
> > Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> >
> >  
> > > Signed-off-by: Kartik Kulkarni <kartik.koolks@gmail.com>
> > > Reviewed-by: Matheus Tavares <matheus.bernardino@usp.br>
> > > ---
> > >  drivers/staging/iio/adc/ad7280a.c | 9 ++++++++-
> > >  1 file changed, 8 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
> > > index 19a5f244dcae..ded0ba093a28 100644
> > > --- a/drivers/staging/iio/adc/ad7280a.c
> > > +++ b/drivers/staging/iio/adc/ad7280a.c
> > > @@ -1027,9 +1027,16 @@ static const struct spi_device_id ad7280_id[] = {
> > >  };
> > >  MODULE_DEVICE_TABLE(spi, ad7280_id);
> > >
> > > +static const struct of_device_id ad7280_of_match[] = {
> > > +     { .compatible = "adi,ad7280a", },
> > > +     { }
> > > +};
> > > +MODULE_DEVICE_TABLE(of, ad7280_of_match);
> > > +
> > >  static struct spi_driver ad7280_driver = {
> > >       .driver = {
> > > -             .name   = "ad7280",
> > > +             .name   = "ad7280a",
> > > +             .of_match_table = ad7280_of_match,
> > >       },
> > >       .probe          = ad7280_probe,
> > >       .id_table       = ad7280_id,  
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Kernel USP" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to kernel-usp+unsubscribe@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/kernel-usp/0e273486f1c4fb6249896225837cdf2da0fd2415.camel%40analog.com.  


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] staging:iio:adc:ad7280a: add of_match_table entry
@ 2019-07-25 20:06 Kartik Kulkarni
  0 siblings, 0 replies; 5+ messages in thread
From: Kartik Kulkarni @ 2019-07-25 20:06 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Stefan Popa,
	Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
	Greg Kroah-Hartman
  Cc: linux-iio, devel, linux-kernel, kernel-usp, Kartik Kulkarni,
	Matheus Tavares

Add the of_device_id struct and the respective
of_match_device entry to complete device tree support.

Signed-off-by: Kartik Kulkarni <kartik.koolks@gmail.com>
Reviewed-by: Matheus Tavares <matheus.bernardino@usp.br>
---
 drivers/staging/iio/adc/ad7280a.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
index 2d9c7551f314..ded0ba093a28 100644
--- a/drivers/staging/iio/adc/ad7280a.c
+++ b/drivers/staging/iio/adc/ad7280a.c
@@ -1027,9 +1027,16 @@ static const struct spi_device_id ad7280_id[] = {
 };
 MODULE_DEVICE_TABLE(spi, ad7280_id);
 
+static const struct of_device_id ad7280_of_match[] = {
+	{ .compatible = "adi,ad7280a", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, ad7280_of_match);
+
 static struct spi_driver ad7280_driver = {
 	.driver = {
 		.name	= "ad7280a",
+		.of_match_table = ad7280_of_match,
 	},
 	.probe		= ad7280_probe,
 	.id_table	= ad7280_id,
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-07-27 13:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25 20:08 [PATCH] staging:iio:adc:ad7280a: add of_match_table entry Kartik Kulkarni
2019-07-26  5:30 ` Ardelean, Alexandru
2019-07-26 17:59   ` Matheus Tavares Bernardino
2019-07-27 13:47     ` Jonathan Cameron
  -- strict thread matches above, loose matches on Subject: below --
2019-07-25 20:06 Kartik Kulkarni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).