Skip to content

Commit

Permalink
Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers…
Browse files Browse the repository at this point in the history
…-x86

Pull x86 platform driver updates from Matthew Garrett:
 "Some significant updates to samsung-laptop, additional hardware
  support for Toshibas, misc updates to various hardware and a new
  backlight driver for some Apple machines."

Fix up trivial conflicts: geode Geos update happening next to net5501
support, and MSIC thermal platform support added twice.

* 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86: (77 commits)
  acer-wmi: add quirk table for video backlight vendor mode
  drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() avoid NULL deref
  samsung-laptop: unregister ACPI video module for some well known laptops
  acer-wmi: No wifi rfkill on Sony machines
  thinkpad-acpi: recognize Lenovo as version string in newer V-series BIOS
  asus-wmi: don't update power and brightness when using scalar
  eeepc-wmi: split et2012 specific hacks
  eeepc-wmi: refine quirks handling
  asus-nb-wmi: set panel_power correctly
  asus-wmi: move WAPF variable into quirks_entry
  asus-wmi: store backlight power status for AIO machine
  asus-wmi: add scalar board brightness adj. support
  samsung-laptop: cleanup return type: mode_t vs umode_t
  drivers, samsung-laptop: fix usage of isalnum
  drivers, samsung-laptop: fix initialization of sabi_data in sabi_set_commandb
  asus-wmi: on/off bit is not set when reading the value
  eeepc-wmi: add extra keymaps for EP121
  asus-nb-wmi: ignore useless keys
  acer-wmi: support Lenovo ideapad S205 Brazos wifi switch
  acer-wmi: fix out of input parameter size when set
  ...
  • Loading branch information
Linus Torvalds committed Mar 28, 2012
2 parents d2a2fc1 + 86924de commit 61e5191
Show file tree
Hide file tree
Showing 36 changed files with 2,448 additions and 2,414 deletions.
18 changes: 18 additions & 0 deletions Documentation/ABI/testing/sysfs-driver-samsung-laptop
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,21 @@ Description: Some Samsung laptops have different "performance levels"
Specifically, not all support the "overclock" option,
and it's still unknown if this value even changes
anything, other than making the user feel a bit better.

What: /sys/devices/platform/samsung/battery_life_extender
Date: December 1, 2011
KernelVersion: 3.3
Contact: Corentin Chary <corentin.chary@gmail.com>
Description: Max battery charge level can be modified, battery cycle
life can be extended by reducing the max battery charge
level.
0 means normal battery mode (100% charge)
1 means battery life extender mode (80% charge)

What: /sys/devices/platform/samsung/usb_charge
Date: December 1, 2011
KernelVersion: 3.3
Contact: Corentin Chary <corentin.chary@gmail.com>
Description: Use your USB ports to charge devices, even
when your laptop is powered off.
1 means enabled, 0 means disabled.
2 changes: 1 addition & 1 deletion Documentation/laptops/asus-laptop.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Status
Usage
-----

Try "modprobe asus_acpi". Check your dmesg (simply type dmesg). You should
Try "modprobe asus-laptop". Check your dmesg (simply type dmesg). You should
see some lines like this :

Asus Laptop Extras version 0.42
Expand Down
5 changes: 5 additions & 0 deletions Documentation/laptops/sony-laptop.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ subsystem. See the logs of acpid or /proc/acpi/event and
devices are created by the driver. Additionally, loading the driver with the
debug option will report all events in the kernel log.

The "scancodes" passed to the input system (that can be remapped with udev)
are indexes to the table "sony_laptop_input_keycode_map" in the sony-laptop.c
module. For example the "FN/E" key combination (EJECTCD on some models)
generates the scancode 20 (0x14).

Backlight control:
------------------
If your laptop model supports it, you will find sysfs files in the
Expand Down
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -5776,6 +5776,12 @@ F: drivers/media/common/saa7146*
F: drivers/media/video/*7146*
F: include/media/*7146*

SAMSUNG LAPTOP DRIVER
M: Corentin Chary <corentincj@iksaif.net>
L: platform-driver-x86@vger.kernel.org
S: Maintained
F: drivers/platform/x86/samsung-laptop.c

SAMSUNG AUDIO (ASoC) DRIVERS
M: Sangbeom Kim <sbkim73@samsung.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
Expand Down
7 changes: 7 additions & 0 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2125,6 +2125,13 @@ config NET5501
---help---
This option enables system support for the Soekris Engineering net5501.

config GEOS
bool "Traverse Technologies GEOS System Support (LEDS, GPIO, etc)"
select GPIOLIB
depends on DMI
---help---
This option enables system support for the Traverse Technologies GEOS.

endif # X86_32

config AMD_NB
Expand Down
1 change: 1 addition & 0 deletions arch/x86/platform/geode/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
obj-$(CONFIG_ALIX) += alix.o
obj-$(CONFIG_NET5501) += net5501.o
obj-$(CONFIG_GEOS) += geos.o
128 changes: 128 additions & 0 deletions arch/x86/platform/geode/geos.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
/*
* System Specific setup for Traverse Technologies GEOS.
* At the moment this means setup of GPIO control of LEDs.
*
* Copyright (C) 2008 Constantin Baranov <const@mimas.ru>
* Copyright (C) 2011 Ed Wildgoose <kernel@wildgooses.com>
* and Philip Prindeville <philipp@redfish-solutions.com>
*
* TODO: There are large similarities with leds-net5501.c
* by Alessandro Zummo <a.zummo@towertech.it>
* In the future leds-net5501.c should be migrated over to platform
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*/

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/string.h>
#include <linux/module.h>
#include <linux/leds.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/input.h>
#include <linux/gpio_keys.h>
#include <linux/dmi.h>

#include <asm/geode.h>

static struct gpio_keys_button geos_gpio_buttons[] = {
{
.code = KEY_RESTART,
.gpio = 3,
.active_low = 1,
.desc = "Reset button",
.type = EV_KEY,
.wakeup = 0,
.debounce_interval = 100,
.can_disable = 0,
}
};
static struct gpio_keys_platform_data geos_buttons_data = {
.buttons = geos_gpio_buttons,
.nbuttons = ARRAY_SIZE(geos_gpio_buttons),
.poll_interval = 20,
};

static struct platform_device geos_buttons_dev = {
.name = "gpio-keys-polled",
.id = 1,
.dev = {
.platform_data = &geos_buttons_data,
}
};

static struct gpio_led geos_leds[] = {
{
.name = "geos:1",
.gpio = 6,
.default_trigger = "default-on",
.active_low = 1,
},
{
.name = "geos:2",
.gpio = 25,
.default_trigger = "default-off",
.active_low = 1,
},
{
.name = "geos:3",
.gpio = 27,
.default_trigger = "default-off",
.active_low = 1,
},
};

static struct gpio_led_platform_data geos_leds_data = {
.num_leds = ARRAY_SIZE(geos_leds),
.leds = geos_leds,
};

static struct platform_device geos_leds_dev = {
.name = "leds-gpio",
.id = -1,
.dev.platform_data = &geos_leds_data,
};

static struct __initdata platform_device *geos_devs[] = {
&geos_buttons_dev,
&geos_leds_dev,
};

static void __init register_geos(void)
{
/* Setup LED control through leds-gpio driver */
platform_add_devices(geos_devs, ARRAY_SIZE(geos_devs));
}

static int __init geos_init(void)
{
const char *vendor, *product;

if (!is_geode())
return 0;

vendor = dmi_get_system_info(DMI_SYS_VENDOR);
if (!vendor || strcmp(vendor, "Traverse Technologies"))
return 0;

product = dmi_get_system_info(DMI_PRODUCT_NAME);
if (!product || strcmp(product, "Geos"))
return 0;

printk(KERN_INFO "%s: system is recognized as \"%s %s\"\n",
KBUILD_MODNAME, vendor, product);

register_geos();

return 0;
}

module_init(geos_init);

MODULE_AUTHOR("Philip Prindeville <philipp@redfish-solutions.com>");
MODULE_DESCRIPTION("Traverse Technologies Geos System Setup");
MODULE_LICENSE("GPL");
10 changes: 10 additions & 0 deletions drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,16 @@ int ec_transaction(u8 command,

EXPORT_SYMBOL(ec_transaction);

/* Get the handle to the EC device */
acpi_handle ec_get_handle(void)
{
if (!first_ec)
return NULL;
return first_ec->handle;
}

EXPORT_SYMBOL(ec_get_handle);

void acpi_ec_block_transactions(void)
{
struct acpi_ec *ec = first_ec;
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/video_detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Depending on whether ACPI graphics extensions (cmp. ACPI spec Appendix B)
* are available, video.ko should be used to handle the device.
*
* Otherwise vendor specific drivers like thinkpad_acpi, asus_acpi,
* Otherwise vendor specific drivers like thinkpad_acpi, asus-laptop,
* sony_acpi,... can take care about backlight brightness.
*
* If CONFIG_ACPI_VIDEO is neither set as "compiled in" (y) nor as a module (m)
Expand Down
71 changes: 28 additions & 43 deletions drivers/platform/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ config ACER_WMI
depends on RFKILL || RFKILL = n
depends on ACPI_WMI
select INPUT_SPARSEKMAP
# Acer WMI depends on ACPI_VIDEO when ACPI is enabled
# but for select to work, need to select ACPI_VIDEO's dependencies, ick
select VIDEO_OUTPUT_CONTROL if ACPI
select ACPI_VIDEO if ACPI
---help---
This is a driver for newer Acer (and Wistron) laptops. It adds
wireless radio and bluetooth control, and on some laptops,
Expand Down Expand Up @@ -54,7 +58,6 @@ config ACERHDF
config ASUS_LAPTOP
tristate "Asus Laptop Extras"
depends on ACPI
depends on !ACPI_ASUS
select LEDS_CLASS
select NEW_LEDS
select BACKLIGHT_CLASS_DEVICE
Expand Down Expand Up @@ -460,10 +463,9 @@ config INTEL_MENLOW
If unsure, say N.

config EEEPC_LAPTOP
tristate "Eee PC Hotkey Driver (EXPERIMENTAL)"
tristate "Eee PC Hotkey Driver"
depends on ACPI
depends on INPUT
depends on EXPERIMENTAL
depends on RFKILL || RFKILL = n
depends on HOTPLUG_PCI
select BACKLIGHT_CLASS_DEVICE
Expand All @@ -482,11 +484,10 @@ config EEEPC_LAPTOP
doesn't work on your Eee PC, try eeepc-wmi instead.

config ASUS_WMI
tristate "ASUS WMI Driver (EXPERIMENTAL)"
tristate "ASUS WMI Driver"
depends on ACPI_WMI
depends on INPUT
depends on HWMON
depends on EXPERIMENTAL
depends on BACKLIGHT_CLASS_DEVICE
depends on RFKILL || RFKILL = n
depends on HOTPLUG_PCI
Expand All @@ -501,7 +502,7 @@ config ASUS_WMI
be called asus-wmi.

config ASUS_NB_WMI
tristate "Asus Notebook WMI Driver (EXPERIMENTAL)"
tristate "Asus Notebook WMI Driver"
depends on ASUS_WMI
---help---
This is a driver for newer Asus notebooks. It adds extra features
Expand All @@ -514,7 +515,7 @@ config ASUS_NB_WMI
here.

config EEEPC_WMI
tristate "Eee PC WMI Driver (EXPERIMENTAL)"
tristate "Eee PC WMI Driver"
depends on ASUS_WMI
---help---
This is a driver for newer Eee PC laptops. It adds extra features
Expand Down Expand Up @@ -559,38 +560,6 @@ config MSI_WMI
To compile this driver as a module, choose M here: the module will
be called msi-wmi.

config ACPI_ASUS
tristate "ASUS/Medion Laptop Extras (DEPRECATED)"
depends on ACPI
select BACKLIGHT_CLASS_DEVICE
---help---
This driver provides support for extra features of ACPI-compatible
ASUS laptops. As some of Medion laptops are made by ASUS, it may also
support some Medion laptops (such as 9675 for example). It makes all
the extra buttons generate standard ACPI events that go through
/proc/acpi/events, and (on some models) adds support for changing the
display brightness and output, switching the LCD backlight on and off,
and most importantly, allows you to blink those fancy LEDs intended
for reporting mail and wireless status.

Note: display switching code is currently considered EXPERIMENTAL,
toying with these values may even lock your machine.

All settings are changed via /proc/acpi/asus directory entries. Owner
and group for these entries can be set with asus_uid and asus_gid
parameters.

More information and a userspace daemon for handling the extra buttons
at <http://acpi4asus.sf.net>.

If you have an ACPI-compatible ASUS laptop, say Y or M here. This
driver is still under development, so if your laptop is unsupported or
something works not quite as expected, please use the mailing list
available on the above page (acpi4asus-user@lists.sourceforge.net).

NOTE: This driver is deprecated and will probably be removed soon,
use asus-laptop instead.

config TOPSTAR_LAPTOP
tristate "Topstar Laptop Extras"
depends on ACPI
Expand All @@ -604,6 +573,7 @@ config TOPSTAR_LAPTOP
config ACPI_TOSHIBA
tristate "Toshiba Laptop Extras"
depends on ACPI
depends on ACPI_WMI
select LEDS_CLASS
select NEW_LEDS
depends on BACKLIGHT_CLASS_DEVICE
Expand Down Expand Up @@ -746,13 +716,18 @@ config XO15_EBOOK

config SAMSUNG_LAPTOP
tristate "Samsung Laptop driver"
depends on RFKILL && BACKLIGHT_CLASS_DEVICE && X86
depends on X86
depends on RFKILL || RFKILL = n
depends on BACKLIGHT_CLASS_DEVICE
select LEDS_CLASS
select NEW_LEDS
---help---
This module implements a driver for a wide range of different
Samsung laptops. It offers control over the different
function keys, wireless LED, LCD backlight level, and
sometimes provides a "performance_control" sysfs file to allow
the performance level of the laptop to be changed.
function keys, wireless LED, LCD backlight level.

It may also provide some sysfs files described in
<file:Documentation/ABI/testing/sysfs-platform-samsung-laptop>

To compile this driver as a module, choose M here: the module
will be called samsung-laptop.
Expand Down Expand Up @@ -781,4 +756,14 @@ config SAMSUNG_Q10
This driver provides support for backlight control on Samsung Q10
and related laptops, including Dell Latitude X200.

config APPLE_GMUX
tristate "Apple Gmux Driver"
depends on PNP
select BACKLIGHT_CLASS_DEVICE
---help---
This driver provides support for the gmux device found on many
Apple laptops, which controls the display mux for the hybrid
graphics as well as the backlight. Currently only backlight
control is supported by the driver.

endif # X86_PLATFORM_DEVICES
6 changes: 5 additions & 1 deletion drivers/platform/x86/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ obj-$(CONFIG_PANASONIC_LAPTOP) += panasonic-laptop.o
obj-$(CONFIG_INTEL_MENLOW) += intel_menlow.o
obj-$(CONFIG_ACPI_WMI) += wmi.o
obj-$(CONFIG_MSI_WMI) += msi-wmi.o
obj-$(CONFIG_ACPI_ASUS) += asus_acpi.o
obj-$(CONFIG_TOPSTAR_LAPTOP) += topstar-laptop.o

# toshiba_acpi must link after wmi to ensure that wmi devices are found
# before toshiba_acpi initializes
obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o

obj-$(CONFIG_TOSHIBA_BT_RFKILL) += toshiba_bluetooth.o
obj-$(CONFIG_INTEL_SCU_IPC) += intel_scu_ipc.o
obj-$(CONFIG_INTEL_SCU_IPC_UTIL) += intel_scu_ipcutil.o
Expand All @@ -46,3 +49,4 @@ obj-$(CONFIG_MXM_WMI) += mxm-wmi.o
obj-$(CONFIG_INTEL_MID_POWER_BUTTON) += intel_mid_powerbtn.o
obj-$(CONFIG_INTEL_OAKTRAIL) += intel_oaktrail.o
obj-$(CONFIG_SAMSUNG_Q10) += samsung-q10.o
obj-$(CONFIG_APPLE_GMUX) += apple-gmux.o
Loading

0 comments on commit 61e5191

Please sign in to comment.