Skip to content

Commit

Permalink
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/mjg59/platform-drivers-x86

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86: (32 commits)
  Move N014, N051 and CR620 dmi information to load scm dmi table
  drivers/platform/x86/eeepc-wmi.c: fix build warning
  X86 platfrom wmi: Add debug facility to dump WMI data in a readable way
  X86 platform wmi: Also log GUID string when an event happens and debug is set
  X86 platform wmi: Introduce debug param to log all WMI events
  Clean up all objects used by scm model when driver initial fail or exit
  msi-laptop: fix up some coding style issues found by checkpatch
  msi-laptop: Add i8042 filter to sync sw state with BIOS when function key pressed
  msi-laptop: Set rfkill init state when msi-laptop intiial
  msi-laptop: Add MSI CR620 notebook dmi information to scm models table
  msi-laptop: Add N014 N051 dmi information to scm models table
  drivers/platform/x86: Use kmemdup
  drivers/platform/x86: Use kzalloc
  drivers/platform/x86: Clarify the MRST IPC driver description slightly
  eeepc-wmi: depends on BACKLIGHT_CLASS_DEVICE
  IPC driver for Intel Mobile Internet Device (MID) platforms
  classmate-laptop: Add RFKILL support.
  thinkpad-acpi: document backlight level writeback at driver init
  thinkpad-acpi: clean up ACPI handles handling
  thinkpad-acpi: don't depend on led_path for led firmware type (v2)
  ...
torvalds committed May 22, 2010
2 parents 6f68fba + 785cfc0 commit 27a3353
Showing 11 changed files with 1,710 additions and 295 deletions.
66 changes: 49 additions & 17 deletions Documentation/laptops/thinkpad-acpi.txt
Original file line number Diff line number Diff line change
@@ -292,13 +292,13 @@ sysfs notes:

Warning: when in NVRAM mode, the volume up/down/mute
keys are synthesized according to changes in the mixer,
so you have to use volume up or volume down to unmute,
as per the ThinkPad volume mixer user interface. When
in ACPI event mode, volume up/down/mute are reported as
separate events, but this behaviour may be corrected in
future releases of this driver, in which case the
ThinkPad volume mixer user interface semantics will be
enforced.
which uses a single volume up or volume down hotkey
press to unmute, as per the ThinkPad volume mixer user
interface. When in ACPI event mode, volume up/down/mute
events are reported by the firmware and can behave
differently (and that behaviour changes with firmware
version -- not just with firmware models -- as well as
OSI(Linux) state).

hotkey_poll_freq:
frequency in Hz for hot key polling. It must be between
@@ -309,7 +309,7 @@ sysfs notes:
will cause hot key presses that require NVRAM polling
to never be reported.

Setting hotkey_poll_freq too low will cause repeated
Setting hotkey_poll_freq too low may cause repeated
pressings of the same hot key to be misreported as a
single key press, or to not even be detected at all.
The recommended polling frequency is 10Hz.
@@ -397,14 +397,16 @@ ACPI Scan
event code Key Notes

0x1001 0x00 FN+F1 -

0x1002 0x01 FN+F2 IBM: battery (rare)
Lenovo: Screen lock

0x1003 0x02 FN+F3 Many IBM models always report
this hot key, even with hot keys
disabled or with Fn+F3 masked
off
IBM: screen lock
IBM: screen lock, often turns
off the ThinkLight as side-effect
Lenovo: battery

0x1004 0x03 FN+F4 Sleep button (ACPI sleep button
@@ -433,7 +435,8 @@ event code Key Notes
Do you feel lucky today?

0x1008 0x07 FN+F8 IBM: toggle screen expand
Lenovo: configure UltraNav
Lenovo: configure UltraNav,
or toggle screen expand

0x1009 0x08 FN+F9 -
.. .. ..
@@ -444,7 +447,7 @@ event code Key Notes
either through the ACPI event,
or through a hotkey event.
The firmware may refuse to
generate further FN+F4 key
generate further FN+F12 key
press events until a S3 or S4
ACPI sleep cycle is performed,
or some time passes.
@@ -512,30 +515,59 @@ events for switches:
SW_RFKILL_ALL T60 and later hardware rfkill rocker switch
SW_TABLET_MODE Tablet ThinkPads HKEY events 0x5009 and 0x500A

Non hot-key ACPI HKEY event map:
Non hotkey ACPI HKEY event map:
-------------------------------

Events that are not propagated by the driver, except for legacy
compatibility purposes when hotkey_report_mode is set to 1:

0x5001 Lid closed
0x5002 Lid opened
0x5009 Tablet swivel: switched to tablet mode
0x500A Tablet swivel: switched to normal mode
0x7000 Radio Switch may have changed state

The above events are not propagated by the driver, except for legacy
compatibility purposes when hotkey_report_mode is set to 1.
Events that are never propagated by the driver:

0x2304 System is waking up from suspend to undock
0x2305 System is waking up from suspend to eject bay
0x2404 System is waking up from hibernation to undock
0x2405 System is waking up from hibernation to eject bay
0x5010 Brightness level changed/control event

The above events are never propagated by the driver.
Events that are propagated by the driver to userspace:

0x2313 ALARM: System is waking up from suspend because
the battery is nearly empty
0x2413 ALARM: System is waking up from hibernation because
the battery is nearly empty
0x3003 Bay ejection (see 0x2x05) complete, can sleep again
0x3006 Bay hotplug request (hint to power up SATA link when
the optical drive tray is ejected)
0x4003 Undocked (see 0x2x04), can sleep again
0x500B Tablet pen inserted into its storage bay
0x500C Tablet pen removed from its storage bay

The above events are propagated by the driver.
0x6011 ALARM: battery is too hot
0x6012 ALARM: battery is extremely hot
0x6021 ALARM: a sensor is too hot
0x6022 ALARM: a sensor is extremely hot
0x6030 System thermal table changed

Battery nearly empty alarms are a last resort attempt to get the
operating system to hibernate or shutdown cleanly (0x2313), or shutdown
cleanly (0x2413) before power is lost. They must be acted upon, as the
wake up caused by the firmware will have negated most safety nets...

When any of the "too hot" alarms happen, according to Lenovo the user
should suspend or hibernate the laptop (and in the case of battery
alarms, unplug the AC adapter) to let it cool down. These alarms do
signal that something is wrong, they should never happen on normal
operating conditions.

The "extremely hot" alarms are emergencies. According to Lenovo, the
operating system is to force either an immediate suspend or hibernate
cycle, or a system shutdown. Obviously, something is very wrong if this
happens.

Compatibility notes:

55 changes: 55 additions & 0 deletions arch/x86/include/asm/intel_scu_ipc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#ifndef _ASM_X86_INTEL_SCU_IPC_H_
#define _ASM_X86_INTEL_SCU_IPC_H_

/* Read single register */
int intel_scu_ipc_ioread8(u16 addr, u8 *data);

/* Read two sequential registers */
int intel_scu_ipc_ioread16(u16 addr, u16 *data);

/* Read four sequential registers */
int intel_scu_ipc_ioread32(u16 addr, u32 *data);

/* Read a vector */
int intel_scu_ipc_readv(u16 *addr, u8 *data, int len);

/* Write single register */
int intel_scu_ipc_iowrite8(u16 addr, u8 data);

/* Write two sequential registers */
int intel_scu_ipc_iowrite16(u16 addr, u16 data);

/* Write four sequential registers */
int intel_scu_ipc_iowrite32(u16 addr, u32 data);

/* Write a vector */
int intel_scu_ipc_writev(u16 *addr, u8 *data, int len);

/* Update single register based on the mask */
int intel_scu_ipc_update_register(u16 addr, u8 data, u8 mask);

/*
* Indirect register read
* Can be used when SCCB(System Controller Configuration Block) register
* HRIM(Honor Restricted IPC Messages) is set (bit 23)
*/
int intel_scu_ipc_register_read(u32 addr, u32 *data);

/*
* Indirect register write
* Can be used when SCCB(System Controller Configuration Block) register
* HRIM(Honor Restricted IPC Messages) is set (bit 23)
*/
int intel_scu_ipc_register_write(u32 addr, u32 data);

/* Issue commands to the SCU with or without data */
int intel_scu_ipc_simple_command(int cmd, int sub);
int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen,
u32 *out, int outlen);
/* I2C control api */
int intel_scu_ipc_i2c_cntrl(u32 addr, u32 *data);

/* Update FW version */
int intel_scu_ipc_fw_update(u8 *buffer, u32 length);

#endif
10 changes: 10 additions & 0 deletions drivers/platform/x86/Kconfig
Original file line number Diff line number Diff line change
@@ -390,6 +390,7 @@ config EEEPC_WMI
depends on ACPI_WMI
depends on INPUT
depends on EXPERIMENTAL
depends on BACKLIGHT_CLASS_DEVICE
select INPUT_SPARSEKMAP
---help---
Say Y here if you want to support WMI-based hotkeys on Eee PC laptops.
@@ -527,4 +528,13 @@ config ACPI_CMPC
keys as input device, backlight device, tablet and accelerometer
devices.

config INTEL_SCU_IPC
bool "Intel SCU IPC Support"
depends on X86_MRST
default y
---help---
IPC is used to bridge the communications between kernel and SCU on
some embedded Intel x86 platforms. This is not needed for PC-type
machines.

endif # X86_PLATFORM_DEVICES
1 change: 1 addition & 0 deletions drivers/platform/x86/Makefile
Original file line number Diff line number Diff line change
@@ -25,3 +25,4 @@ obj-$(CONFIG_ACPI_ASUS) += asus_acpi.o
obj-$(CONFIG_TOPSTAR_LAPTOP) += topstar-laptop.o
obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o
obj-$(CONFIG_TOSHIBA_BT_RFKILL) += toshiba_bluetooth.o
obj-$(CONFIG_INTEL_SCU_IPC) += intel_scu_ipc.o
Loading

0 comments on commit 27a3353

Please sign in to comment.