linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] staging: sm7xxfb: start using module parameters
Date: Tue, 24 Mar 2015 04:50:21 +0000	[thread overview]
Message-ID: <1427172609-4318-1-git-send-email-sudipm.mukherjee@gmail.com> (raw)

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


             reply	other threads:[~2015-03-24  4:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24  4:50 Sudip Mukherjee [this message]
2015-03-24  4:50 ` [PATCH 2/2] staging: sm7xxfb: add MODULE_DEVICE_TABLE Sudip Mukherjee
2015-03-24  9:48 ` [PATCH 1/2] staging: sm7xxfb: start using module parameters Greg Kroah-Hartman
2015-03-24 10:40   ` Sudip Mukherjee
2015-03-24 10:40     ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427172609-4318-1-git-send-email-sudipm.mukherjee@gmail.com \
    --to=sudipm.mukherjee@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).