1
0
Fork 0
Commit Graph

1179 Commits (ceb3320610d6f15ff20dd4c042b36473d77de76f)

Author SHA1 Message Date
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