linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <platform-driver-x86@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	Peter Feuerer <peter@piie.net>,
	Darren Hart <dvhart@infradead.org>,
	Andy Shevchenko <andy@infradead.org>
Subject: [PATCH 2/6] platform/x86: acerhdf: Enable ability to list supported systems
Date: Thu, 20 Sep 2018 21:44:17 -0400	[thread overview]
Message-ID: <20180921014421.30804-3-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <20180921014421.30804-1-paul.gortmaker@windriver.com>

This driver has two module parameters that allow an override of the
checks for matching model and BIOS version.  However, both parameters
expect you to choose an entry from the existing list of supported
systems, encoded within the driver itself.

Without the source, such as in a binary distribution, the end user
does not have access to this information, thus rendering the two
module parameters essentially useless.

Add a module parameter that allows the end user to dump the list
of make/model/versions so that they can then pick one that most
closely matches their own system.

Cc: Peter Feuerer <peter@piie.net>
Cc: Darren Hart <dvhart@infradead.org>
Cc: Andy Shevchenko <andy@infradead.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/platform/x86/acerhdf.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
index 3d5c4e183111..2735815c73c5 100644
--- a/drivers/platform/x86/acerhdf.c
+++ b/drivers/platform/x86/acerhdf.c
@@ -86,6 +86,7 @@ static unsigned int interval = 10;
 static unsigned int fanon = 60000;
 static unsigned int fanoff = 53000;
 static unsigned int verbose;
+static unsigned int list_supported;
 static unsigned int fanstate = ACERHDF_FAN_AUTO;
 static char force_bios[16];
 static char force_product[16];
@@ -104,6 +105,8 @@ module_param(fanoff, uint, 0600);
 MODULE_PARM_DESC(fanoff, "Turn the fan off below this temperature");
 module_param(verbose, uint, 0600);
 MODULE_PARM_DESC(verbose, "Enable verbose dmesg output");
+module_param(list_supported, uint, 0600);
+MODULE_PARM_DESC(list_supported, "List supported models and BIOS versions");
 module_param_string(force_bios, force_bios, 16, 0);
 MODULE_PARM_DESC(force_bios, "Pretend system has this known supported BIOS version");
 module_param_string(force_product, force_product, 16, 0);
@@ -632,6 +635,17 @@ static int acerhdf_check_hardware(void)
 
 	pr_info("Acer Aspire One Fan driver, v.%s\n", DRV_VER);
 
+	if (list_supported) {
+		pr_info("List of supported Manufacturer/Model/BIOS:\n");
+		pr_info("---------------------------------------------------\n");
+		for (bt = bios_tbl; bt->vendor[0]; bt++) {
+			pr_info("%-13s | %-17s | %-10s\n", bt->vendor,
+				bt->product, bt->version);
+		}
+		pr_info("---------------------------------------------------\n");
+		return -ECANCELED;
+	}
+
 	if (force_bios[0]) {
 		version = force_bios;
 		pr_info("forcing BIOS version: %s\n", version);
-- 
2.15.0


  parent reply	other threads:[~2018-09-21  1:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21  1:44 [PATCH 0/6] platform/x86: acerhdf: new BIOS string, better modparam handling Paul Gortmaker
2018-09-21  1:44 ` [PATCH 1/6] platform/x86: acerhdf: clarify modinfo messages for BIOS override Paul Gortmaker
2018-09-21  1:44 ` Paul Gortmaker [this message]
2018-09-21  1:44 ` [PATCH 3/6] platform/x86: acerhdf: Remove cut-and-paste trap from instructions Paul Gortmaker
2018-09-21  1:44 ` [PATCH 4/6] platform/x86: acerhdf: Add BIOS entry for Gateway LT31 v1.3307 Paul Gortmaker
2018-09-21  1:44 ` [PATCH 5/6] platform/x86: acerhdf: mark appropriate content with __init prefix Paul Gortmaker
2018-09-21  1:44 ` [PATCH 6/6] platform/x86: acerhdf: restructure to allow large BIOS table be __initconst Paul Gortmaker
2018-09-21  6:20 ` [PATCH 0/6] platform/x86: acerhdf: new BIOS string, better modparam handling Peter Feuerer
2018-09-26 11:09   ` Andy Shevchenko
2018-09-26 11:13     ` Andy Shevchenko
2018-09-26 14:11       ` Paul Gortmaker

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=20180921014421.30804-3-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=andy@infradead.org \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter@piie.net \
    --cc=platform-driver-x86@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).