* [PATCH] spi: Madera codecs: add missing of table registration
@ 2019-04-22 19:13 Daniel Gomez
2019-04-29 16:11 ` Charles Keepax
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Gomez @ 2019-04-22 19:13 UTC (permalink / raw)
To: ckeepax, rf, lee.jones; +Cc: patches, alsa-devel, javier, dagmcr
MODULE_DEVICE_TABLE(of, <of_match_table> should be called to complete DT
OF mathing mechanism and register it.
Before this patch:
modinfo drivers/mfd/madera-spi.ko | grep alias
alias: spi:wm1840
alias: spi:cs47l91
alias: spi:cs47l90
alias: spi:cs47l85
alias: spi:cs47l35
After this patch:
modinfo drivers/mfd/madera-spi.ko | grep alias
alias: spi:wm1840
alias: spi:cs47l91
alias: spi:cs47l90
alias: spi:cs47l85
alias: spi:cs47l35
alias: of:N*T*Ccirrus,wm1840C*
alias: of:N*T*Ccirrus,wm1840
alias: of:N*T*Ccirrus,cs47l91C*
alias: of:N*T*Ccirrus,cs47l91
alias: of:N*T*Ccirrus,cs47l90C*
alias: of:N*T*Ccirrus,cs47l90
alias: of:N*T*Ccirrus,cs47l85C*
alias: of:N*T*Ccirrus,cs47l85
alias: of:N*T*Ccirrus,cs47l35C*
alias: of:N*T*Ccirrus,cs47l35
Reported-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Daniel Gomez <dagmcr@gmail.com>
---
drivers/mfd/madera-spi.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/mfd/madera-spi.c b/drivers/mfd/madera-spi.c
index 4c398b2..1128584 100644
--- a/drivers/mfd/madera-spi.c
+++ b/drivers/mfd/madera-spi.c
@@ -121,6 +121,16 @@ static const struct spi_device_id madera_spi_ids[] = {
};
MODULE_DEVICE_TABLE(spi, madera_spi_ids);
+const struct of_device_id madera_of_match[] = {
+ { .compatible = "cirrus,cs47l35", .data = (void *)CS47L35 },
+ { .compatible = "cirrus,cs47l85", .data = (void *)CS47L85 },
+ { .compatible = "cirrus,cs47l90", .data = (void *)CS47L90 },
+ { .compatible = "cirrus,cs47l91", .data = (void *)CS47L91 },
+ { .compatible = "cirrus,wm1840", .data = (void *)WM1840 },
+ {}
+};
+MODULE_DEVICE_TABLE(of, madera_of_match);
+
static struct spi_driver madera_spi_driver = {
.driver = {
.name = "madera",
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] spi: Madera codecs: add missing of table registration
2019-04-22 19:13 [PATCH] spi: Madera codecs: add missing of table registration Daniel Gomez
@ 2019-04-29 16:11 ` Charles Keepax
0 siblings, 0 replies; 2+ messages in thread
From: Charles Keepax @ 2019-04-29 16:11 UTC (permalink / raw)
To: Daniel Gomez; +Cc: patches, rf, javier, lee.jones, alsa-devel
On Mon, Apr 22, 2019 at 09:13:50PM +0200, Daniel Gomez wrote:
> MODULE_DEVICE_TABLE(of, <of_match_table> should be called to complete DT
> OF mathing mechanism and register it.
>
> Before this patch:
> modinfo drivers/mfd/madera-spi.ko | grep alias
> alias: spi:wm1840
> alias: spi:cs47l91
> alias: spi:cs47l90
> alias: spi:cs47l85
> alias: spi:cs47l35
>
> After this patch:
> modinfo drivers/mfd/madera-spi.ko | grep alias
> alias: spi:wm1840
> alias: spi:cs47l91
> alias: spi:cs47l90
> alias: spi:cs47l85
> alias: spi:cs47l35
> alias: of:N*T*Ccirrus,wm1840C*
> alias: of:N*T*Ccirrus,wm1840
> alias: of:N*T*Ccirrus,cs47l91C*
> alias: of:N*T*Ccirrus,cs47l91
> alias: of:N*T*Ccirrus,cs47l90C*
> alias: of:N*T*Ccirrus,cs47l90
> alias: of:N*T*Ccirrus,cs47l85C*
> alias: of:N*T*Ccirrus,cs47l85
> alias: of:N*T*Ccirrus,cs47l35C*
> alias: of:N*T*Ccirrus,cs47l35
>
> Reported-by: Javier Martinez Canillas <javier@dowhile0.org>
> Signed-off-by: Daniel Gomez <dagmcr@gmail.com>
> ---
> drivers/mfd/madera-spi.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/mfd/madera-spi.c b/drivers/mfd/madera-spi.c
> index 4c398b2..1128584 100644
> --- a/drivers/mfd/madera-spi.c
> +++ b/drivers/mfd/madera-spi.c
> @@ -121,6 +121,16 @@ static const struct spi_device_id madera_spi_ids[] = {
> };
> MODULE_DEVICE_TABLE(spi, madera_spi_ids);
>
> +const struct of_device_id madera_of_match[] = {
> + { .compatible = "cirrus,cs47l35", .data = (void *)CS47L35 },
> + { .compatible = "cirrus,cs47l85", .data = (void *)CS47L85 },
> + { .compatible = "cirrus,cs47l90", .data = (void *)CS47L90 },
> + { .compatible = "cirrus,cs47l91", .data = (void *)CS47L91 },
> + { .compatible = "cirrus,wm1840", .data = (void *)WM1840 },
> + {}
> +};
> +MODULE_DEVICE_TABLE(of, madera_of_match);
> +
This is definitely an oversight but it would be worth
looking into if it is possible to use the existing table in
madera-core.c rather than adding new tables. The I2C will also
need fixed so it would be best to share.
Thanks,
Charles
> static struct spi_driver madera_spi_driver = {
> .driver = {
> .name = "madera",
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-29 16:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-22 19:13 [PATCH] spi: Madera codecs: add missing of table registration Daniel Gomez
2019-04-29 16:11 ` Charles Keepax
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.