2013-04-12 18:43:40

by Pavel Machek

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Pavel Machek <[email protected]>

diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
index c122bca..8fcc2c7 100644
--- a/drivers/uio/uio_pdrv_genirq.c
+++ b/drivers/uio/uio_pdrv_genirq.c
@@ -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

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


2013-05-06 10:53:55

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH] Allow binding drivers/uio/uio_pdrv_genirq.c to devices using command line option

Hello!

> 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.
>
> Signed-off-by: Pavel Machek <[email protected]>

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

Thanks,
Pavel
>
> diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
> index c122bca..8fcc2c7 100644
> --- a/drivers/uio/uio_pdrv_genirq.c
> +++ b/drivers/uio/uio_pdrv_genirq.c
> @@ -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
>

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

2013-05-17 03:50:48

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] Allow binding drivers/uio/uio_pdrv_genirq.c to devices using command line option

On Mon, May 06, 2013 at 12:53:52PM +0200, Pavel Machek wrote:
> Hello!
>
> > 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.
> >
> > Signed-off-by: Pavel Machek <[email protected]>
>
> I got no comments here, and patch is pretty simple. Greg, can you
> merge it?

Hans is handling UIO patches, Hans?

2013-06-17 13:47:44

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH] Allow binding drivers/uio/uio_pdrv_genirq.c to devices using command line option

Hi!

> 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.
>
> Signed-off-by: Pavel Machek <[email protected]>

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

Pavel

> diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
> index c122bca..8fcc2c7 100644
> --- a/drivers/uio/uio_pdrv_genirq.c
> +++ b/drivers/uio/uio_pdrv_genirq.c
> @@ -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
>

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

2013-06-17 17:37:43

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] Allow binding drivers/uio/uio_pdrv_genirq.c to devices using command line option

On Mon, Jun 17, 2013 at 03:47:41PM +0200, Pavel Machek wrote:
> Hi!
>
> > 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.
> >
> > Signed-off-by: Pavel Machek <[email protected]>
>
> 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

2013-06-18 05:02:34

by Sachin Kamat

[permalink] [raw]
Subject: Re: [PATCH] Allow binding drivers/uio/uio_pdrv_genirq.c to devices using command line option

Hi Greg,

On 17 June 2013 23:07, Greg KH <[email protected]> wrote:
> On Mon, Jun 17, 2013 at 03:47:41PM +0200, Pavel Machek wrote:
>> Hi!
>>
>> > 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.
>> >
>> > Signed-off-by: Pavel Machek <[email protected]>
>>
>> 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/


--
With warm regards,
Sachin

2013-06-18 13:02:22

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH] Allow binding drivers/uio/uio_pdrv_genirq.c to devices using command line option

On Mon 2013-06-17 10:37:38, Greg KH wrote:
> On Mon, Jun 17, 2013 at 03:47:41PM +0200, Pavel Machek wrote:
> > Hi!
> >
> > > 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.
> > >
> > > Signed-off-by: Pavel Machek <[email protected]>
> >
> > 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.

Signed-off-by: Pavel Machek <[email protected]>
Tested-by: Detlev Zundel <[email protected]>

diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
index c122bca..8fcc2c7 100644
--- a/drivers/uio/uio_pdrv_genirq.c
+++ b/drivers/uio/uio_pdrv_genirq.c
@@ -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

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

2013-06-18 14:30:47

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH] Allow binding drivers/uio/uio_pdrv_genirq.c to devices using command line option

On Tue 2013-06-18 15:02:16, Pavel Machek wrote:
> On Mon 2013-06-17 10:37:38, Greg KH wrote:
> > On Mon, Jun 17, 2013 at 03:47:41PM +0200, Pavel Machek wrote:
> > > Hi!
> > >
> > > > 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.
> > > >
> > > > Signed-off-by: Pavel Machek <[email protected]>
> > >
> > > 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.

Signed-off-by: Pavel Machek <[email protected]>
Tested-by: Detlev Zundel <[email protected]>

diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
index d594dd9..9741549 100644
--- a/drivers/uio/uio_pdrv_genirq.c
+++ b/drivers/uio/uio_pdrv_genirq.c
@@ -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


--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

2013-06-18 14:46:38

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] Allow binding drivers/uio/uio_pdrv_genirq.c to devices using command line option

On Tue, Jun 18, 2013 at 10:32:33AM +0530, Sachin Kamat wrote:
> Hi Greg,
>
> On 17 June 2013 23:07, Greg KH <[email protected]> wrote:
> > On Mon, Jun 17, 2013 at 03:47:41PM +0200, Pavel Machek wrote:
> >> Hi!
> >>
> >> > 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.
> >> >
> >> > Signed-off-by: Pavel Machek <[email protected]>
> >>
> >> 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/

Yes, please do.

thanks,

greg k-h

2013-06-18 17:58:42

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] Allow binding drivers/uio/uio_pdrv_genirq.c to devices using command line option

On Tue, Jun 18, 2013 at 04:30:43PM +0200, Pavel Machek wrote:
> On Tue 2013-06-18 15:02:16, Pavel Machek wrote:
> > On Mon 2013-06-17 10:37:38, Greg KH wrote:
> > > On Mon, Jun 17, 2013 at 03:47:41PM +0200, Pavel Machek wrote:
> > > > Hi!
> > > >
> > > > > 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.
> > > > >
> > > > > Signed-off-by: Pavel Machek <[email protected]>
> > > >
> > > > 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)-

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

greg k-h