path: root/drivers/platform/x86/apple-gmux.c
AgeCommit message (Collapse)Author
2013-01-03Drivers: platform: x86: remove __dev* attributes.Greg Kroah-Hartman
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Joey Lee <jlee@novell.com> Cc: Matthew Garrett <mjg@redhat.com> Cc: Peter Feuerer <peter@piie.net> Cc: Corentin Chary <corentin.chary@gmail.com> Cc: Cezary Jackiewicz <cezary.jackiewicz@gmail.com> Cc: Robert Gerlach <khnz@gmx.de> Cc: Ike Panhc <ike.pan@canonical.com> Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13drivers-platform-x86: remove useless #ifdef CONFIG_ACPI_VIDEOCorentin Chary
Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-09-13apple-gmux: Fix port address calculation in gmux_pio_write32()Seth Forshee
This function fails to add the start address of the gmux I/O range to the requested port address and thus writes to the wrong location. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-09-13apple-gmux: Fix index read functionsBernhard Froemel
Study of Apple's binary driver revealed that the GMUX_READ_PORT should be written between calls to gmux_index_wait_ready and gmux_index_wait_complete (i.e., the new index protocol must be followed). If this is not done correctly, the indexed gmux device only partially accepts writes which lead to problems concerning GPU switching. Special thanks to Seth Forshee who helped greatly with identifying unnecessary changes. Signed-off-by: Bernhard Froemel <froemel@vmars.tuwien.ac.at> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-09-13apple-gmux: Obtain version info from indexed gmuxBernhard Froemel
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> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-17apple-gmux: Add display mux supportAndreas Heider
Add support for the gmux display muxing functionality and register a mux handler with vga_switcheroo. Signed-off-by: Andreas Heider <andreas@meetr.de> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-17apple_gmux: Fix ACPI video unregisterMatthew Garrett
We were only calling acpi_video_unregister() if ACPI video support was built in, not if it was a module. Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-17apple_gmux: Add support for newer hardwareMatthew Garrett
New gmux devices have a different method for accessing the registers. Update the driver to cope. Incorporates feedback from Bernhard Froemel. Signed-off-by: Matthew Garrett <mjg@redhat.com> Cc: Bernhard Froemel <froemel@vmars.tuwien.ac.at> Cc: Seth Forshee <seth.forshee@canonical.com>
2012-08-17gmux: Add generic write32 functionMatthew Garrett
Move the special-cased backlight update function to a generic gmux_write32 function. Signed-off-by: Matthew Garrett <mjg@redhat.com> Cc: Seth Forshee <seth.forshee@canonical.com>
2012-07-28drivers-platform-x86: use acpi_video_dmi_promote_vendor()Corentin Chary
Instead of using directly acpi_video_unregister(), use acpi_video_dmi_promote_vendor() (and make it call acpi_video_unregister() if needed) Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-06-01apple-gmux: Fix up the suspend/resume patchMatthew Garrett
I incorporated the wrong version of the suspend/resume patch for gmux, and so lost David Woodhouse's fix to leave the backlight level unchanged over suspend/resume. This fixes it up to v2. Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31apple-gmux: Add suspend/resume support for the backlightSeth Forshee
After S3, the brightness might not be restored to the pre-suspend value. Request status update calls from the backlight core on suspend/resume to ensure the brightness value is restored. Reported-and-tested-by: Austin Lund <austin.lund@gmail.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26platform/x86: Add driver for Apple gmux deviceSeth Forshee
Apple laptops with hybrid graphics have a device named gmux that controls the muxing of the LVDS panel between the GPUs as well as screen brightness. This driver adds support for the gmux device. Only backlight control is supported initially. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Tested-by: Grant Likely <grant.likely@secretlab.ca>