Skip to contentSkip to conversation

Allow binding drivers/uio/uio_pdrv_genirq.c to devices using command line option

PATCH In review Pavel Machek 3 participants 10 messages Apr 12, 2013 – Jun 18, 2013 Userspace I/O (UIO)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow binding drivers/uio/uio_pdrv_genirq.c to devices using command line option

This adds ability to bind uio driver to given open firmware device using command line option. Thus, userspace driver can be developed and used without modifying the kernel.

drivers/uio/uio_pdrv_genirq.c +5 -1
index c122bca..8fcc2c7 100644
@@ -264,9 +275,13 @@ static const struct dev_pm_ops uio_pdrv_genirq_dev_pm_ops = {
 
 #ifdef CONFIG_OF
 static const struct of_device_id uio_of_genirq_match[] = {
-	{ /* empty for now */ },
+	{ /* This is filled with module_parm */ },
+	{ /* Sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, uio_of_genirq_match);
+
+module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
+MODULE_PARM_DESC(of_id, "Openfirmware id of the device to be handled by uio");
 #else
 # define uio_of_genirq_match NULL
 #endif
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#1 lore raw

Hello!

Quoted 5 lines

This adds ability to bind uio driver to given open firmware device using command line option. Thus, userspace driver can be developed and used without modifying the kernel.

I got no comments here, and patch is pretty simple. Greg, can you merge it?

Thanks,
Pavel

Quoted 21 lines
drivers/uio/uio_pdrv_genirq.c +5 -1
index c122bca..8fcc2c7 100644
@@ -264,9 +275,13 @@ static const struct dev_pm_ops uio_pdrv_genirq_dev_pm_ops = {
 
 #ifdef CONFIG_OF
 static const struct of_device_id uio_of_genirq_match[] = {
-	{ /* empty for now */ },
+	{ /* This is filled with module_parm */ },
+	{ /* Sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, uio_of_genirq_match);
+
+module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
+MODULE_PARM_DESC(of_id, "Openfirmware id of the device to be handled by uio");
 #else
 # define uio_of_genirq_match NULL
 #endif
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
maintainer
#2 lore raw
Quoted 10 lines · Pavel Machek

Hello!

Quoted 5 lines

This adds ability to bind uio driver to given open firmware device using command line option. Thus, userspace driver can be developed and used without modifying the kernel.

I got no comments here, and patch is pretty simple. Greg, can you merge it?

Hans is handling UIO patches, Hans?

#3 lore raw
In reply to Pavel Machek

Hi!

Quoted 5 lines

This adds ability to bind uio driver to given open firmware device using command line option. Thus, userspace driver can be developed and used without modifying the kernel.

Ping? Greg, could you apply this patch? Or is there someone else I should ask to apply it?

Pavel

Quoted 20 lines
drivers/uio/uio_pdrv_genirq.c +5 -1
index c122bca..8fcc2c7 100644
@@ -264,9 +275,13 @@ static const struct dev_pm_ops uio_pdrv_genirq_dev_pm_ops = {
 
 #ifdef CONFIG_OF
 static const struct of_device_id uio_of_genirq_match[] = {
-	{ /* empty for now */ },
+	{ /* This is filled with module_parm */ },
+	{ /* Sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, uio_of_genirq_match);
+
+module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
+MODULE_PARM_DESC(of_id, "Openfirmware id of the device to be handled by uio");
 #else
 # define uio_of_genirq_match NULL
 #endif
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
maintainer
#4 lore raw
Quoted 10 lines · Pavel Machek

Hi!

Quoted 5 lines

This adds ability to bind uio driver to given open firmware device using command line option. Thus, userspace driver can be developed and used without modifying the kernel.

Ping? Greg, could you apply this patch? Or is there someone else I should ask to apply it?

Ugh, Hans seems to have dropped off of the net for a long time now, so I guess I'll start queueing up UIO patches again. Care to resend this?

thanks,

greg k-h

#5 lore raw

Hi Greg,

Quoted 7 lines · Greg KH
Quoted 6 lines · Pavel Machek

Hi!

Quoted 4 lines

This adds ability to bind uio driver to given open firmware device using command line option. Thus, userspace driver can be developed and used without modifying the kernel.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Ping? Greg, could you apply this patch? Or is there someone else I should ask to apply it?

Ugh, Hans seems to have dropped off of the net for a long time now, so I guess I'll start queueing up UIO patches again. Care to resend this?

Even I have a couple of outstanding UIO patches [1-2]. Shall I resend them as well?

[1] https://lkml.org/lkml/2013/3/14/154
[2] https://patchwork.kernel.org/patch/2268921/

Signature · 2 lines
With warm regards,
Sachin
maintainer
#6 lore raw
Quoted 19 lines · Sachin Kamat

Hi Greg,

Quoted 7 lines · Greg KH
Quoted 6 lines · Pavel Machek

Hi!

Quoted 4 lines

This adds ability to bind uio driver to given open firmware device using command line option. Thus, userspace driver can be developed and used without modifying the kernel.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Ping? Greg, could you apply this patch? Or is there someone else I should ask to apply it?

Ugh, Hans seems to have dropped off of the net for a long time now, so I guess I'll start queueing up UIO patches again. Care to resend this?

Quoted 5 lines

Even I have a couple of outstanding UIO patches [1-2]. Shall I resend them as well?

[1] https://lkml.org/lkml/2013/3/14/154
[2] https://patchwork.kernel.org/patch/2268921/

Yes, please do.

thanks,

greg k-h

author Tested-by Detlev Zundel
#7 lore raw
In reply to Greg KH
Quoted 7 lines · Greg KH
Quoted 6 lines · Pavel Machek

Hi!

Quoted 4 lines

This adds ability to bind uio driver to given open firmware device using command line option. Thus, userspace driver can be developed and used without modifying the kernel.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Ping? Greg, could you apply this patch? Or is there someone else I should ask to apply it?

Ugh, Hans seems to have dropped off of the net for a long time now, so I guess I'll start queueing up UIO patches again. Care to resend this?

Here you go. It still applies to your -next tree.

Thanks,
Pavel
---

This adds ability to bind uio driver to given open firmware device using command line option. Thus, userspace driver can be developed and used without modifying the kernel.

drivers/uio/uio_pdrv_genirq.c +5 -1
index c122bca..8fcc2c7 100644
@@ -264,9 +275,13 @@ static const struct dev_pm_ops uio_pdrv_genirq_dev_pm_ops = {
 
 #ifdef CONFIG_OF
 static const struct of_device_id uio_of_genirq_match[] = {
-	{ /* empty for now */ },
+	{ /* This is filled with module_parm */ },
+	{ /* Sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, uio_of_genirq_match);
+
+module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
+MODULE_PARM_DESC(of_id, "Openfirmware id of the device to be handled by uio");
 #else
 # define uio_of_genirq_match NULL
 #endif
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author Tested-by Detlev Zundel
#8 lore raw
Quoted 10 lines · Pavel Machek
Quoted 9 lines · Greg KH
Quoted 8 lines · Pavel Machek

Hi!

Quoted 5 lines

This adds ability to bind uio driver to given open firmware device using command line option. Thus, userspace driver can be developed and used without modifying the kernel.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Ping? Greg, could you apply this patch? Or is there someone else I should ask to apply it?

Ugh, Hans seems to have dropped off of the net for a long time now, so I guess I'll start queueing up UIO patches again. Care to resend this?

Here you go. It still applies to your -next tree.

And here's version that removes "const" that is no longer true. I missed the compile warning before. Sorry,
Pavel

-(cut here)-

This adds ability to bind uio driver to given open firmware device using command line option. Thus, userspace driver can be developed and used without modifying the kernel.

drivers/uio/uio_pdrv_genirq.c +6 -2
index d594dd9..9741549 100644
@@ -258,10 +258,14 @@ static const struct dev_pm_ops uio_pdrv_genirq_dev_pm_ops = {
 };
 
 #ifdef CONFIG_OF
-static const struct of_device_id uio_of_genirq_match[] = {
-	{ /* empty for now */ },
+static struct of_device_id uio_of_genirq_match[] = {
+	{ /* This is filled with module_parm */ },
+	{ /* Sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, uio_of_genirq_match);
+
+module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
+MODULE_PARM_DESC(of_id, "Openfirmware id of the device to be handled by uio");
 #else
 # define uio_of_genirq_match NULL
 #endif
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
maintainer
#9 lore raw
Quoted 17 lines · Pavel Machek
Quoted 16 lines · Pavel Machek
Quoted 14 lines · Greg KH
Quoted 10 lines · Pavel Machek

Hi!

Quoted 5 lines

This adds ability to bind uio driver to given open firmware device using command line option. Thus, userspace driver can be developed and used without modifying the kernel.

Ping? Greg, could you apply this patch? Or is there someone else I should ask to apply it?

Ugh, Hans seems to have dropped off of the net for a long time now, so I guess I'll start queueing up UIO patches again. Care to resend this?

Quoted 7 lines
Quoted 1 line

Here you go. It still applies to your -next tree.

And here's version that removes "const" that is no longer true. I missed the compile warning before. Sorry,
Pavel

-(cut here)-

Please resend in a format that I don't have to edit by hand.

greg k-h