From: Bernhard Froemel <bfroemel@gmail.com>
To: Matthew Garrett <mjg@redhat.com>,
platform-driver-x86@vger.kernel.org,
Seth Forshee <seth.forshee@canonical.com>
Cc: linux-kernel@vger.kernel.org,
Bernhard Froemel <froemel@vmars.tuwien.ac.at>
Subject: [PATCH v2 2/2] apple-gmux: Obtain version info from indexed gmux
Date: Sat, 25 Aug 2012 10:30:49 +0200 [thread overview]
Message-ID: <1345883449-2790-2-git-send-email-bfroemel@gmail.com> (raw)
In-Reply-To: <1345883449-2790-1-git-send-email-bfroemel@gmail.com>
From: Bernhard Froemel <froemel@vmars.tuwien.ac.at>
This patch extracts and displays version information from the indexed
gmux device as it is also done for the classic gmux device.
Signed-off-by: Bernhard Froemel <froemel@vmars.tuwien.ac.at>
---
drivers/platform/x86/apple-gmux.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
index c38538e..0e43477 100644
--- a/drivers/platform/x86/apple-gmux.c
+++ b/drivers/platform/x86/apple-gmux.c
@@ -463,18 +463,22 @@ static int __devinit gmux_probe(struct pnp_dev *pnp,
ver_release = gmux_read8(gmux_data, GMUX_PORT_VERSION_RELEASE);
if (ver_major == 0xff && ver_minor == 0xff && ver_release == 0xff) {
if (gmux_is_indexed(gmux_data)) {
+ u32 version;
mutex_init(&gmux_data->index_lock);
gmux_data->indexed = true;
+ version = gmux_read32(gmux_data,
+ GMUX_PORT_VERSION_MAJOR);
+ ver_major = (version >> 24) & 0xff;
+ ver_minor = (version >> 16) & 0xff;
+ ver_release = (version >> 8) & 0xff;
} else {
pr_info("gmux device not present\n");
ret = -ENODEV;
goto err_release;
}
- pr_info("Found indexed gmux\n");
- } else {
- pr_info("Found gmux version %d.%d.%d\n", ver_major, ver_minor,
- ver_release);
}
+ pr_info("Found gmux version %d.%d.%d [%s]\n", ver_major, ver_minor,
+ ver_release, (gmux_data->indexed ? "indexed" : "classic"));
memset(&props, 0, sizeof(props));
props.type = BACKLIGHT_PLATFORM;
--
1.7.9.5
next prev parent reply other threads:[~2012-08-25 8:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-25 8:26 [PATCH v2 0/2] apple-gmux: Fixes related to 'Support for new hardware' Bernhard Froemel
2012-08-25 8:30 ` [PATCH v2 1/2] apple-gmux: Fix index read functions Bernhard Froemel
2012-08-25 8:30 ` Bernhard Froemel [this message]
2012-08-26 0:48 ` [PATCH v2 2/2] apple-gmux: Obtain version info from indexed gmux Seth Forshee
2012-08-25 17:53 ` [PATCH v2 1/2] apple-gmux: Fix index read functions Henrik Rydberg
2012-08-26 0:47 ` Seth Forshee
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=1345883449-2790-2-git-send-email-bfroemel@gmail.com \
--to=bfroemel@gmail.com \
--cc=froemel@vmars.tuwien.ac.at \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=seth.forshee@canonical.com \
/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
Powered by JetHome