staging:iio:adc:ad7280a: add of_match_table entry
Subsystems (4)
PATCH 1/1 staging:iio:adc:ad7280a: add of_match_table entry
Add the of_device_id struct and the respective of_match_device entry to complete device tree support.
--- drivers/staging/iio/adc/ad7280a.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/staging/iio/adc/ad7280a.c +8 -1
@@ -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,
Signature · 1 line
2.20.1
Quoted 3 lines · Kartik Kulkarni
Add the
of_device_idstruct and the respectiveof_match_deviceentry 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.
Quoted 28 lines
Signed-off-by Kartik Kulkarni <[email protected]>Reviewed-by Matheus Tavares <[email protected]>--- drivers/staging/iio/adc/ad7280a.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/staging/iio/adc/ad7280a.c +8
-1@@ -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,
Quoted 10 lines · Alexandru
Quoted 3 lines · Kartik Kulkarni
Add the
of_device_idstruct and the respectiveof_match_deviceentry 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
Quoted 36 lines
Reviewed-by Alexandru Ardelean <[email protected]>Quoted 18 lines
Signed-off-by Kartik Kulkarni <[email protected]>Reviewed-by Matheus Tavares <[email protected]>--- drivers/staging/iio/adc/ad7280a.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/staging/iio/adc/ad7280a.c +4
-0@@ -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" , }, + { } +};drivers/staging/iio/adc/ad7280a.c static const struct spi_device_id ad7280_id[] = { · line 1042
Quoted 10 lines
drivers/staging/iio/adc/ad7280a.c +4
-1+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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/kernel-usp/0e273486f1c4fb6249896225837cdf2da0fd2415.camel%40analog.com.
Jonathan Cameron
maintainerQuoted 8 lines · On Fri, 26 Jul 2019 14:59:16 -0300 Matheus Tavares Bernardino…
Quoted 6 lines · Alexandru
Quoted 3 lines · Kartik Kulkarni
Add the
of_device_idstruct and the respectiveof_match_deviceentry to complete device tree support.
Quoted 8 lines
Quoted 4 lines
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
Quoted 40 lines
Thanks,
MatheusQuoted 36 lines
Reviewed-by Alexandru Ardelean <[email protected]>Quoted 18 lines
Signed-off-by Kartik Kulkarni <[email protected]>Reviewed-by Matheus Tavares <[email protected]>--- drivers/staging/iio/adc/ad7280a.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/staging/iio/adc/ad7280a.c +4
-0@@ -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" , }, + { } +};drivers/staging/iio/adc/ad7280a.c static const struct spi_device_id ad7280_id[] = { · line 1042
Quoted 10 lines
drivers/staging/iio/adc/ad7280a.c +4
-1+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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/kernel-usp/0e273486f1c4fb6249896225837cdf2da0fd2415.camel%40analog.com.