All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] staging: sm7xxfb: start using module parameters
@ 2015-03-24  4:50 ` Sudip Mukherjee
  0 siblings, 0 replies; 10+ messages in thread
From: Sudip Mukherjee @ 2015-03-24  4:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Sudip Mukherjee, linux-fbdev, devel, linux-kernel

add module parameters so that we can configure X and Y resolutions
and bpp when using this driver as a module.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/staging/sm7xxfb/sm7xxfb.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
index abdb021..6e9b2aa 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -1033,6 +1033,24 @@ static int __init sm712fb_init(void)
 
 module_init(sm712fb_init);
 
+module_param(mode_option, charp, S_IRUGO);
+
+MODULE_PARM_DESC(mode_option, "\n\t\tOptions:\n"
+		 "\t\t0x301 = 640x480-8\n"
+		 "\t\t0x303 = 800x600-8\n"
+		 "\t\t0x305 = 1024x768-8\n"
+		 "\t\t0x307 = 1280x1024-8\n"
+		 "\t\t0x311 = 640x480-16\n"
+		 "\t\t0x314 = 800x600-16\n"
+		 "\t\t0x317 = 1024x768-16\n"
+		 "\t\t0x31A = 1280x1024-16\n"
+		 "\t\t0x312 = 640x480-24\n"
+		 "\t\t0x315 = 800x600-24\n"
+		 "\t\t0x318 = 1024x768-24\n"
+		 "\t\t0x31B = 1280x1024-24\n"
+		 "\t\tUsual example:\n"
+		 "\t\tinsmod ./sm7xxfb.ko mode_option=\"0x301\"\n");
+
 static void __exit sm712fb_exit(void)
 {
 	pci_unregister_driver(&smtcfb_driver);
-- 
1.8.1.2


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

* [PATCH 2/2] staging: sm7xxfb: add MODULE_DEVICE_TABLE
  2015-03-24  4:50 ` Sudip Mukherjee
@ 2015-03-24  4:50   ` Sudip Mukherjee
  -1 siblings, 0 replies; 10+ messages in thread
From: Sudip Mukherjee @ 2015-03-24  4:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Sudip Mukherjee, linux-fbdev, devel, linux-kernel

add MODULE_DEVICE_TABLE to support hot-plugging.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/staging/sm7xxfb/sm7xxfb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
index 6e9b2aa..15509a6 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -922,6 +922,8 @@ static const struct pci_device_id smtcfb_pci_table[] = {
 	{0,}
 };
 
+MODULE_DEVICE_TABLE(pci, smtcfb_pci_table);
+
 static void smtcfb_pci_remove(struct pci_dev *pdev)
 {
 	struct smtcfb_info *sfb;
-- 
1.8.1.2


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

* [PATCH 1/2] staging: sm7xxfb: start using module parameters
@ 2015-03-24  4:50 ` Sudip Mukherjee
  0 siblings, 0 replies; 10+ messages in thread
From: Sudip Mukherjee @ 2015-03-24  4:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Sudip Mukherjee, linux-fbdev, devel, linux-kernel

add module parameters so that we can configure X and Y resolutions
and bpp when using this driver as a module.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/staging/sm7xxfb/sm7xxfb.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
index abdb021..6e9b2aa 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -1033,6 +1033,24 @@ static int __init sm712fb_init(void)
 
 module_init(sm712fb_init);
 
+module_param(mode_option, charp, S_IRUGO);
+
+MODULE_PARM_DESC(mode_option, "\n\t\tOptions:\n"
+		 "\t\t0x301 = 640x480-8\n"
+		 "\t\t0x303 = 800x600-8\n"
+		 "\t\t0x305 = 1024x768-8\n"
+		 "\t\t0x307 = 1280x1024-8\n"
+		 "\t\t0x311 = 640x480-16\n"
+		 "\t\t0x314 = 800x600-16\n"
+		 "\t\t0x317 = 1024x768-16\n"
+		 "\t\t0x31A = 1280x1024-16\n"
+		 "\t\t0x312 = 640x480-24\n"
+		 "\t\t0x315 = 800x600-24\n"
+		 "\t\t0x318 = 1024x768-24\n"
+		 "\t\t0x31B = 1280x1024-24\n"
+		 "\t\tUsual example:\n"
+		 "\t\tinsmod ./sm7xxfb.ko mode_option=\"0x301\"\n");
+
 static void __exit sm712fb_exit(void)
 {
 	pci_unregister_driver(&smtcfb_driver);
-- 
1.8.1.2


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

* [PATCH 2/2] staging: sm7xxfb: add MODULE_DEVICE_TABLE
@ 2015-03-24  4:50   ` Sudip Mukherjee
  0 siblings, 0 replies; 10+ messages in thread
From: Sudip Mukherjee @ 2015-03-24  4:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Sudip Mukherjee, linux-fbdev, devel, linux-kernel

add MODULE_DEVICE_TABLE to support hot-plugging.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/staging/sm7xxfb/sm7xxfb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
index 6e9b2aa..15509a6 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -922,6 +922,8 @@ static const struct pci_device_id smtcfb_pci_table[] = {
 	{0,}
 };
 
+MODULE_DEVICE_TABLE(pci, smtcfb_pci_table);
+
 static void smtcfb_pci_remove(struct pci_dev *pdev)
 {
 	struct smtcfb_info *sfb;
-- 
1.8.1.2


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

* Re: [PATCH 1/2] staging: sm7xxfb: start using module parameters
  2015-03-24  4:50 ` Sudip Mukherjee
@ 2015-03-24  9:48   ` Greg Kroah-Hartman
  -1 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2015-03-24  9:48 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: devel, linux-fbdev, linux-kernel

On Tue, Mar 24, 2015 at 10:20:08AM +0530, Sudip Mukherjee wrote:
> add module parameters so that we can configure X and Y resolutions
> and bpp when using this driver as a module.
> 
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
>  drivers/staging/sm7xxfb/sm7xxfb.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
> index abdb021..6e9b2aa 100644
> --- a/drivers/staging/sm7xxfb/sm7xxfb.c
> +++ b/drivers/staging/sm7xxfb/sm7xxfb.c
> @@ -1033,6 +1033,24 @@ static int __init sm712fb_init(void)
>  
>  module_init(sm712fb_init);
>  
> +module_param(mode_option, charp, S_IRUGO);
> +
> +MODULE_PARM_DESC(mode_option, "\n\t\tOptions:\n"
> +		 "\t\t0x301 = 640x480-8\n"
> +		 "\t\t0x303 = 800x600-8\n"
> +		 "\t\t0x305 = 1024x768-8\n"
> +		 "\t\t0x307 = 1280x1024-8\n"
> +		 "\t\t0x311 = 640x480-16\n"
> +		 "\t\t0x314 = 800x600-16\n"
> +		 "\t\t0x317 = 1024x768-16\n"
> +		 "\t\t0x31A = 1280x1024-16\n"
> +		 "\t\t0x312 = 640x480-24\n"
> +		 "\t\t0x315 = 800x600-24\n"
> +		 "\t\t0x318 = 1024x768-24\n"
> +		 "\t\t0x31B = 1280x1024-24\n"
> +		 "\t\tUsual example:\n"
> +		 "\t\tinsmod ./sm7xxfb.ko mode_option=\"0x301\"\n");
> +

That's funny :)

And how do you handle multiple devices in the system?

:(

Seriously, never use module parameters for device parameters, they are
two different things.  The framebuffer core has options for handling
modes, why not use them?

And yes, lots of framebuffer drivers do have crazy module parameters,
but that doesn't mean you have to perpetuate the insanity, please do
things properly here.

thanks,

greg k-h

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

* Re: [PATCH 1/2] staging: sm7xxfb: start using module parameters
@ 2015-03-24  9:48   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2015-03-24  9:48 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: devel, linux-fbdev, linux-kernel

On Tue, Mar 24, 2015 at 10:20:08AM +0530, Sudip Mukherjee wrote:
> add module parameters so that we can configure X and Y resolutions
> and bpp when using this driver as a module.
> 
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
>  drivers/staging/sm7xxfb/sm7xxfb.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
> index abdb021..6e9b2aa 100644
> --- a/drivers/staging/sm7xxfb/sm7xxfb.c
> +++ b/drivers/staging/sm7xxfb/sm7xxfb.c
> @@ -1033,6 +1033,24 @@ static int __init sm712fb_init(void)
>  
>  module_init(sm712fb_init);
>  
> +module_param(mode_option, charp, S_IRUGO);
> +
> +MODULE_PARM_DESC(mode_option, "\n\t\tOptions:\n"
> +		 "\t\t0x301 = 640x480-8\n"
> +		 "\t\t0x303 = 800x600-8\n"
> +		 "\t\t0x305 = 1024x768-8\n"
> +		 "\t\t0x307 = 1280x1024-8\n"
> +		 "\t\t0x311 = 640x480-16\n"
> +		 "\t\t0x314 = 800x600-16\n"
> +		 "\t\t0x317 = 1024x768-16\n"
> +		 "\t\t0x31A = 1280x1024-16\n"
> +		 "\t\t0x312 = 640x480-24\n"
> +		 "\t\t0x315 = 800x600-24\n"
> +		 "\t\t0x318 = 1024x768-24\n"
> +		 "\t\t0x31B = 1280x1024-24\n"
> +		 "\t\tUsual example:\n"
> +		 "\t\tinsmod ./sm7xxfb.ko mode_option=\"0x301\"\n");
> +

That's funny :)

And how do you handle multiple devices in the system?

:(

Seriously, never use module parameters for device parameters, they are
two different things.  The framebuffer core has options for handling
modes, why not use them?

And yes, lots of framebuffer drivers do have crazy module parameters,
but that doesn't mean you have to perpetuate the insanity, please do
things properly here.

thanks,

greg k-h

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

* Re: [PATCH 1/2] staging: sm7xxfb: start using module parameters
  2015-03-24  9:48   ` Greg Kroah-Hartman
@ 2015-03-24 10:40     ` Sudip Mukherjee
  -1 siblings, 0 replies; 10+ messages in thread
From: Sudip Mukherjee @ 2015-03-24 10:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-fbdev, linux-kernel

On Tue, Mar 24, 2015 at 10:48:26AM +0100, Greg Kroah-Hartman wrote:
> On Tue, Mar 24, 2015 at 10:20:08AM +0530, Sudip Mukherjee wrote:
> > +		 "\t\t0x31B = 1280x1024-24\n"
> > +		 "\t\tUsual example:\n"
> > +		 "\t\tinsmod ./sm7xxfb.ko mode_option=\"0x301\"\n");
> > +
> 
> That's funny :)
> 
> And how do you handle multiple devices in the system?
frankly speaking, never got the idea about multiple devices.

> 
> :(
> 
> Seriously, never use module parameters for device parameters, they are
> two different things.  The framebuffer core has options for handling
> modes, why not use them?
> 
> And yes, lots of framebuffer drivers do have crazy module parameters,
> but that doesn't mean you have to perpetuate the insanity, please do
> things properly here.
i am learning from other framebuffer drivers. i guess i should only
see at skeletonfb.c and not the others.
please drop this 1/2 patch, do i need to resend the 2/2 which adds
the MODULE_DEVICE_TABLE ? 

regards
sudip

> 
> thanks,
> 
> greg k-h

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

* Re: [PATCH 1/2] staging: sm7xxfb: start using module parameters
  2015-03-24 10:40     ` Sudip Mukherjee
@ 2015-03-24 10:40       ` Greg Kroah-Hartman
  -1 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2015-03-24 10:40 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: devel, linux-fbdev, linux-kernel

On Tue, Mar 24, 2015 at 03:58:35PM +0530, Sudip Mukherjee wrote:
> On Tue, Mar 24, 2015 at 10:48:26AM +0100, Greg Kroah-Hartman wrote:
> > On Tue, Mar 24, 2015 at 10:20:08AM +0530, Sudip Mukherjee wrote:
> > > +		 "\t\t0x31B = 1280x1024-24\n"
> > > +		 "\t\tUsual example:\n"
> > > +		 "\t\tinsmod ./sm7xxfb.ko mode_option=\"0x301\"\n");
> > > +
> > 
> > That's funny :)
> > 
> > And how do you handle multiple devices in the system?
> frankly speaking, never got the idea about multiple devices.
> 
> > 
> > :(
> > 
> > Seriously, never use module parameters for device parameters, they are
> > two different things.  The framebuffer core has options for handling
> > modes, why not use them?
> > 
> > And yes, lots of framebuffer drivers do have crazy module parameters,
> > but that doesn't mean you have to perpetuate the insanity, please do
> > things properly here.
> i am learning from other framebuffer drivers. i guess i should only
> see at skeletonfb.c and not the others.
> please drop this 1/2 patch, do i need to resend the 2/2 which adds
> the MODULE_DEVICE_TABLE ? 

Please do, it's long gone from my queue.

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

* Re: [PATCH 1/2] staging: sm7xxfb: start using module parameters
@ 2015-03-24 10:40       ` Greg Kroah-Hartman
  0 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2015-03-24 10:40 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: devel, linux-fbdev, linux-kernel

On Tue, Mar 24, 2015 at 03:58:35PM +0530, Sudip Mukherjee wrote:
> On Tue, Mar 24, 2015 at 10:48:26AM +0100, Greg Kroah-Hartman wrote:
> > On Tue, Mar 24, 2015 at 10:20:08AM +0530, Sudip Mukherjee wrote:
> > > +		 "\t\t0x31B = 1280x1024-24\n"
> > > +		 "\t\tUsual example:\n"
> > > +		 "\t\tinsmod ./sm7xxfb.ko mode_option=\"0x301\"\n");
> > > +
> > 
> > That's funny :)
> > 
> > And how do you handle multiple devices in the system?
> frankly speaking, never got the idea about multiple devices.
> 
> > 
> > :(
> > 
> > Seriously, never use module parameters for device parameters, they are
> > two different things.  The framebuffer core has options for handling
> > modes, why not use them?
> > 
> > And yes, lots of framebuffer drivers do have crazy module parameters,
> > but that doesn't mean you have to perpetuate the insanity, please do
> > things properly here.
> i am learning from other framebuffer drivers. i guess i should only
> see at skeletonfb.c and not the others.
> please drop this 1/2 patch, do i need to resend the 2/2 which adds
> the MODULE_DEVICE_TABLE ? 

Please do, it's long gone from my queue.

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

* Re: [PATCH 1/2] staging: sm7xxfb: start using module parameters
@ 2015-03-24 10:40     ` Sudip Mukherjee
  0 siblings, 0 replies; 10+ messages in thread
From: Sudip Mukherjee @ 2015-03-24 10:40 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-fbdev, linux-kernel

On Tue, Mar 24, 2015 at 10:48:26AM +0100, Greg Kroah-Hartman wrote:
> On Tue, Mar 24, 2015 at 10:20:08AM +0530, Sudip Mukherjee wrote:
> > +		 "\t\t0x31B = 1280x1024-24\n"
> > +		 "\t\tUsual example:\n"
> > +		 "\t\tinsmod ./sm7xxfb.ko mode_option=\"0x301\"\n");
> > +
> 
> That's funny :)
> 
> And how do you handle multiple devices in the system?
frankly speaking, never got the idea about multiple devices.

> 
> :(
> 
> Seriously, never use module parameters for device parameters, they are
> two different things.  The framebuffer core has options for handling
> modes, why not use them?
> 
> And yes, lots of framebuffer drivers do have crazy module parameters,
> but that doesn't mean you have to perpetuate the insanity, please do
> things properly here.
i am learning from other framebuffer drivers. i guess i should only
see at skeletonfb.c and not the others.
please drop this 1/2 patch, do i need to resend the 2/2 which adds
the MODULE_DEVICE_TABLE ? 

regards
sudip

> 
> thanks,
> 
> greg k-h

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

end of thread, other threads:[~2015-03-24 10:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-24  4:50 [PATCH 1/2] staging: sm7xxfb: start using module parameters Sudip Mukherjee
2015-03-24  4:50 ` Sudip Mukherjee
2015-03-24  4:50 ` [PATCH 2/2] staging: sm7xxfb: add MODULE_DEVICE_TABLE Sudip Mukherjee
2015-03-24  4:50   ` Sudip Mukherjee
2015-03-24  9:48 ` [PATCH 1/2] staging: sm7xxfb: start using module parameters Greg Kroah-Hartman
2015-03-24  9:48   ` Greg Kroah-Hartman
2015-03-24 10:28   ` Sudip Mukherjee
2015-03-24 10:40     ` Sudip Mukherjee
2015-03-24 10:40     ` Greg Kroah-Hartman
2015-03-24 10:40       ` Greg Kroah-Hartman

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.