Commit 07f377da authored by Bernhard Froemel's avatar Bernhard Froemel Committed by Matthew Garrett

apple-gmux: Obtain version info from indexed gmux

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: default avatarBernhard Froemel <froemel@vmars.tuwien.ac.at>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent 5b716ac7
...@@ -461,18 +461,22 @@ static int __devinit gmux_probe(struct pnp_dev *pnp, ...@@ -461,18 +461,22 @@ static int __devinit gmux_probe(struct pnp_dev *pnp,
ver_release = gmux_read8(gmux_data, GMUX_PORT_VERSION_RELEASE); ver_release = gmux_read8(gmux_data, GMUX_PORT_VERSION_RELEASE);
if (ver_major == 0xff && ver_minor == 0xff && ver_release == 0xff) { if (ver_major == 0xff && ver_minor == 0xff && ver_release == 0xff) {
if (gmux_is_indexed(gmux_data)) { if (gmux_is_indexed(gmux_data)) {
u32 version;
mutex_init(&gmux_data->index_lock); mutex_init(&gmux_data->index_lock);
gmux_data->indexed = true; 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 { } else {
pr_info("gmux device not present\n"); pr_info("gmux device not present\n");
ret = -ENODEV; ret = -ENODEV;
goto err_release; 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)); memset(&props, 0, sizeof(props));
props.type = BACKLIGHT_PLATFORM; props.type = BACKLIGHT_PLATFORM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment