1
0
Fork 0
Commit Graph

1336 Commits (df2d5ae4995b3fb9392b6089b9623d20b6c3a542)

Author SHA1 Message Date
Carlos Alberto Lopez Perez ad20c73b05 classmate-laptop: always call input_sync() after input_report_switch()
Due to commit cdda911c34 evdev only
becomes readable when the buffer contains an EV_SYN/SYN_REPORT event.

So in order to read the tablet sensor data as it happens we need to
ensure that we always call input_sync() after input_report_switch()

Signed-off-by: Carlos Alberto Lopez Perez <clopez@igalia.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-17 17:34:42 -04:00
Manoj Iyer a4f46bb9fa thinkpad-acpi: recognize latest V-Series using DMI_BIOS_VENDOR
In the latest V-series bios DMI_PRODUCT_VERSION does not contain
the string Lenovo or Thinkpad, but is set to the model number, this
causes the thinkpad_acpi module to fail to load. Recognize laptop
as Lenovo using DMI_BIOS_VENDOR instead, which is set to Lenovo.

Test on V490u
=============
== After the patch ==

[ 1350.295757] thinkpad_acpi: ThinkPad ACPI Extras v0.24
[ 1350.295760] thinkpad_acpi: http://ibm-acpi.sf.net/
[ 1350.295761] thinkpad_acpi: ThinkPad BIOS H7ET21WW (1.00 ), EC unknown
[ 1350.295763] thinkpad_acpi: Lenovo LENOVO, model LV5DXXX
[ 1350.296086] thinkpad_acpi: detected a 8-level brightness capable ThinkPad
[ 1350.296694] thinkpad_acpi: radio switch found; radios are enabled
[ 1350.296703] thinkpad_acpi: possible tablet mode switch found; ThinkPad in laptop mode
[ 1350.306466] thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is unblocked
[ 1350.307082] Registered led device: tpacpi::thinklight
[ 1350.307215] Registered led device: tpacpi::power
[ 1350.307255] Registered led device: tpacpi::standby
[ 1350.307294] Registered led device: tpacpi::thinkvantage
[ 1350.308160] thinkpad_acpi: Standard ACPI backlight interface available, not loading native one
[ 1350.308333] thinkpad_acpi: Console audio control enabled, mode: monitor (read only)
[ 1350.312287] input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input14

== Before the patch ==
sudo modprobe thinkpad_acpi
FATAL: Error inserting thinkpad_acpi (/lib/modules/3.2.0-27-generic/kernel/drivers/platform/x86/thinkpad_acpi.ko): No such device

Test on B485
=============
This patch was also test in a B485 where the thinkpad_acpi module does not
have any issues loading. But, I tested it to make sure this patch does not
break on already functioning models of Lenovo products.

[13486.746359] thinkpad_acpi: ThinkPad ACPI Extras v0.24
[13486.746364] thinkpad_acpi: http://ibm-acpi.sf.net/
[13486.746368] thinkpad_acpi: ThinkPad BIOS HJET15WW(1.01), EC unknown
[13486.746373] thinkpad_acpi: Lenovo Lenovo LB485, model 814TR01
[13486.747300] thinkpad_acpi: detected a 8-level brightness capable ThinkPad
[13486.752435] thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is unblocked
[13486.752883] Registered led device: tpacpi::thinklight
[13486.752915] thinkpad_acpi: Standard ACPI backlight interface available, not loading native one
[13486.753216] thinkpad_acpi: Console audio control enabled, mode: monitor (read only)
[13486.757147] input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input15

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-17 17:34:42 -04:00
AceLan Kao a2174ba29a dell-laptop: Fixed typo in touchpad LED quirk
Fixed the typo introduced from the below commit
5f1e88f dell-laptop: Add 6 machines to touchpad led quirk

Reported-by: Carlos Alberto Lopez Perez <clopez@igalia.com>
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-17 17:34:42 -04:00
Andreas Heider 76b487dd51 apple-gmux: Add display mux support
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-17 17:34:40 -04:00
Seth Forshee f94f0f103c apple-gmux: Fix kconfig dependencies
Fix the dependencies of apple-gmux to prevent it from being built-in
when one or more of its dependencies is built as a module. Otherwise it
can fail to build due to missing symbols.

v2: Add dependency on ACPI to fix build failure when ACPI=n

Reported-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-17 17:34:40 -04:00
AceLan Kao a50bd128f2 asus-wmi: record wlan status while controlled by userapp
If the user bit is set, that mean BIOS can't set and record the wlan
status, it will report the value read from id ASUS_WMI_DEVID_WLAN_LED
(0x00010012) while we query the wlan status by id ASUS_WMI_DEVID_WLAN
(0x00010011) through WMI.
So, we have to record wlan status in id ASUS_WMI_DEVID_WLAN_LED
(0x00010012) while setting the wlan status through WMI.
This is also the behavior that windows app will do.

Quote from ASUS application engineer
===
When you call WMIMethod(DSTS, 0x00010011) to get WLAN status, it may return

(1) 0x00050001 (On)
(2) 0x00050000 (Off)
(3) 0x00030001 (On)
(4) 0x00030000 (Off)
(5) 0x00000002 (Unknown)

(1), (2) means that the model has hardware GPIO for WLAN, you can call
WMIMethod(DEVS, 0x00010011, 1 or 0) to turn WLAN on/off.
(3), (4) means that the model doesn’t have hardware GPIO, you need to use
API or driver library to turn WLAN on/off, and call
WMIMethod(DEVS, 0x00010012, 1 or 0) to set WLAN LED status.
After you set WLAN LED status, you can see the WLAN status is changed with
WMIMethod(DSTS, 0x00010011). Because the status is recorded lastly
(ex: Windows), you can use it for synchronization.
(5) means that the model doesn’t have WLAN device.

WLAN is the ONLY special case with upper rule.

For other device, like Bluetooth, you just need use
WMIMethod(DSTS, 0x00010013) to get, and WMIMethod(DEVS, 0x00010013, 1 or 0)
to set.
===

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-17 17:34:39 -04:00
Matthew Garrett 9f6f955ae4 apple_gmux: Fix ACPI video unregister
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-17 17:34:39 -04:00
Matthew Garrett 96ff705638 apple_gmux: Add support for newer hardware
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-17 17:34:39 -04:00
Matthew Garrett 7e30ed6bdd gmux: Add generic write32 function
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-08-17 17:34:38 -04:00
Tejun Heo 41f63c5359 workqueue: use mod_delayed_work() instead of cancel + queue
Convert delayed_work users doing cancel_delayed_work() followed by
queue_delayed_work() to mod_delayed_work().

Most conversions are straight-forward.  Ones worth mentioning are,

* drivers/edac/edac_mc.c: edac_mc_workq_setup() converted to always
  use mod_delayed_work() and cancel loop in
  edac_mc_reset_delay_period() is dropped.

* drivers/platform/x86/thinkpad_acpi.c: No need to remember whether
  watchdog is active or not.  @fan_watchdog_active and related code
  dropped.

* drivers/power/charger-manager.c: Seemingly a lot of
  delayed_work_pending() abuse going on here.
  [delayed_]work_pending() are unsynchronized and racy when used like
  this.  I converted one instance in fullbatt_handler().  Please
  conver the rest so that it invokes workqueue APIs for the intended
  target state rather than trying to game work item pending state
  transitions.  e.g. if timer should be modified - call
  mod_delayed_work(), canceled - call cancel_delayed_work[_sync]().

* drivers/thermal/thermal_sys.c: thermal_zone_device_set_polling()
  simplified.  Note that round_jiffies() calls in this function are
  meaningless.  round_jiffies() work on absolute jiffies not delta
  delay used by delayed_work.

v2: Tomi pointed out that __cancel_delayed_work() users can't be
    safely converted to mod_delayed_work().  They could be calling it
    from irq context and if that happens while delayed_work_timer_fn()
    is running, it could deadlock.  __cancel_delayed_work() users are
    dropped.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Acked-by: David Howells <dhowells@redhat.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Doug Thompson <dougthompson@xmission.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Roland Dreier <roland@kernel.org>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Len Brown <len.brown@intel.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
2012-08-13 16:27:37 -07:00
Rafael J. Wysocki 3567a4e2c5 platform / x86 / PM: Fix unused function warnings for CONFIG_PM_SLEEP
According to compiler warnings, quite some suspend/resume functions
in platform x86 drivers are not used for CONFIG_PM_SLEEP unset, so
add #ifdefs to prevent them from being built in that case.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-08-10 14:29:43 +02:00
Andres Salomon 99ecb01cdf Platform: OLPC: move global variables into priv struct
Populate olpc_ec_priv with variables that were previously global.  This
makes things a tad bit clearer, IMO.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Paul Fox <pgf@laptop.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
2012-07-31 23:27:31 -04:00
Andres Salomon 6cca83d498 Platform: OLPC: move debugfs support from x86 EC driver
There's nothing about the debugfs interface for the EC driver that is
architecture-specific, so move it into the arch-independent driver.

The code is mostly unchanged with the exception of renamed variables, coding
style changes, and API updates.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Paul Fox <pgf@laptop.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
2012-07-31 23:27:31 -04:00
Andres Salomon 85f90cf6ca x86: OLPC: switch over to using new EC driver on x86
This uses the new EC driver framework in drivers/platform/olpc.  The
XO-1 and XO-1.5-specific code is still in arch/x86, but the generic stuff
(including a new workqueue; no more running EC commands with IRQs disabled!)
can be shared with other architectures.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Paul Fox <pgf@laptop.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
2012-07-31 23:27:30 -04:00
Andres Salomon d278b7a2f9 Platform: OLPC: add a suspended flag to the EC driver
A problem we've noticed on XO-1.75 is when we suspend in the middle of
an EC command.  Don't allow that.

In the process, create a private object for the generic EC driver to use;
we have a framework for passing around a struct, use that rather than a
proliferation of global variables.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Paul Fox <pgf@laptop.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
2012-07-31 23:27:30 -04:00
Andres Salomon ac2504151f Platform: OLPC: turn EC driver into a platform_driver
The 1.75-based OLPC EC driver already does this; let's do it for all EC
drivers.  This gives us nice suspend/resume hooks, amongst other things.

We want to run the EC's suspend hooks later than other drivers (which may
be setting wakeup masks or be running EC commands).  We also want to run
the EC's resume hooks earlier than other drivers (which may want to run EC
commands).

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Paul Fox <pgf@laptop.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
2012-07-31 23:27:30 -04:00
Andres Salomon 3d26c20bae Platform: OLPC: allow EC cmd to be overridden, and create a workqueue to call it
This provides a new API allows different OLPC architectures to override the
EC driver.  x86 and ARM OLPC machines use completely different EC backends.

The olpc_ec_cmd is synchronous, and waits for the workqueue to send the
command to the EC.  Multiple callers can run olpc_ec_cmd() at once, and
they will by serialized and sleep while only one executes on the EC at a time.

We don't provide an unregister function, as that doesn't make sense within
the context of OLPC machines - there's only ever 1 EC, it's critical to
functionality, and it certainly not hotpluggable.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Paul Fox <pgf@laptop.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
2012-07-31 23:27:30 -04:00
Andres Salomon 3bf9428f22 drivers: OLPC: update various drivers to include olpc-ec.h
Switch over to using olpc-ec.h in multiple steps, so as not to break builds.
This covers every driver that calls olpc_ec_cmd().

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Paul Fox <pgf@laptop.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
2012-07-31 23:27:29 -04:00
Andres Salomon 392a325c43 Platform: OLPC: add a stub to drivers/platform/ for the OLPC EC driver
The OLPC EC driver has outgrown arch/x86/platform/.  It's time to both
share common code amongst different architectures, as well as move it out
of arch/x86/.  The XO-1.75 is ARM-based, and the EC driver shares a lot of
code with the x86 code.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Paul Fox <pgf@laptop.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
2012-07-31 23:27:29 -04:00
Linus Torvalds 7d3d09b01a Merge branch 'linux-next' of git://cavan.codon.org.uk/platform-drivers-x86
Pull x86 platform driver updates from Matthew Garrett:
 "Nothing overly dramatic here - improved support for the Classmate,
  some random small fixes and a rework of backlight management to deal
  with some of the more awkward cases."

* 'linux-next' of git://cavan.codon.org.uk/platform-drivers-x86:
  thinkpad_acpi: Free hotkey_keycode_map after unregistering tpacpi_inputdev
  thinkpad_acpi: Fix a memory leak during module exit
  thinkpad_acpi: Flush the workqueue before freeing tpacpi_leds
  dell-laptop: Add 6 machines to touchpad led quirk
  ACER: Fix Smatch double-free issue
  ACER: Fix up sparse warning
  asus-nb-wmi: add some video toggle keys
  asus-nb-wmi: add wapf quirk for ASUS machines
  classmate-laptop: Fix extra keys hardware id.
  classmate-laptop: Add support for Classmate V4 accelerometer.
  asus-wmi: enable resume on lid open
  asus-wmi: control backlight power through WMI, not ACPI
  samsung-laptop: support R40/R41
  acpi/video_detect: blacklist samsung x360
  samsung-laptop: X360 ACPI backlight device is broken
  drivers-platform-x86: use acpi_video_dmi_promote_vendor()
  acpi: add a way to promote/demote vendor backlight drivers
  ACER: Add support for accelerometer sensor
  asus-wmi: use ASUS_WMI_METHODID_DSTS2 as default DSTS ID.
2012-07-30 11:54:53 -07:00
Li Dongyang 00d39597e8 thinkpad_acpi: Free hotkey_keycode_map after unregistering tpacpi_inputdev
We should free hotkey_keycode_map after unregistering tpacpi_inputdev, to aviod
use after free like this:

[   99.408388] =============================================================================
[   99.408393] BUG kmalloc-64 (Not tainted): Poison overwritten
[   99.408394] -----------------------------------------------------------------------------
[   99.408394]
[   99.408398] INFO: 0xf2751962-0xf2751995. First byte 0x98 instead of 0x6b
[   99.408402] INFO: Allocated in 0xfdc88c28 age=79 cpu=0 pid=1329
[   99.408407]  __slab_alloc.isra.50.constprop.56+0x49f/0x533
[   99.408410]  kmem_cache_alloc_trace+0x10d/0x140
[   99.408412]  0xfdc88c28
[   99.408414]  0xfdc898cc
[   99.408417]  do_one_initcall+0x112/0x160
[   99.408420]  sys_init_module+0xe6d/0x1bc0
[   99.408422]  sysenter_do_call+0x12/0x28
[   99.408427] INFO: Freed in hotkey_exit+0x50/0xb0 [thinkpad_acpi] age=14 cpu=1 pid=1333
[   99.408429]  __slab_free+0x3d/0x30b
[   99.408431]  kfree+0x129/0x140
[   99.408435]  hotkey_exit+0x50/0xb0 [thinkpad_acpi]
[   99.408438]  ibm_exit+0xe3/0x1a0 [thinkpad_acpi]
[   99.408441]  thinkpad_acpi_module_exit+0x35/0x208 [thinkpad_acpi]
[   99.408443]  sys_delete_module+0x11f/0x280
[   99.408445]  sysenter_do_call+0x12/0x28
[   99.408447] INFO: Slab 0xf4d5ea20 objects=17 used=17 fp=0x  (null) flags=0x40000080
[   99.408449] INFO: Object 0xf2751960 @offset=2400 fp=0xf2751780
[   99.408449]
[   99.408452] Bytes b4 f2751950: 64 02 00 00 ae ce fe ff 5a 5a 5a 5a 5a 5a 5a 5a  d.......ZZZZZZZZ
[   99.408454] Object f2751960: 6b 6b 98 00 ec 00 8e 00 ee 00 6b 6b e3 00 bf 00 kk........kk....
[   99.408456] Object f2751970: c2 00 6b 6b 6b 6b cd 00 6b 6b 6b 6b 6b 6b e1 00 ..kkkk..kkkkkk..
[   99.408458] Object f2751980: e0 00 e4 00 6b 6b 74 01 73 00 72 00 71 00 94 00 ....kkt.s.r.q...
[   99.408460] Object f2751990: 6b 6b 6b 6b f8 00 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 kkkk..kkkkkkkkk.
[   99.408462] Redzone f27519a0: bb bb bb bb ....

Signed-off-by: Li Dongyang <Jerry87905@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:28:57 -04:00
Li Dongyang d2be15bdda thinkpad_acpi: Fix a memory leak during module exit
We should free the thinkpad_id.nummodel_str during exit as it's allocated
in get_thinkpad_module_data().

Signed-off-by: Li Dongyang <Jerry87905@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:28:56 -04:00
Li Dongyang e03e389da5 thinkpad_acpi: Flush the workqueue before freeing tpacpi_leds
We init work_struct within tpacpi_leds, and we should free tpacpi_leds after
the workqueue is empty, in case of the work_struct is referenced after free.

This script could trigger the OOPS:

#!/bin/sh

while true
do
    modprobe -r thinkpad_acpi
    modprobe thinkpad_acpi
done

And the OOPS looks like this:

[   73.863557] BUG: unable to handle kernel paging request at 45440000
[   73.863925] IP: [<c1051d65>] process_one_work+0x25/0x3b0
[   73.864749] *pde = 00000000
[   73.865571] Oops: 0000 [#1] PREEMPT SMP
[   73.866443] Modules linked in: thinkpad_acpi(-) nvram netconsole configfs
aes_i586 cryptd aes_generic joydev btusb bluetooth arc4 snd_hda_codec_analog
iwl4965 uhci_hcd pcmcia microcode iwlegacy mac80211 cfg80211 firewire_ohci
firewire_core kvm_intel kvm snd_hda_intel acpi_cpufreq mperf ehci_hcd yenta_socket
pcmcia_rsrc crc_itu_t sr_mod snd_hda_codec processor pcmcia_core i2c_i801 usbcore
lpc_ich cdrom serio_raw psmouse coretemp rfkill e1000e snd_pcm snd_page_alloc
snd_hwdep snd_timer snd pcspkr evdev ac battery thermal soundcore usb_common
intel_agp intel_gtt tp_smapi(O) thinkpad_ec(O) ext4 crc16 jbd2 mbcache sd_mod
ata_piix ahci libahci libata scsi_mod nouveau button video mxm_wmi wmi
i2c_algo_bit drm_kms_helper ttm drm agpgart i2c_core [last unloaded: nvram]
 [   73.866676]
 [   73.866676] Pid: 62, comm: kworker/u:4 Tainted: G           O 3.5.0-1-ARCH
 #1 LENOVO 7662CTO/7662CTO
 [   73.866676] EIP: 0060:[<c1051d65>] EFLAGS: 00010002 CPU: 1
 [   73.866676] EIP is at process_one_work+0x25/0x3b0
 [   73.866676] EAX: 45440065 EBX: f5545090 ECX: 00000088 EDX: 45440000
 [   73.866676] ESI: f568ff40 EDI: c164dd40 EBP: f5705f98 ESP: f5705f68
 [   73.866676]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
 [   73.866676] CR0: 8005003b CR2: 45440000 CR3: 357ed000 CR4: 000007d0
 [   73.866676] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
 [   73.866676] DR6: ffff0ff0 DR7: 00000400
 [   73.866676] Process kworker/u:4 (pid: 62, ti=f5704000 task=f5700540 task.ti=f5704000)
 [   73.866676] Stack:
 [   73.866676]  f56fbf24 00000001 f5705f78 c10683e0 c1294950 00000000 00000000 f568ff40
 [   73.866676]  00000000 f568ff40 f568ff50 c164dd40 f5705fb8 c1052589 c1060c7e c15b9300
 [   73.866676]  c164dd40 00000000 f568ff40 c1052490 f5705fe4 c10570b2 00000000 f568ff40
 [   73.866676] Call Trace:
 [   73.866676]  [<c10683e0>] ? default_wake_function+0x10/0x20
 [   73.866676]  [<c1294950>] ? dev_get_drvdata+0x20/0x20
 [   73.866676]  [<c1052589>] worker_thread+0xf9/0x280
 [   73.866676]  [<c1060c7e>] ? complete+0x4e/0x60
 [   73.866676]  [<c1052490>] ? manage_workers.isra.24+0x1c0/0x1c0
 [   73.866676]  [<c10570b2>] kthread+0x72/0x80
 [   73.866676]  [<c1057040>] ? kthread_freezable_should_stop+0x50/0x50
 [   73.866676]  [<c13c20fe>] kernel_thread_helper+0x6/0x10
 [   73.866676] Code: bc 27 00 00 00 00 55 89 e5 57 56 53 83 ec 24 3e 8d 74 26
 00 89 c6 8b 02 89 d3 c7 45 f0 00 00 00 00 89 c2 30 d2 a8 04 0f 44 55 f0 <8b> 02 89 55 f0 89 da c1 ea
 0a 89 45 ec 89 d8 8b 4d ec c1 e8 04
 [   73.866676] EIP: [<c1051d65>] process_one_work+0x25/0x3b0 SS:ESP 0068:f5705f68
 [   73.866676] CR2: 0000000045440000
 [   73.866676] ---[ end trace 4d8a1887edca08c5 ]---
 [   73.866676] note: kworker/u:4[62] exited with preempt_count 1

Signed-off-by: Li Dongyang <Jerry87905@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:28:56 -04:00
AceLan Kao 5f1e88f497 dell-laptop: Add 6 machines to touchpad led quirk
Add the following machines into quirk,
Isnpiron 5420, Isnpiron 5520, Isnpiron 5720,
Isnpiron 7420, Isnpiron 7520, Isnpiron 7720

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:28:55 -04:00
Marek Vasut 1bfaf1d5bc ACER: Fix Smatch double-free issue
The patch 6ae3a0876185: "ACER: Add support for accelerometer sensor"
from Jun 1, 2012, leads to the following Smatch warning:
drivers/platform/x86/acer-wmi.c:1886 acer_wmi_accel_destroy()
         error: don't call input_free_device() after input_unregister_device()

drivers/platform/x86/acer-wmi.c
  1883  static void acer_wmi_accel_destroy(void)
  1884  {
  1885          input_unregister_device(acer_wmi_accel_dev);
  1886          input_free_device(acer_wmi_accel_dev);
  1887  }

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Fengguang Wu <wfg@linux.intel.com>
Cc: joeyli <jlee@suse.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:28:55 -04:00
Marek Vasut 24237c43aa ACER: Fix up sparse warning
drivers/platform/x86/acer-wmi.c:1836:18: sparse: Using plain integer as NULL pointer

drivers/platform/x86/acer-wmi.c:1836:
  1833
  1834          BUG_ON(!name || !ah);
  1835
> 1836          handle = 0;
  1837          status = acpi_get_devices(prop, acer_wmi_get_handle_cb,
  1838                                          (void *)name, &handle);
  1839

Reported-by: Fengguang Wu <wfg@linux.intel.com>

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Fengguang Wu <wfg@linux.intel.com>
Cc: joeyli <jlee@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:28:54 -04:00
AceLan Kao 3766054fff asus-nb-wmi: add some video toggle keys
There are some new video switch keys that used by newer machines.
0xA0 - SDSP HDMI only
0xA1 - SDSP LCD + HDMI
0xA2 - SDSP CRT + HDMI
0xA3 - SDSP TV + HDMI
But in Linux, there is no suitable userspace application to handle this,
so, mapping them all to KEY_SWITCHVIDEOMODE.

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:28:54 -04:00
AceLan Kao d2044c5a3a asus-nb-wmi: add wapf quirk for ASUS machines
The BIOS of these machines will try to enable/disable wifi/bt in
their own sqeuence. It won't read the enable/disable parameter
in WMI command, but just iterates the wifi/bt's status described below
1st. enable wifi, enable bt
2nd. disable wifi, enable bt
3rd. enable wifi, disable bt
4th. disable wifi, disable bt
That will totally mess up the rfkill status, since we will try to read
wifi and bt's status and reset it again while booting up.

To avoid this, these machines should set the wapf value to 4,
that will let software totally control the wifi/bt's status and
BIOS will do nothing instead of sending out the 0x88(KEY_RFKILL) event
instead of 0x5e(wifi enable), 0x5f(wifi diable), 0x7d(bt enable), and
0x7e(bt disable) through WMI.

With this patch[1], it will handle the KEY_RFKILL event correctly and
will block/unblock wifi and bt together.

1. https://lkml.org/lkml/2012/5/21/75

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:28:53 -04:00
Miguel Gómez 0ece8d515c classmate-laptop: Fix extra keys hardware id.
Since ACPI devices ids were changed to use always upper-case letters, the ACPI
id of the extra keys (FNBT0000) was not maching the one defined in the driver
(FnBT0000), causing the extra keys not to work.

The patch replaces the driver id with the one reported by ACPI, fixing the
problem.

Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:28:53 -04:00
Miguel Gómez 7125587df4 classmate-laptop: Add support for Classmate V4 accelerometer.
Classmate V4 laptop includes a new accelerometer that can't be handled by
previous driver. This patch adds a new driver to handle it.

[mjg: Fixed up the driver pm stuff]

Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:28:27 -04:00
AceLan Kao c0b91b6d52 asus-wmi: enable resume on lid open
According to the ASUS WMI spec., to enable resume on lid open should
use the device ID(0x00120032), but it doesn't work indeed.

After discussing with ASUS' BIOS engineer, they say wake on lid open
doesn't have a uniq device ID(0x00120032) in the BIOS. It shares the same
device ID with deep S3(0x00120031), and the deep S3(resume on lid open)
is disable by default.

Adding this option in asus wmi sysfs
   /sys/devices/platform/<platform>/lid_resume
so that userspace apps can enable/disable this feature by themselves.

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:11:49 -04:00
AceLan Kao 272c77d556 asus-wmi: control backlight power through WMI, not ACPI
BugLink: https://bugs.launchpad.net/bugs/1000146

Some h/w that can adjust screen brightness through ACPI functions, but
can't turn on/off the backlight power correctly. So, we list those h/w in
quirks and try to turn on/off the backlight power through WMI.
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:11:49 -04:00
Corentin Chary e052067df0 samsung-laptop: support R40/R41
> Chassis Information
> 	Manufacturer: SAMSUNG ELECTRONICS CO., LTD.
>	Type: Other

Type should be "Notebook", "Laptop", .. not "Other".

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:11:48 -04:00
Corentin Chary 09d5677cf1 samsung-laptop: X360 ACPI backlight device is broken
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:11:48 -04:00
Corentin Chary a60b21763c drivers-platform-x86: use acpi_video_dmi_promote_vendor()
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-07-28 00:11:48 -04:00
Marek Vasut 1eb3fe1d3b ACER: Add support for accelerometer sensor
This device is present on Iconia Tab W500.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: joeyli <jlee@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-07-28 00:06:02 -04:00
Alex Hung 63a78bb105 asus-wmi: use ASUS_WMI_METHODID_DSTS2 as default DSTS ID.
According to responses from the BIOS team, ASUS_WMI_METHODID_DSTS2
(0x53545344) will be used as future DSTS ID. In addition, calling
asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL) returns
ASUS_WMI_UNSUPPORTED_METHOD in new ASUS laptop PCs. This patch fixes
no DSTS ID will be assigned in this case.

Signed-off-by: Alex Hung <alex.hung@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: stable@kernel.org
2012-07-28 00:06:02 -04:00
Linus Torvalds 476525004a Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull ACPI & power management update from Len Brown:
 "Re-write of the turbostat tool.
     lower overhead was necessary for measuring very large system when
     they are very idle.

  IVB support in intel_idle
     It's what I run on my IVB, others should be able to also:-)

  ACPICA core update
     We have found some bugs due to divergence between Linux and the
     upstream ACPICA base.  Most of these patches are to reduce that
     divergence to reduce the risk of future bugs.

  Some cpuidle updates, mostly for non-Intel
     More will be coming, as they depend on this part.

  Some thermal management changes needed by non-ACPI systems.

  Some _OST (OS Status Indication) updates for hot ACPI hot-plug."

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (51 commits)
  Thermal: Documentation update
  Thermal: Add Hysteresis attributes
  Thermal: Make Thermal trip points writeable
  ACPI/AC: prevent OOPS on some boxes due to missing check power_supply_register() return value check
  tools/power: turbostat: fix large c1% issue
  tools/power: turbostat v2 - re-write for efficiency
  ACPICA: Update to version 20120711
  ACPICA: AcpiSrc: Fix some translation issues for Linux conversion
  ACPICA: Update header files copyrights to 2012
  ACPICA: Add new ACPI table load/unload external interfaces
  ACPICA: Split file: tbxface.c -> tbxfload.c
  ACPICA: Add PCC address space to space ID decode function
  ACPICA: Fix some comment fields
  ACPICA: Table manager: deploy new firmware error/warning interfaces
  ACPICA: Add new interfaces for BIOS(firmware) errors and warnings
  ACPICA: Split exception code utilities to a new file, utexcep.c
  ACPI: acpi_pad: tune round_robin_time
  ACPICA: Update to version 20120620
  ACPICA: Add support for implicit notify on multiple devices
  ACPICA: Update comments; no functional change
  ...
2012-07-26 14:28:55 -07:00
Durgadoss R c56f5c0342 Thermal: Make Thermal trip points writeable
Some of the thermal drivers using the Generic Thermal Framework
require (all/some) trip points to be writeable. This patch makes
the trip point temperatures writeable on a per-trip point basis,
and modifies the required function call in thermal.c. This patch
also updates the Documentation to reflect the new change.

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2012-07-24 23:17:20 -04:00
Linus Torvalds 7100e505b7 Power management updates for 3.6
* ACPI conversion to PM handling based on struct dev_pm_ops.
 * Conversion of a number of platform drivers to PM handling based on struct
   dev_pm_ops and removal of empty legacy PM callbacks from a couple of PCI
   drivers.
 * Suspend-to-both for in-kernel hibernation from Bojan Smojver.
 * cpuidle fixes and cleanups from ShuoX Liu, Daniel Lezcano and Preeti U Murthy.
 * cpufreq bug fixes from Jonghwa Lee and Stephen Boyd.
 * Suspend and hibernate fixes from Srivatsa S. Bhat and Colin Cross.
 * Generic PM domains framework updates.
 * RTC CMOS wakeup signaling update from Paul Fox.
 * sparse warnings fixes from Sachin Kamat.
 * Build warnings fixes for the generic PM domains framework and PM sysfs code.
 * sysfs switch for printing device suspend times from Sameer Nanda.
 * Documentation fix from Oskar Schirmer.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJQDF5eAAoJEKhOf7ml8uNsEaAP/2wg4faoOGob5A0/7tLqG3Cw
 xnTmGsfL7wG07Q8ykCL1BSlBb1VeJz8L6LTmUpaABI4M//oIBlcYQKyCE0Tat1AO
 9bJXFzK7qcHMhkTz6d6LDqtVzR3NGM3ypjZqj8aEXBov07LMR1AXvgNwXXhv25zM
 0unwrh1XNinBN3n+oaktpWk1YHUjsa5IMU+2tQJrocuHXcgK30vGXZVrZ4g9w1c2
 eS+ED1oKUqOYtFzIUX+aCtaDDheGaPlugk/GOtIB7Sae0s0vMlxH/T5ncB4SxRC+
 v3s4OykqQc5Dc8+0bNlBH7ykSVNB0PoQiyKDY67CxtH+q1xQSc9/f3XJqnGMaVDE
 17eZUZsL4qSyzRuCbPCGAgwBHmx3qNCMu1i1BcmnSxU+ikPUeCR7mYOP0mRThwPH
 OSfs+c/vZ+Ow6CwVE4UFrbm9Jve7ADnCrlZzT2m6XjhHGyjKP7SJlzP9TPsZ0LRk
 oxgQDYHmxbo50t9tBCz5L4ZTMKkDp28e78x84/CteP85srcW3GqDxrPyp2uzJu5O
 tvIEBvVlc4ucq8sG83RkugQwrG/2cQwG2HO9ERAwq01HHA1BYsuU3A961Jqf5CZo
 nFRSnByvVj/imPf47OWpDPAbVEs7jxufJuLEbPwGj1MkttTGDBIRu3zldXt2S6kP
 Q4qYU6fDaQQHFc90pqxQ
 =vC4/
 -----END PGP SIGNATURE-----

Merge tag 'pm-for-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management updates from Rafael Wysocki:

 - ACPI conversion to PM handling based on struct dev_pm_ops.
 - Conversion of a number of platform drivers to PM handling based on
   struct dev_pm_ops and removal of empty legacy PM callbacks from a
   couple of PCI drivers.
 - Suspend-to-both for in-kernel hibernation from Bojan Smojver.
 - cpuidle fixes and cleanups from ShuoX Liu, Daniel Lezcano and Preeti
   Murthy.
 - cpufreq bug fixes from Jonghwa Lee and Stephen Boyd.
 - Suspend and hibernate fixes from Srivatsa Bhat and Colin Cross.
 - Generic PM domains framework updates.
 - RTC CMOS wakeup signaling update from Paul Fox.
 - sparse warnings fixes from Sachin Kamat.
 - Build warnings fixes for the generic PM domains framework and PM
   sysfs code.
 - sysfs switch for printing device suspend times from Sameer Nanda.
 - Documentation fix from Oskar Schirmer.

* tag 'pm-for-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (70 commits)
  cpufreq: Fix sysfs deadlock with concurrent hotplug/frequency switch
  EXYNOS: bugfix on retrieving old_index from freqs.old
  PM / Sleep: call early resume handlers when suspend_noirq fails
  PM / QoS: Use NULL pointer instead of plain integer in qos.c
  PM / QoS: Use NULL pointer instead of plain integer in pm_qos.h
  PM / Sleep: Require CAP_BLOCK_SUSPEND to use wake_lock/wake_unlock
  PM / Sleep: Add missing static storage class specifiers in main.c
  cpuilde / ACPI: remove time from acpi_processor_cx structure
  cpuidle / ACPI: remove usage from acpi_processor_cx structure
  cpuidle / ACPI : remove latency_ticks from acpi_processor_cx structure
  rtc-cmos: report wakeups from interrupt handler
  PM / Sleep: Fix build warning in sysfs.c for CONFIG_PM_SLEEP unset
  PM / Domains: Fix build warning for CONFIG_PM_RUNTIME unset
  olpc-xo15-sci: Use struct dev_pm_ops for power management
  PM / Domains: Replace plain integer with NULL pointer in domain.c file
  PM / Domains: Add missing static storage class specifier in domain.c file
  PM / crypto / ux500: Use struct dev_pm_ops for power management
  PM / IPMI: Remove empty legacy PCI PM callbacks
  tpm_nsc: Use struct dev_pm_ops for power management
  tpm_tis: Use struct dev_pm_ops for power management
  ...
2012-07-22 13:36:52 -07:00
Rafael J. Wysocki bfaa07bc32 Merge branch 'pm-drivers'
* pm-drivers:
  rtc-cmos: report wakeups from interrupt handler
  PM / crypto / ux500: Use struct dev_pm_ops for power management
  PM / IPMI: Remove empty legacy PCI PM callbacks
  tpm_nsc: Use struct dev_pm_ops for power management
  tpm_tis: Use struct dev_pm_ops for power management
  tpm_atmel: Use struct dev_pm_ops for power management
  PM / TPM: Drop unused pm_message_t argument from tpm_pm_suspend()
  omap-rng: Use struct dev_pm_ops for power management
  mg_disk: Use struct dev_pm_ops for power management
  msi-laptop: Use struct dev_pm_ops for power management
  hdaps: Use struct dev_pm_ops for power management
  sonypi: Use struct dev_pm_ops for power management
  intel_mid_thermal: Use struct dev_pm_ops for power management
  acer-wmi: Use struct dev_pm_ops for power management
  intel_ips: Remove empty legacy PM callbacks
  thinkpad_acpi: Use struct dev_pm_ops instead of legacy PM routines
  thinkpad_acpi: Drop pm_message_t arguments from suspend routines
2012-07-19 00:03:42 +02:00
Rafael J. Wysocki 9033132ddf msi-laptop: Use struct dev_pm_ops for power management
Make the msi-laptop driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct platform_driver.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Lee, Chun-Yi <jlee@suse.com>
2012-07-06 19:06:19 +02:00
Rafael J. Wysocki e25d5c11ee hdaps: Use struct dev_pm_ops for power management
Make the HDAPS driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct platform_driver.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-07-03 18:34:27 +02:00
Rafael J. Wysocki 8ff847fc21 intel_mid_thermal: Use struct dev_pm_ops for power management
Make the intel_mid_thermal driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct platform_driver.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: Durgadoss R <durgadoss.r@intel.com>
2012-07-01 13:31:14 +02:00
Rafael J. Wysocki 3c33be0b0d acer-wmi: Use struct dev_pm_ops for power management
Make the acer-wmi driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct platform_driver.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Lee, Chun-Yi <jlee@suse.com>
Acked-by: Matthew Garrett <mjg@redhat.com>
2012-07-01 13:31:14 +02:00
Rafael J. Wysocki 818e148606 intel_ips: Remove empty legacy PM callbacks
The legacy PM callbacks provided by the Intel IPS driver are
empty routines returning 0, so they can be safely dropped.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2012-07-01 13:31:13 +02:00
Rafael J. Wysocki 4959a781bc thinkpad_acpi: Use struct dev_pm_ops instead of legacy PM routines
Make the thinkpad_acpi driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct platform_driver.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: Matthew Garrett <mjg@redhat.com>
2012-07-01 13:31:13 +02:00
Rafael J. Wysocki fd3c3a424e thinkpad_acpi: Drop pm_message_t arguments from suspend routines
Multiple suspend routines in drivers/platform/x86/thinkpad_acpi.c
use take pm_message_t arguments that aren't used by any of them.
Make those routines take no arguments as that's what they should do.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: Matthew Garrett <mjg@redhat.com>
2012-07-01 13:31:13 +02:00
Rafael J. Wysocki d26c844bc1 fujitsu-tablet: Use struct dev_pm_ops for power management
Make the fujitsu-tablet driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct acpi_device_ops.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-07-01 13:31:05 +02:00
Rafael J. Wysocki 81bc495401 classmate-laptop: Use struct dev_pm_ops for power management
Make the classmate-laptop driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct acpi_device_ops.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
2012-07-01 13:31:05 +02:00
Rafael J. Wysocki 44cb98c48e xo15-ebook: Use struct dev_pm_ops for power management
Make the xo15-ebook driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct acpi_device_ops.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-07-01 13:31:05 +02:00
Rafael J. Wysocki d69239ae58 toshiba_bluetooth: Use struct dev_pm_ops for power management
Make the toshiba_bluetooth driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct acpi_device_ops.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: Vikram Dhillon <opensolarisdev@gmail.com>
2012-07-01 13:31:04 +02:00
Rafael J. Wysocki a737741962 panasonic-laptop: Use struct dev_pm_ops for power management
Make the panasonic-laptop driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct acpi_device_ops.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-07-01 13:31:04 +02:00
Rafael J. Wysocki bb6b98d6e4 sony-laptop: Use struct dev_pm_ops for power management
Make the sony-laptop driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct acpi_device_ops.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-07-01 13:31:04 +02:00
Rafael J. Wysocki 4ce05b4260 hp_accel: Use struct dev_pm_ops for power management
Make the hp_accel driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct acpi_device_ops.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: Éric Piel <eric.piel@tremplin-utc.net>
2012-07-01 13:31:02 +02:00
Rafael J. Wysocki 43d2fd3b9d toshiba_acpi: Use struct dev_pm_ops for power management
Make the toshiba_acpi driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct acpi_device_ops.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-07-01 13:31:02 +02:00
Rafael J. Wysocki 17621e11fd ACPI / PM: Drop pm_message_t argument from device suspend callback
None of the drivers implementing the ACPI device suspend callback
uses the pm_message_t argument of it, so this argument may be dropped
entirely from that callback.  This will simplify switching the ACPI
bus type to PM handling based on struct dev_pm_ops.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-07-01 13:30:58 +02:00
Takashi Iwai 88ca518b0b intel_ips: blacklist HP ProBook laptops
intel_ips driver spews the warning message
  "ME failed to update for more than 1s, likely hung"
at each second endlessly on HP ProBook laptops with IronLake.

As this has never worked, better to blacklist the driver for now.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-06-26 14:43:53 -04:00
Dan Carpenter 57f9616b79 ideapad: uninitialized data in ideapad_acpi_add()
We only initialize the high bits of "cfg".  It probably doesn't cause
a problem given that this is platform specific code and doesn't have to
worry about endianness etc.  But it's sort of messy.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-06-26 14:43:45 -04:00
Mattia Dongili a1071a5abf sony-laptop: correct find_snc_handle failure checks
Since bab7084c74, find_snc_handle
returns -EINVAL, not -1.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-06-26 14:43:39 -04:00
Dan Carpenter 56f4a9f76d sony-laptop: fix a couple signedness bugs
This needs to be signed to handle negative error codes.
Remove a redundant check, read_limits is always called with a valid
handle.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-06-26 14:43:33 -04:00
Dan Carpenter c7a2918373 sony-laptop: fix sony_nc_sysfs_store()
We made this an unsigned long and it causes a bug on 64 bit big endian
systems when we try to pass the value to sony_nc_int_call().

Also value has to be signed because validate() returns negative error
codes.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-06-26 14:43:27 -04:00
Mattia Dongili ca3c2c706d sony-laptop: input initialization should be done before SNC
SNC needs input devices so better have those ready before starting
handle events.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-06-26 14:43:21 -04:00
Mattia Dongili 014fc8fbec sony-laptop: add lid backlight support for handle 0x143
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-06-26 14:43:16 -04:00
Mattia Dongili 15aa5c7546 sony-laptop: store battery care limits on batteries
Some models offer the option to store the limits on the battery
(firmware?).

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-06-26 14:43:11 -04:00
Marco Chiappero bb384b5295 sony-laptop: notify userspace of GFX switch position changes
Some Vaios come with both integrated and discrete graphics, plus a
switch for choosing one of the two. When the switch position is changed,
a notification is generated.

Signed-off-by: Marco Chiappero <marco@absence.it>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-06-26 14:43:05 -04:00
Mattia Dongili 4069d6f86b sony-laptop: use an enum for SNC event types
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-06-26 14:42:59 -04:00
Borislav Petkov 4e791c98ae drivers/platform/x86/acerhdf.c: correct Boris' mail address
Correct mail address reference to a mail account which I actually read.

Signed-off-by: Borislav Petkov <bp@alien8.de>
Cc: Peter Feuerer <peter@piie.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-06-07 14:43:55 -07:00
Matthew Garrett a2f01a8993 apple-gmux: Fix up the suspend/resume patch
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-06-01 15:18:52 -04:00
Matthew Garrett a6c2390cd6 dell-laptop: Remove rfkill code
The interface just doesn't work on some machines, and Dell haven't been
able to tell us either which machines those are or what we should be
doing instead. This would be fine, except it results in userspace ending
up confused and general sadness. So let's just rip it out for now.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-06-01 12:46:56 -04:00
Matthew Garrett 53039f222c toshiba_acpi: Fix mis-merge
I managed to screw up the various backlight changes and ended up memsetting
the props structure after it had already been populated. This should fix it.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-06-01 11:02:36 -04:00
AceLan Kao d0e0a47779 dell-laptop: Add touchpad led support for Dell V3450
Add Dell Vostro 3450 quirk to support touchpad LED.

CC: Mariusz Fik <fisiu@opensuse.org>
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:37:19 -04:00
Lee, Chun-Yi 050eff39af acer-wmi: add 3 laptops to video backlight vendor mode quirk table
Acer Extensa 5235, TravelMate 5760 and Aspire 5750 laptop have broken _BCM
implemenation, the AML code wrote value to EC register but firmware didn't
change brighenss.

Fortunately, the brightness control works on those machines with vendor mode.
So, add this machine to video backlight vendor mode quirk table.

Reference: bko#36322
        https://bugzilla.kernel.org/show_bug.cgi?id=36322
Reference: bko#42833
        https://bugzilla.kernel.org/show_bug.cgi?id=42833
Reference: bko#42993
        https://bugzilla.kernel.org/show_bug.cgi?id=42993

Cc: Christopher M. Penalver <christopher.penalver@gmx.com>
Cc: Bence Lukacs <lukacs.bence1@gmail.com>
Cc: Joern Heissler <kernelbugs2012@joern.heissler.de>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:37:18 -04:00
Marco Chiappero 2b8791c4ff sony-laptop: add touchpad enable/disable function
This setting is stored in the EC and available across reboots.

[malattia@linux.it: group function specific variables in a struct, use
kstrtoul]

Signed-off-by: Marco Chiappero <marco@absence.it>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:35:06 -04:00
Marco Chiappero 2e52631127 sony-laptop: add missing Fn key combos for 0x100 handlers
Signed-off-by: Marco Chiappero <marco@absence.it>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:34:43 -04:00
Marco Chiappero a1e7363240 sony-laptop: add support for more WWAN modems
Also make the initialization function return a value for consistency
with all the other setup functions.

Signed-off-by: Marco Chiappero <marco@absence.it>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:34:42 -04:00
Marco Chiappero aa33924f35 sony-laptop: new keyboard backlight handle
Add support for handle 0x0143 (Vaio SA/SB/SC, CA/CB) and rework the code
to be hable to support different handles for the keyboard backlight
function.

[malattia@linux.it: group function specific variables in a struct]

Signed-off-by: Marco Chiappero <marco@absence.it>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:34:42 -04:00
Marco Chiappero 88bf170646 sony-laptop: add high speed battery charging function
Signed-off-by: Marco Chiappero <marco@absence.it>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:34:42 -04:00
Marco Chiappero 54535d083f sony-laptop: support automatic resume on lid open
A few models offer the chance to set whether to resume from S3 and/or S4
when opening the lid.

[malattia@linux.it: create three sysfs files for S3/4/5 rather than
using a single one accepting a bitmask. Support S5 since the DSDT
exports it. Use a struct to hold all the related values, caching of the
current status value rather than re-reading all the time in the sysfs
show function.]

Signed-off-by: Marco Chiappero <marco@absence.it>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:33:35 -04:00
Mattia Dongili bab7084c74 sony-laptop: adjust error handling in finding SNC handles
All handles must be greater than 0, also return more meaningful error
codes on invalid conditions.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:29:35 -04:00
Marco Chiappero 49f000adca sony-laptop: add thermal profiles support
[malattia@linux.it: support string based profiles names]

Signed-off-by: Marco Chiappero <marco@absence.it>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:29:35 -04:00
Marco Chiappero 967145a030 sony-laptop: support battery care functions
Allows limiting the maximum battery charge level to a selectable value
(100%, 80% and 50%).

[malattia@linux.it: group function specific variables in a struct, use
kstrtoul. Allow 0 to 100 values into sysfs files rounding to the actual
limit.]

Signed-off-by: Marco Chiappero <marco@absence.it>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:29:35 -04:00
Mattia Dongili ae188715ac sony-laptop: additional debug statements
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:29:34 -04:00
Marco Chiappero 5fe801a742 sony-laptop: improve SNC initialization and acpi notify callback code
Loop through the list of SNC handles and run the proper initialization
function for each of the known handles. Also return void in function
where we are not checking the return value anyway.
For notifications we also know which handle is linked to the event and
the code becomes simpler to read with a switch rather than using
convoluted ifs.

[malattia@linux.it: Code reworked to merge the initialization code
improvements and the notify callback changes. Modified the code paths to
allow easier error exit paths.  Also fixed some missing break statements
and spelling mistakes.]

Signed-off-by: Marco Chiappero <marco@absence.it>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:29:34 -04:00
Mattia Dongili 9e12337929 sony-laptop: use kstrtoul to parse sysfs values
This avoids surprises like echoing "enable" into a sysfs file and
finding that the feature was actually disabled.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:29:34 -04:00
Mattia Dongili ebcef1b0e4 sony-laptop: generalise ACPI calls into SNC functions
All calls into the SNC device methods have zero or one arguments and
return an integer or a buffer (some functions go as far as returning an
integer _or_ a buffer depending on the input parameter...).
This allows simplifying a couple of code paths and prepares the field
for other users of functions returning buffers.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:29:34 -04:00
Mattia Dongili 3398241b05 sony-laptop: fix return path when no ACPI buffer is allocated
The goto target location would still try to free a buffer that was
never allocated.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:29:34 -04:00
Marco Chiappero d6f15ed876 sony-laptop: use soft rfkill status stored in hw
The SNC device on recent Vaio laptops also stores the soft status and
leaves it available after reboot. Use it and always set the last soft
and hard status on module load.

[malattia@linux.it: patch taken from a largely modified sony-laptop.c,
smaller modifications to the original code to simplify it]

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:29:33 -04:00
Dan Carpenter dd258c00b9 hp-wmi: check for allocation failures
rfkill_alloc() returns NULL on failure.  Check for it, to make the
static checkers happy.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:29:33 -04:00
Akio Idehara 121b7b0d29 toshiba_acpi: Add support for transflective LCD
Some Toshiba laptops have the transflective LCD and toshset
can control its backlight state.  I brought this feature to the
mainline.  To support transflective LCD, it's implemented by
adding an extra level to the backlight and having 0 change to
transflective mode.  It was tested on a Toshiba Portege R500.

Signed-off-by: Akio Idehara <zbe64533@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:26:39 -04:00
Seth Forshee 62cce75266 toshiba_acpi: Only register backlight device when interface is read/write
Currently the backlight device is registered unconditionally, but many
(probably most) Toshibas either don't support HCI_LCD_BRIGHTNESS or only
support reading from it. This patch adds a test of HCI_LCD_BRIGHTNESS
during initialization and only registers the backlight device if this
interface supports both reads and writes.

Cc: Akio Idehara <zbe64533@gmail.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:26:04 -04:00
Ike Panhc 20a769c1c6 ideapad: generate valid key event only
Otherwise will generate KEY_UNKNOWN on un-listed vpc event,
which means nothing and is hard for user to report the detail
of the event.

Signed-off-by: Ike Panhc <ike.pan@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:23:40 -04:00
Ike Panhc a5c3892f56 ideapad: remove unused define and fix a typo
After review the current ideapad-laptop, found an unused define and
a typo.

Signed-off-by: Ike Panhc <ike.pan@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:23:40 -04:00
Jesper Juhl e4332e8e69 hdaps: Jesper Juhl: Fix outdated email address
I haven't had a working gmail address for many years - update to my
actual working address.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:23:40 -04:00
Alex Hung ff413195e8 thinkpad-acpi: fix issuing duplicated key events for brightness up/down
The tp_features.bright_acpimode will not be set correctly for brightness
control because ACPI_VIDEO_HID will not be located in ACPI. As a result,
a duplicated key event will always be sent. acpi_video_backlight_support()
is sufficient to detect standard ACPI brightness control.

Signed-off-by: Alex Hung <alex.hung@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:23:39 -04:00
Seth Forshee 96960880c3 apple-gmux: Add suspend/resume support for the backlight
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-05-31 14:23:39 -04:00
Daniel Drake bc7ab495c7 xo1-rfkill: only act when blocked state is changed
The XO-1 rfkill driver should only send EC commands when changing
between blocked/unblocked state.

The rfkill switch is asked to be unblocked on every resume (even when
the card was never blocked before) and sending a EC_WLAN_LEAVE_RESET
command here upsets the resume sequence of the libertas driver. Adding
the check to avoid the spurious EC_WLAN_LEAVE_RESET fixes the wifi resume
behaviour.

The rfkill state is maintained by the hardware over suspend/resume
so no extra consideration is needed here.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:23:39 -04:00
Robert Gerlach 14b234b105 fujitsu-tablet: correct quirks for Lifebook and Stylistic tablets
This patch adds a quirk to fix the dock detection for Fujitsu Stylistic
devices and fixes an bug in which tablet mode state was not correctly
reported in Fujitsu Lifebook and Stylistic models.

Signed-off-by: Robert Gerlach <khnz@gmx.de>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:23:39 -04:00
Robert Gerlach 32be65bee5 fujitsu-tablet: convert printk to pr_*
Signed-off-by: Robert Gerlach <khnz@gmx.de>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:23:39 -04:00
Robert Gerlach a5c02c2f63 fujitsu-tablet: remove duplicated code
Signed-off-by: Robert Gerlach <khnz@gmx.de>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:23:38 -04:00
Uwe Kleine-König 145047de99 drivers/x86: mark const init data with __initconst instead of __initdata
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with

	error: $variablename causes a section type conflict

because a section containing const variables is marked read only and so
cannot contain non-const variables.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
Cc: platform-driver-x86@vger.kernel.org
Cc: ibm-acpi-devel@lists.sourceforge.net
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:23:38 -04:00
AceLan Kao 7f8392280c dell-laptop: add 3 quirks for supporting touchpad LED
Add "Vostro 3360", "Vostro 3460", and "Vostro 3560" into quirks,
so that they could have touchpad LED function work.

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:23:38 -04:00
Ang Way Chuang 57b31b2fb6 Dell Vostro 3350 touchpad LED
Add Vostro 3350 into quirks so that the touchpad LED works.

Signed-off-by: Ang Way Chuang <wcang79@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-05-31 14:23:38 -04:00
Corentin Chary f5f4fd4516 backlight: initialize struct backlight_properties properly
In all these files, the .power field was never correctly initialized.

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Dave Airlie <airlied@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-29 16:22:30 -07:00
Linus Torvalds e8650a0823 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial updates from Jiri Kosina:
 "As usual, it's mostly typo fixes, redundant code elimination and some
  documentation updates."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (57 commits)
  edac, mips: don't change code that has been removed in edac/mips tree
  xtensa: Change mail addresses of Hannes Weiner and Oskar Schirmer
  lib: Change mail address of Oskar Schirmer
  net: Change mail address of Oskar Schirmer
  arm/m68k: Change mail address of Sebastian Hess
  i2c: Change mail address of Oskar Schirmer
  net: Fix tcp_build_and_update_options comment in struct tcp_sock
  atomic64_32.h: fix parameter naming mismatch
  Kconfig: replace "--- help ---" with "---help---"
  c2port: fix bogus Kconfig "default no"
  edac: Fix spelling errors.
  qla1280: Remove redundant NULL check before release_firmware() call
  remoteproc: remove redundant NULL check before release_firmware()
  qla2xxx: Remove redundant NULL check before release_firmware() call.
  aic94xx: Get rid of redundant NULL check before release_firmware() call
  tehuti: delete redundant NULL check before release_firmware()
  qlogic: get rid of a redundant test for NULL before call to release_firmware()
  bna: remove redundant NULL test before release_firmware()
  tg3: remove redundant NULL test before release_firmware() call
  typhoon: get rid of redundant conditional before all to release_firmware()
  ...
2012-05-22 19:22:50 -07:00
Linus Torvalds 18b15fcde7 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes form Peter Anvin

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  intel_mid_powerbtn: mark irq as IRQF_NO_SUSPEND
  arch/x86/platform/geode/net5501.c: change active_low to 0 for LED driver
  x86, relocs: Remove an unused variable
  asm-generic: Use __BITS_PER_LONG in statfs.h
  x86/amd: Re-enable CPU topology extensions in case BIOS has disabled it
2012-05-06 12:19:38 -07:00
Yong Wang ab27a20e62 intel_mid_powerbtn: mark irq as IRQF_NO_SUSPEND
So that the power button still wakes up the platform.

Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
Link: http://lkml.kernel.org/r/20120504210244.F2EA5A018B@akpm.mtv.corp.google.com
Tested-by: Kangkai Yin <kangkai.yin@intel.com>
Tested-by: Yong Wang <yong.y.wang@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2012-05-04 14:40:52 -07:00
Linus Torvalds 110a5c8b38 Merge branch 'akpm' (Andrew's patch-bomb)
Merge fixes from Andrew Morton:
 "13 fixes.  The acerhdf patches aren't (really) fixes.  But they've
  been stuck in my tree for up to two years, sent to Matthew multiple
  times and the developers are unhappy."

* emailed from Andrew Morton <akpm@linux-foundation.org>: (13 patches)
  mm: fix NULL ptr dereference in move_pages
  mm: fix NULL ptr dereference in migrate_pages
  revert "proc: clear_refs: do not clear reserved pages"
  drivers/rtc/rtc-ds1307.c: fix BUG shown with lock debugging enabled
  arch/arm/mach-ux500/mbox-db5500.c: world-writable sysfs fifo file
  hugetlbfs: lockdep annotate root inode properly
  acerhdf: lowered default temp fanon/fanoff values
  acerhdf: add support for new hardware
  acerhdf: add support for Aspire 1410 BIOS v1.3314
  fs/buffer.c: remove BUG() in possible but rare condition
  mm: fix up the vmscan stat in vmstat
  epoll: clear the tfile_check_list on -ELOOP
  mm/hugetlb: fix warning in alloc_huge_page/dequeue_huge_page_vma
2012-04-26 15:24:45 -07:00
Peter Feuerer 351963bb58 acerhdf: lowered default temp fanon/fanoff values
Due to new supported hardware, of which the actual temperature limits of
processor, harddisk and other components are unknown, it feels safer with
lower fanon / fanoff settings.

It won't change much for most people, already using acerhdf, as they use
their own fanon/fanoff variable settings when loading the module.

Furthermore seems like kernel and userspace tools have been improved to
work more efficient and netbooks don't get so hot anymore.

Signed-off-by: Peter Feuerer <peter@piie.net>
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-25 21:26:34 -07:00
Peter Feuerer 43ae1e32e0 acerhdf: add support for new hardware
Add support for new hardware:
Acer Aspire LT-10Q/531/751/1810/1825,
Acer Travelmate 7730,
Packard Bell ENBFT/DOTVR46

Signed-off-by: Peter Feuerer <peter@piie.net>
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-25 21:26:33 -07:00
Clay Carpenter e39a9ba288 acerhdf: add support for Aspire 1410 BIOS v1.3314
Add support for Aspire 1410 BIOS v1.3314.  Fixes the following error:

acerhdf: unknown (unsupported) BIOS version Acer/Aspire 1410/v1.3314,
please report, aborting!

Signed-off-by: Clay Carpenter <claycarpenter@gmail.com>
Signed-off-by: Peter Feuerer <peter@piie.net>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-25 21:26:33 -07:00
Martin Nyhus d62d421b07 dell-laptop: Terminate quirks list properly
Add missing DMI_NONE entry to end of the quirks list so
dmi_check_system() won't read past the end of the list.

Signed-off-by: Martin Nyhus <martin.nyhus@gmx.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-04-17 09:31:37 -04:00
Adam Jackson fc1a93bd9b intel_ips: Hush the i915 symbols message
We can't control order here, and getting it inverted is harmless.  So
turn this down to dev_info() and leave a note about how to fix it in
case userspace is insufficiently automagic.

Bugzilla: https://bugzilla.redhat.com/794953
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-04-17 09:31:33 -04:00
Jiri Kosina e75d660672 Merge branch 'master' into for-next
Merge with latest Linus' tree, as I have incoming patches
that fix code that is newer than current HEAD of for-next.

Conflicts:
	drivers/net/ethernet/realtek/r8169.c
2012-04-08 21:48:52 +02:00
Linus Torvalds a335750b9a Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull ACPI & Power Management changes from Len Brown:
 - ACPI 5.0 after-ripples, ACPICA/Linux divergence cleanup
 - cpuidle evolving, more ARM use
 - thermal sub-system evolving, ditto
 - assorted other PM bits

Fix up conflicts in various cpuidle implementations due to ARM cpuidle
cleanups (ARM at91 self-refresh and cpu idle code rewritten into
"standby" in asm conflicting with the consolidation of cpuidle time
keeping), trivial SH include file context conflict and RCU tracing fixes
in generic code.

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (77 commits)
  ACPI throttling: fix endian bug in acpi_read_throttling_status()
  Disable MCP limit exceeded messages from Intel IPS driver
  ACPI video: Don't start video device until its associated input device has been allocated
  ACPI video: Harden video bus adding.
  ACPI: Add support for exposing BGRT data
  ACPI: export acpi_kobj
  ACPI: Fix logic for removing mappings in 'acpi_unmap'
  CPER failed to handle generic error records with multiple sections
  ACPI: Clean redundant codes in scan.c
  ACPI: Fix unprotected smp_processor_id() in acpi_processor_cst_has_changed()
  ACPI: consistently use should_use_kmap()
  PNPACPI: Fix device ref leaking in acpi_pnp_match
  ACPI: Fix use-after-free in acpi_map_lsapic
  ACPI: processor_driver: add missing kfree
  ACPI, APEI: Fix incorrect APEI register bit width check and usage
  Update documentation for parameter *notrigger* in einj.txt
  ACPI, APEI, EINJ, new parameter to control trigger action
  ACPI, APEI, EINJ, limit the range of einj_param
  ACPI, APEI, Fix ERST header length check
  cpuidle: power_usage should be declared signed integer
  ...
2012-03-30 16:45:39 -07:00
Andi Kleen c264c651fd Disable MCP limit exceeded messages from Intel IPS driver
On a system on the thermal limit these are quite noisy and flood the logs.
Better would be a counter anyways. But given that we don't even have
anything for normal throttling this doesn't seem to be urgent either.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2012-03-30 16:06:12 -04:00
Linus Torvalds 61e5191c9d Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-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
  ...
2012-03-28 14:20:23 -07:00
Jonathan Woithe 409a3e9813 Email/web address change
This patch updates Jonathan Woithe's contact details across the kernel tree.

Signed-off-by: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-03-28 10:35:15 +02:00
Lee, Chun-Yi 86924de2a6 acer-wmi: add quirk table for video backlight vendor mode
There have some acer laptop have broken _BCM implemenation, the AML
code wrote value to EC register but firmware didn't change brighenss.

Fortunately, the brightness control works on those machines with
vendor mode. So, add quirk table for video backlight vendor mode
and unregister acpi video interface on those machines.

Tested on Acer TravelMate 4750

Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:47:58 -04:00
Jesper Juhl 41603e9783 drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() avoid NULL deref
In drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() the call
to dmi_first_match() may fail and return NULL. If it does return NULL,
then we'll be dereferencing a NULL pointer in the rfkill_alloc() call
where we do 'system_id->driver_data' --> KABOOM!

Avoid that problem by testing for a NULL return value from
dmi_first_match() and bailing out if it fails.

I was a bit uncertain about what to return in the failure case. In the
end I settled for -ENXIO as the most logical error to return.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:45:32 -04:00
Corentin Chary a979e2e2af samsung-laptop: unregister ACPI video module for some well known laptops
On these laptops, the ACPI video is not functional, and very unlikely
to be fixed by the vendor. Note that intel_backlight works for some
of these laptops, and the backlight from samsung-laptop always work.

The good news is that newer laptops have functional ACPI video device
and won't end up growing this list.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:45:25 -04:00
Lee, Chun-Yi 5719b81988 acer-wmi: No wifi rfkill on Sony machines
The wireless rfkill should charged by sony-laptop but not acer-wmi.
So, add Sony's SNY5001 acpi device to blacklist in acer-wmi.

Tested on Sony Vaio

Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Mattia Dongili <malattia@linux.it>
Cc: Dimitris N <ddarlac@gmail.com>
Tested-by: Dimitris N <ddarlac@gmail.com>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:45:25 -04:00
Manoj Iyer 23b0531641 thinkpad-acpi: recognize Lenovo as version string in newer V-series BIOS
The newer V series bios reports product version as 'Lenovo'
instead of 'ThinkPad'. Recoginze this new string so that
the module can load.

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Tested-by: James Ferguson <james.ferguson@canonical.com>
Tested-by: Dennis Chua <dennis.chua@canonical.com>
Tested-by: Ike Pan <ike.pan@canonical.com>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
2012-03-26 15:05:52 -04:00
Corentin Chary ade28abdcb asus-wmi: don't update power and brightness when using scalar
But we can still do it on other boards, as this might happen
if the backlight driver change when update_bl is called.

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:05:51 -04:00
Corentin Chary 7a61d02074 eeepc-wmi: split et2012 specific hacks
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:05:49 -04:00
Corentin Chary c55d995dd3 eeepc-wmi: refine quirks handling
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:05:47 -04:00
Corentin Chary fb05b9f53f asus-nb-wmi: set panel_power correctly
Even if it's currently unused.

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:05:46 -04:00
Corentin Chary 6a2bcccdb3 asus-wmi: move WAPF variable into quirks_entry
Some models work better with different values of wapf, so move the
variable into quriks_entry to make it more easy to give a specific
value to different models.

Based on original patch from AceLan Kao <acelan.kao@canonical.com>

Cc: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:05:44 -04:00
AceLan Kao 6e0044bedc asus-wmi: store backlight power status for AIO machine
Due to some implementation reasons, ASUS ET2012 All-in-One machines
can't report the correct backlight power status, it will always return
1. To track the backlight power status correctly, we have to store the
status by ourselves.

BTW, by the BIOS design, the backlight power will be turn on/off
sequently, no matter what the value of the parameter will be.
More over, the brightness adjustment command will turn on the backlight
power. Those behaviors will make us fail to track the backlight power
status.
For example, While we are trying to turn on the backlight power,
we will send out the brightness adjustment command and then trying to
figure out if we have to turn on the backlight power, then send out
the command. But, the real case is that, the backlight power turns on
while sending the brightness adjustment command, and then we send out
the command to turn on the backlight power, it actually will turn off
the backlight power and the backlight power status we recorded becomes
wrong. So, we have to seperate these two commands by a if statement.

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:05:43 -04:00
AceLan Kao c87992d1fa asus-wmi: add scalar board brightness adj. support
Some ASUS ET2012E/I All-in-One machines that use a scalar board
to control the brightness, and they only accept brightness up and down
command. So, I introduced a get_scalar_command() function to pass the
command to the scalar board through WMI.

Besides, we have to store the brightness value locally, for we need the
old value to know the brightness value is increasing or decreasing.

BTW, since there is no way to retrieve the actual brightness(it would be
a fixed value), and the max brightness value would be fixed to 1, so we
have to keep passing the brightness up/down command when we reached the
max brightness value or 0.

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:05:41 -04:00
Dan Carpenter bde9e5098c samsung-laptop: cleanup return type: mode_t vs umode_t
This function returns a umode_t (unsigned short) instead of mode_t which
is an unsigned int on some architectures.  Cleaning this up silences a
compile warning:

drivers/platform/x86/samsung-laptop.c:1108:2: warning: initialization
	from incompatible pointer type [enabled by default]

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:05:39 -04:00
David Rientjes 82c333aaf4 drivers, samsung-laptop: fix usage of isalnum
linux/ctype.h is needed for isalnum() to avoid a build error:

drivers/platform/x86/samsung-laptop.c: In function ‘samsung_sabi_diag’:
drivers/platform/x86/samsung-laptop.c:1306: error: implicit declaration of function ‘isalnum’

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:05:38 -04:00
David Rientjes 8522944085 drivers, samsung-laptop: fix initialization of sabi_data in sabi_set_commandb
Fields d0, d1, d2, and d3 are members of an anonymous struct inside an
anonymous union inside struct sabi_data.  Initialization must be done by
wrapping the anonymous union and structs with brackets to avoid a build
error:

drivers/platform/x86/samsung-laptop.c: In function ‘sabi_set_commandb’:
drivers/platform/x86/samsung-laptop.c:433: error: unknown field ‘d0’ specified in initializer
drivers/platform/x86/samsung-laptop.c:433: warning: missing braces around initializer
drivers/platform/x86/samsung-laptop.c:433: warning: (near initialization for ‘in.<anonymous>’)
...

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:05:36 -04:00
Corentin Chary c09b2237da asus-wmi: on/off bit is not set when reading the value
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:05:35 -04:00
Chih-Wei Huang eb649a818a eeepc-wmi: add extra keymaps for EP121
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:05:33 -04:00
Corentin Chary 9b05ea2437 asus-nb-wmi: ignore useless keys
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:05:31 -04:00
Lee, Chun-Yi c08f2086cd acer-wmi: support Lenovo ideapad S205 Brazos wifi switch
Vaclav found a new ideapad S205 Brazos machine that used the same
EC register of wireless with S205 but has different product name.

So, add this machine to quirk for support wireless rfkill.

Tested on Lenovo ideapad S205 Brazos

Tested-by: Vaclav Mocek <vmocek@gmail.com>
Acked-by: Ike Panhc <ike.pan@canonical.com>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:05:30 -04:00
Lee, Chun-Yi 996d23ba36 acer-wmi: fix out of input parameter size when set
The input parameter of set device status is different with get device
status. There have volume value element for set status but don't need
for get action.

On Acer TravelMate 4750 creates field on volume value element even
doesn't use it in DSDT. So, add this patch for separate input paramter
between set device status with get status.

Tested on Acer TravelMate 4750

Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:05:28 -04:00
Lee, Chun-Yi 34b6cfabd7 acer-wmi: Detect communication hot key number
Currently we set a fixed hot key number to 0x01 for communction button,
but, actually, the key number is different on each acer laptop and it was
reported by SMBIOS.

So, add this patch to get the communication hot key number from Acer
OEM-specific SMBIOS Type AA.

Tested on Acer TravelMate 4750

Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:05:27 -04:00
Seth Forshee 917ee75a59 platform/x86: Add driver for Apple gmux device
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>
2012-03-26 15:05:25 -04:00
Linus Torvalds 475c77edf8 Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci
Pull PCI changes (including maintainer change) from Jesse Barnes:
 "This pull has some good cleanups from Bjorn and Yinghai, as well as
  some more code from Yinghai to better handle resource re-allocation
  when enabled.

  There's also a new initcall_debug feature from Arjan which will print
  out quirk timing information to help identify slow quirks for fixing
  or refinement (Yinghai sent in a few patches to do just that once the
  new debug code landed).

  Beyond that, I'm handing off PCI maintainership to Bjorn Helgaas.
  He's been a core PCI and Linux contributor for some time now, and has
  kindly volunteered to take over.  I just don't feel I have the time
  for PCI review and work that it deserves lately (I've taken on some
  other projects), and haven't been as responsive lately as I'd like, so
  I approached Bjorn asking if he'd like to manage things.  He's going
  to give it a try, and I'm confident he'll do at least as well as I
  have in keeping the tree managed, patches flowing, and keeping things
  stable."

Fix up some fairly trivial conflicts due to other cleanups (mips device
resource fixup cleanups clashing with list handling cleanup, ppc iseries
removal clashing with pci_probe_only cleanup etc)

* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci: (112 commits)
  PCI: Bjorn gets PCI hotplug too
  PCI: hand PCI maintenance over to Bjorn Helgaas
  unicore32/PCI: move <asm-generic/pci-bridge.h> include to asm/pci.h
  sparc/PCI: convert devtree and arch-probed bus addresses to resource
  powerpc/PCI: allow reallocation on PA Semi
  powerpc/PCI: convert devtree bus addresses to resource
  powerpc/PCI: compute I/O space bus-to-resource offset consistently
  arm/PCI: don't export pci_flags
  PCI: fix bridge I/O window bus-to-resource conversion
  x86/PCI: add spinlock held check to 'pcibios_fwaddrmap_lookup()'
  PCI / PCIe: Introduce command line option to disable ARI
  PCI: make acpihp use __pci_remove_bus_device instead
  PCI: export __pci_remove_bus_device
  PCI: Rename pci_remove_behind_bridge to pci_stop_and_remove_behind_bridge
  PCI: Rename pci_remove_bus_device to pci_stop_and_remove_bus_device
  PCI: print out PCI device info along with duration
  PCI: Move "pci reassigndev resource alignment" out of quirks.c
  PCI: Use class for quirk for usb host controller fixup
  PCI: Use class for quirk for ti816x class fixup
  PCI: Use class for quirk for intel e100 interrupt fixup
  ...
2012-03-23 14:02:12 -07:00
Linus Torvalds 2390481546 Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 platform changes from Ingo Molnar.

Removes the Moorestown platform that nobody ever used.

* 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/platform: Move APIC ID validity check into platform APIC code
  x86/olpc/xo15/sci: Enable lid close wakeup control
  x86/geode/net5501: Add platform driver for Soekris Engineering net5501
  x86/geode/alix2: Supplement driver to include GPIO button support
  x86/mid/powerbtn: Use MSIC read/write instead of ipc_scu
  x86/mid/thermal: Turn off thermistor
  x86/mid/thermal: Add msic_thermal alias
  x86/mid/thermal: Convert to use Intel MSIC API
  x86/mid/scu_ipc: Remove Moorestown support
  x86/mid: Kill off Moorestown
  x86/mrst: Add msic_thermal platform support
  x86/config: Select MSIC MFD driver on Intel Medfield platform
  x86/mid: Remove Intel Moorestown
  x86/mrst: Set ISA bus type for fake MP IRQs
  x86/ioapic: Use legacy_pic to set correct gsi-irq mapping
2012-03-22 09:43:22 -07:00
Seth Forshee f11f999e98 toshiba_acpi: Refuse to load on machines with buggy INFO implementations
Several Satellite models have a buggy implementation of the INFO method
that causes ACPI exceptions when executed:

 ACPI Error: Result stack is empty! State=ffff88012d70f800 (20110413/dswstate-98)
 ACPI Exception: AE_AML_NO_RETURN_VALUE, Missing or null operand (20110413/dsutils-646)
 ACPI Exception: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (20110413/dsutils-763)
 ACPI Error: Method parse/execution failed [\_SB_.VALZ.GETE] (Node ffff880131175eb0), AE_AML_NO_RETURN_VALUE (20110413/psparse-536)
 ACPI Error: Method parse/execution failed [\_SB_.VALZ.INFO] (Node ffff880131175ed8), AE_AML_NO_RETURN_VALUE (20110413/psparse-536)
 toshiba_acpi: ACPI INFO method execution failed
 toshiba_acpi: Failed to query hotkey event

All known machines with this implementation also have a WMI interface
with event GUID 59142400-C6A3-40FA-BADB-8A2652834100 which is not seen
on any other models. Refuse to load toshiba_acpi on machines with this
guid.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-22 09:31:53 -04:00
Azael Avalos af502837a0 toshiba_acpi: Support additional hotkey scancodes
These scancodes are used by many of the models now supported with
the addition of TOS1900 device support.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-22 09:31:52 -04:00
Seth Forshee 29cd293f9f toshiba_acpi: Support alternate hotkey interfaces
There are two types of problems that prevent hotkeys from working
on many of the machines supported by toshiba_acpi. The first of
these is the lack of a functioning SCI for hotkey events. For these
machines it is possible to filter the Fn keypresses from the
keyboard and generate a notification by executing the ACPI NTFY
method.

The second problem is a lack of support for HCI_SYSTEM_EVENT, which
is used for reading the hotkey scancodes. On these machines the
scancodes can be read by executing the ACPI NTFY method.

This patch fixes both problems by installing an i8042 filter when
the NTFY method is present to generate notifications and by
detecting which of INFO or HCI_SYSTEM_EVENT is supported for
reading scancodes. If neither method of reading scancodes is
supported, the hotkey input device is not registered.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-22 09:31:51 -04:00
Linus Torvalds 69a7aebcf0 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree from Jiri Kosina:
 "It's indeed trivial -- mostly documentation updates and a bunch of
  typo fixes from Masanari.

  There are also several linux/version.h include removals from Jesper."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (101 commits)
  kcore: fix spelling in read_kcore() comment
  constify struct pci_dev * in obvious cases
  Revert "char: Fix typo in viotape.c"
  init: fix wording error in mm_init comment
  usb: gadget: Kconfig: fix typo for 'different'
  Revert "power, max8998: Include linux/module.h just once in drivers/power/max8998_charger.c"
  writeback: fix fn name in writeback_inodes_sb_nr_if_idle() comment header
  writeback: fix typo in the writeback_control comment
  Documentation: Fix multiple typo in Documentation
  tpm_tis: fix tis_lock with respect to RCU
  Revert "media: Fix typo in mixer_drv.c and hdmi_drv.c"
  Doc: Update numastat.txt
  qla4xxx: Add missing spaces to error messages
  compiler.h: Fix typo
  security: struct security_operations kerneldoc fix
  Documentation: broken URL in libata.tmpl
  Documentation: broken URL in filesystems.tmpl
  mtd: simplify return logic in do_map_probe()
  mm: fix comment typo of truncate_inode_pages_range
  power: bq27x00: Fix typos in comment
  ...
2012-03-20 21:12:50 -07:00
Michael Demeter 7714567c87 intel_mid_powerbtn: use MSIC read/write instead of ipc_scu
In the 2.6.36 kernel we did not have the MSIC driver. Changed
all ipc_scu_reads/writes to use the MSIC driver and defines.
Added a fix from the 2.6.36 kernel where the SCU FW could send
a power button interrupt to the IA32 FW and the kernel was not
running yet. This resulted in the interrupt not getting cleared
and the power button was ignored. this fix just clears the
interrupt on start-up.

Signed-off-by: Michael Demeter <michael.demeter@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Revert style-only changes. Remove unused variable. Fix comment style.]
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-20 12:02:26 -04:00
Alan Cox f39eaa674b platform, x86: Kill off Moorestown
All production devices operate in the Oaktrail configuration with legacy PC
elements present and an ACPI BIOS. Continue stripping out the Moorestown
elements from the tree leaving Medfield.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-20 12:02:25 -04:00
Danny Kukawka a938406b76 hdaps: trivial fix for -Wuninitialized
Trivial fix for some -Wuninitialized compiler warnings.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-20 12:02:25 -04:00
Sergey Senozhatsky ca1469f5f1 acer-wmi: ignore missing Aspire 5741G keys (checkpatched)
acer-wmi: ignore missing Aspire 5741G keys

Ignore Aspire's 5741G:
 KEY_PREVIOUSSONG
 KEY_NEXTSONG
 KEY_PLAYPAUSE
 KEY_STOP
 KEY_VOLUMEDOWN

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-20 12:02:24 -04:00