Commit graph

1177 commits

Author SHA1 Message Date
followmsi
fce3b9217f Merge branch 'lineage-15.1' into followmsi-oreo 2018-01-03 19:05:35 +01:00
Artem Borisov
d7992e6feb Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1
All bluetooth-related changes were omitted because of our ancient incompatible bt stack.

Change-Id: I96440b7be9342a9c1adc9476066272b827776e64
2017-12-27 17:13:15 +03:00
Siva Kumar Akkireddi
1bc20170dc msm: sps: Fix race condition in SPS debugfs APIs
SPS debugfs APIs can be called concurrently which can result
in dangling pointer access. This change synchronizes access
to the SPS debugfs buffer.

Change-Id: I409b3f0618f760cb67eba47b43c81d166cdae4aa
Signed-off-by: Siva Kumar Akkireddi <sivaa@codeaurora.org>
(cherry picked from commit de875dd095d3ec0906c77518d28f793e6c69a9da)
2017-10-10 19:02:08 +02:00
Pali Rohár
800e58ae21 dell-laptop: Fix allocating & freeing SMI buffer page
commit b8830a4e71b15d0364ac8e6c55301eea73f211da upstream.

This commit fix kernel crash when probing for rfkill devices in dell-laptop
driver failed. Function free_page() was incorrectly used on struct page *
instead of virtual address of SMI buffer.

This commit also simplify allocating page for SMI buffer by using
__get_free_page() function instead of sequential call of functions
alloc_page() and page_address().

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
[lizf: Backported to 3.4: adjust context]
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-10-22 09:20:06 +08:00
Arnd Bergmann
5e77bfbbf1 ideapad: fix software rfkill setting
commit 4b200b4604bec3388426159f1656109d19fadf6e upstream.

This fixes a several year old regression that I found while trying
to get the Yoga 3 11 to work. The ideapad_rfk_set function is meant
to send a command to the embedded controller through ACPI, but
as of c1f73658ed, it sends the index of the rfkill device instead
of the command, and ignores the opcode field.

This changes it back to the original behavior, which indeed
flips the rfkill state as seen in the debugfs interface.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: c1f73658ed ("ideapad: pass ideapad_priv as argument (part 2)")
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
[lizf: Backported to 3.4: @data is not a pointer but the device idx]
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-10-22 09:20:05 +08:00
Krzysztof Kozlowski
ed53cbd0af compal-laptop: Check return value of power_supply_register
commit 1915a718b1872edffcb13e5436a9f7302d3d36f0 upstream.

The return value of power_supply_register() call was not checked and
even on error probe() function returned 0. If registering failed then
during unbind the driver tried to unregister power supply which was not
actually registered.

This could lead to memory corruption because power_supply_unregister()
unconditionally cleans up given power supply.

Fix this by checking return status of power_supply_register() call. In
case of failure, clean up sysfs entries and fail the probe.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Fixes: 9be0fcb5ed ("compal-laptop: add JHL90, battery & hwmon interface")
Signed-off-by: Sebastian Reichel <sre@kernel.org>
[lizf: Backported to 3.4: there's no "remove" label. Do cleanup inside if block]
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-09-18 09:20:24 +08:00
Dominique Leuenberger
664c30951d hp_accel: Add support for HP ZBook 15
commit 6583659e0f92e38079a8dd081e0a1181a0f37747 upstream.

HP ZBook 15 laptop needs a non-standard mapping (x_inverted).

BugLink: http://bugzilla.opensuse.org/show_bug.cgi?id=905329
Signed-off-by: Dominique Leuenberger <dimstar@opensuse.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-04-14 17:33:44 +08:00
Hans de Goede
d6be20a069 acer-wmi: Add acpi_backlight=video quirk for the Acer KAV80
commit 183fd8fcd7 upstream.

The acpi-video backlight interface on the Acer KAV80 is broken, and worse
it causes the entire machine to slow down significantly after a suspend/resume.

Blacklist it, and use the acer-wmi backlight interface instead. Note that
the KAV80 is somewhat unique in that it is the only Acer model where we
fall back to acer-wmi after blacklisting, rather then using the native
(e.g. intel) backlight driver. This is done because there is no native
backlight interface on this model.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1128309
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-02-02 17:05:10 +08:00
Hans de Goede
a00a3c0334 samsung-laptop: Add broken-acpi-video quirk for NC210/NC110
commit 5a1426c99f upstream.

The acpi-video backlight interface on the NC210 does not work, blacklist it
and use the samsung-laptop interface instead.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=861573
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
[lizf: Backported to 3.4: adjust context]
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-02-02 17:05:10 +08:00
Maxim Mikityanskiy
c21fcbb1bd msi-wmi: Fix memory leak
commit 51c94491c8 upstream.

Fix memory leak - don't forget to kfree ACPI object when returning from
msi_wmi_notify() after suppressing key event.

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Acked-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Qiang Huang <h.huangqiang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-07 16:02:14 -07:00
Alex Hung
2467a26e70 thinkpad-acpi: fix issuing duplicated key events for brightness up/down
commit ff413195e8 upstream.

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>
Cc: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-07 16:02:07 -07:00
Takashi Iwai
49ac3cba40 hp_accel: Add a new PnP ID HPQ6007 for new HP laptops
commit b0ad4ff35d upstream.

The DriveGuard chips on the new HP laptops are with a new PnP ID
"HPQ6007".  It should be compatible with older chips.

Acked-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-06 11:05:47 -08:00
Manoj Iyer
e455d0585c thinkpad-acpi: recognize latest V-Series using DMI_BIOS_VENDOR
commit a4f46bb9fa upstream.

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>
Cc: Shuduo Sang <shuduo.sang@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-07 12:49:49 -07:00
Mekala Natarajan
8a64d3e1d7 msm: Change the permissions of sps debug files
Debug sysfs files should not be world writable.

Changed the permissions for bam_pipe_sel, bam_addr,
testbus_sel files.

CRs-Fixed: 465369
Bug: 9052691

Change-Id: Ie1a2aa993750510fd4e8c54819eb2efdc8b92055
Signed-off-by: Praveena Pachipulusu <pveena@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
2013-06-07 11:25:53 -07:00
Shuah Khan
c43bab8955 hp_accel: Ignore the error from lis3lv02d_poweron() at resume
commit 7783819920 upstream.

The error in lis3lv02_poweron() is harmless in the resume path, so
we should ignore it. It is inline with the other usages of lis3lv02_poweron()
and matches the 3.0 code for this routine. This patch is in suse git and
might have missed making it into the mainline.
opensuse - commit id: 66ccdac87c322cf7af12bddba8c805af640b1cff

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-19 10:54:38 -07:00
Ben Hutchings
1014986017 asus-laptop: Do not call HWRS on init
commit cb7da02245 upstream.

Since commit 8871e99f89 ('asus-laptop: HRWS/HWRS typo'), module
initialisation is very slow on the Asus UL30A.  The HWRS method takes
about 12 seconds to run, and subsequent initialisation also seems to
be delayed.  Since we don't really need the result, don't bother
calling it on init.  Those who are curious can still get the result
through the 'infos' device attribute.

Update the comment about HWRS in show_infos().

Reported-by: ryan <draziw+deb@gmail.com>
References: http://bugs.debian.org/692436
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28 12:12:28 -07:00
Duy Truong
04e554807c Update copyright to The Linux Foundation
Change-Id: Ibead64ce2e901dede2ddd1b86088b88f2350ce92
Signed-off-by: Duy Truong <dtruong@codeaurora.org>
2013-03-15 17:07:39 -07:00
Yan He
ecf937c2ec msm: sps: support polling when pipe is in IRQ mode
BAM client has a new use case where active polling is needed when
the pipe is configured in the interrupt mode. Add the support in SPS
driver for this use case.

Change-Id: I55603de946b77004a38ab1dbca995072e9066f54
Signed-off-by: Yan He <yanhe@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:24:04 -08:00
Yan He
1a381126f8 msm: sps: output clearer HW info when BAM is enabled
Currently we output virtual address of BAM when it is enabled,
which is not very helpful for debugging. Output BAM's physical
address instead as well as its version and pipe amount.

Change-Id: I1956a1c65bb047b9ff39f1cb04c04e8c08d7a890
Signed-off-by: Yan He <yanhe@codeaurora.org>
(cherry picked from commit c23ab8f614349eade2169402e529abfa1e8cfc24)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
(cherry picked from commit d9533ab3e1bb136d8f61bf9acc4f04ca56e7eab7)
2013-03-07 15:19:57 -08:00
Yan He
2dd5179bca msm: sps: add option for external block pipe reset
Clients can specify whether to ignore external block pipe reset
or not during BAM registration.

Signed-off-by: Yan He <yanhe@codeaurora.org>
(cherry picked from commit 821e276e5c19c80dcdf9c933acb6a3b0b9df0fce)

Change-Id: I1cde36cae8328c5b2cc5ec7f1dd053271f69e604
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:41 -08:00
Yan He
0f671cd924 msm: sps: improve debugging in SPS driver
1> Output BAM_TEST_BUS content with specified TEST_BUS_SEL value,
which helps HW team's debugging.
2> Support selection of pipes to only output registers' values of
selected pipes.

Signed-off-by: Yan He <yanhe@codeaurora.org>
(cherry picked from commit fc1aa893e95a45a8a55b5ccc0cc01a5a8261f085)

Conflicts:

	drivers/platform/msm/sps/sps.c

Change-Id: I78cd4f4f3f847b709d69f973b1d3ae7becab666d
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:30 -08:00
Yan He
d48622d2d8 msm: sps: output the log before callback
Currently the log is output after callback is returned from the
client driver. Output the log first so that we could know the
callback is executed.

Change-Id: If9183b364d518f8b426b94f58556232605575714
Signed-off-by: Yan He <yanhe@codeaurora.org>
(cherry picked from commit 93fe9147cd2f053880a0156892328e290088cd65)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:41 -08:00
Glenn Kasten
29e4b90027 No world-writable files in debugfs
Change-Id: I60c9107b9f6aef53efbe6fa67f1465b2f1a7c2bb
Signed-off-by: Glenn Kasten <gkasten@google.com>
2013-03-04 12:47:00 -08:00
Michael Bohan
12eb83a820 platform: msm: Add driver for QPNP PMIC clkdiv peripherals
This driver supports the Qualcomm PNP clkdiv peripheral. It
allowed for configuring divide factors for various clock outputs
on the PMIC. The source clock is CXO.

The driver allows for configuration of the clkdiv device through
Device Tree. Some optional parameters may be specified instead at
runtime with the qpnp_clkdiv_config() API.

Change-Id: I393ed0e4389fb3c1dfe0bcdb40944102d2e09894
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
2013-02-27 18:21:35 -08:00
Anirudh Ghayal
a8e451f6d5 msm: qpnp-power-on: Use BARK interrupt for key reporting
The PMIC 8941 v1.0 has a hardware bug where the RESIN line
does not generate an interrupt on key-press. The bark interrupt
can be used to provide the required functionality as follows -

Initialization:
1. Configure the bark (s1 timer) to 0ms, this generates the bark
interrupt as soon as the key is pressed.
2. Configure S2 reset timer to max 2 seconds and enable the S2 reset.
Runtime:
1. On receiving a bark interrupt report the key press, disable
reset and the bark irq. Schedule a work handler to execute after 500ms.
2. In the work, enable the reset and check the bark RT status bit.
3. If the bark RT bit is 0, report the key release and exit.
4. If bark RT bit is 1, disable the reset and re-arm the work for 500ms.

Change-Id: I6da47d27e32ada34660e36e6265f9078b2144999
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2013-02-27 18:21:20 -08:00
Anirudh Ghayal
641d48f057 msm: qpnp-power-on: Add reset configuration support
The PON module supports various reset sources (physical pins)
such as KPDPWR, RESIN, RESIN+KPDPWR. These pins can be configured
for different reset types (such as warm, soft, hard) and can also
be used as push buttons (keys).

In the push-button configuration these pins act as gpios, only
reporting the state on the line (high/low) and no additional
pon based configuration being done in the hardware or software.
They can be used for generic buttons (such as volume up/down,
directional keys)

Change-Id: Icde78b49b1037c1b5a13d7e90f772f72ac822b2a
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2013-02-27 18:21:19 -08:00
Yan He
5633afca6e msm: sps: add verification of IOVECs for sps_transfer
1> Check if the content of input IOVECs are valid.
2> The flag checking has existed in sps_transfer_one(). Move
this part to a separate function since it is common in both
sps_transfer_one() and sps_transfer().

Change-Id: I3835b60e216600496192ea0e84440d420f10adec
Signed-off-by: Yan He <yanhe@codeaurora.org>
2013-02-27 18:19:46 -08:00
Yan He
10d46cbd72 msm: sps: add debugging API for client drivers
Add this API to get the info of BAM registers and descriptor FIFOs.

Change-Id: I646119f6f1f7d8c94c71e30209b56a84bd4da38d
Signed-off-by: Yan He <yanhe@codeaurora.org>
2013-02-27 18:19:23 -08:00
Jay Chokshi
bef5e61818 platform: msm: qpnp-pwm: Define PWM devicetree bindings
Add the PWM devicetree bindings for the PWM/LPG device present in
Qualcomm PM8941 chipset. Also make the necessary changes to the driver
to comply with the devicetree binding requirements.

Change-Id: I8124e2541028719e5b747bc85ff548ac109a9735
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
2013-02-27 18:19:05 -08:00
Shimrit Malichi
66234f6288 msm: usb_bam : Add QDSS support for usb bam mode
Add USB bam changes to support QDSS in msm-8794.

Main additions:
Support device-tree files.
Add disconnect bam pipe support.
Add new API to retrieve pipe connection: get_bam2bam_connection_info.

Change-Id: I200d44dee319b8a9efda31b238c99202efddaa07
Signed-off-by: Shimrit Malichi <smalichi@codeaurora.org>
2013-02-27 18:18:58 -08:00
Jay Chokshi
34a7efdcf8 platform: msm: Remove warning messages from QPNP-PWM driver
The updated ARM GCC compiler warns about the usage of
a variable that might have been uninitialized. Comply
to the warnings.

Change-Id: Ia400ba4b895f91e828a9e485be0f1fe5c12bcd64
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
2013-02-27 18:17:59 -08:00
Anirudh Ghayal
77899b5708 msm: qpnp-power-on: Add QPNP PMIC power-on(PON) driver
The power-on module of the PMIC provides support for
power-key, reset and power on/off reasons and other
power-on related functionality.
The driver currently supports only the power-key detection.

Change-Id: If7d42ce38fba6e9a590d0953daadcd43ab746112
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2013-02-27 18:16:25 -08:00
Yan He
57cd9ec592 msm: sps: update clocks for 8974 in SPS driver
Two changes for clocks:
1> Vote for dfab_clk which is the peripheral NOC on 8974;
2> Do not vote for mem_clk since it does not exist on 8974.

Change-Id: Ia9d5547073219cea4250d3038aa5aa01a47ff4e0
Signed-off-by: Yan He <yanhe@codeaurora.org>
2013-02-27 18:15:59 -08:00
Jay Chokshi
60761c3acc platform: msm: Add qpnp-pwm driver
Add the qpnp-pwm driver to support LPG/PWM devices in Qualcomm
plug-and-play (QPNP) PMIC chips.  QPNP chips make use of
Qualcomm's SPMI register convention. LPG module provides a superset
of functionality provided by PWM device such as user defined pattern
generation, driving multiple PWM channels etc.

Change-Id: I29a22c6e655612d93cac10e6eea76383d37775e2
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
2013-02-27 18:15:09 -08:00
Amit Blay
90f47d48a4 msm: usb_bam: Change the usb bam pipe threshold to 16 bytes
In WHCK loopback test, data transfer stall is observed on DL
where A2 could not send data to USB due to hardware buffer.
Currently the pipe event threshold of A2 BAM is 16 bytes. So
A2 BAM will notify USB BAM almost as soon as it has any new
data. But the pipe event threshold of USB BAM was 512 bytes.
Change the usb bam pipe threshold to 16 bytes, so USB BAM
can tell A2 BAM as soon as USB BAM consumes a descriptor with
even small data trunk.

Change-Id: I2703b8fab4260d5da5366d0a0d9b5a309d11a7a4
CRs-Fixed: 374584
Acked-by: Amit Blay <ablay@codeaurora.org>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2013-02-27 18:14:09 -08:00
Abhimanyu Kapur
a3b70549ee msm: 8974: rename copper to 8974
The official name for copper is MSM8974.
Switch to it.

Change-Id: Ifb241232111139912477bf7b5f2e9cf5d38d0f9e
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2013-02-27 18:14:01 -08:00
Yan He
139a71ef87 msm: sps: Add SPS support for MDM 9x25
Enable SPS functionalities (including BAM, BAM DMA and pipe memory)
on MDM 9x25.

Change-Id: Id5295922dd87ebad5e87efa27eff0dc4b2b837ae
Signed-off-by: Yan He <yanhe@codeaurora.org>
2013-02-27 18:11:35 -08:00
Ofir Cohen
006e91b4a3 usb: gadget: SPS BAM-to-BAM - USB BAM driver
USB BAM driver to support BAM-to-BAM
USB<->Peripheral transactions.

Change-Id: Ib49a41f5dcdccb6f6bff2492fa64ead40f18b870
Signed-off-by: Ofir Cohen <ofirc@codeaurora.org>
2013-02-25 11:32:19 -08:00
Amir Samuelov
90dc7b8180 platform-drivers: msm: sps: Smart Peripheral System (SPS) driver
The driver controls the SPS hardware DMA to move data in the following
modes:

1. Peripheral-to-Peripheral
2. Peripheral-to-Memory
3. Memory-to-Memory

This driver complies to BAM hardware version#2.

Change-Id: I1b2b503893cf6891b47201da0f44a47ce7511ece
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
Signed-off-by: Kenneth Heitke <kheitke@codeaurora.org>
2013-02-25 11:32:18 -08:00
Kenneth Heitke
75b4a3b6f1 platform-drivers: msm: add single-wire serial bus interface (SSBI) driver
SSBI is the Qualcomm single-wire serial bus interface used to connect
the MSM devices to the PMIC and other devices.

Since SSBI only supports a single slave, the driver gets the name of the
slave device passed in from the board file through the master device's
platform data.

SSBI registers pretty early (postcore), so that the PMIC can come up
before the board init. This is useful if the board init requires the
use of gpios that are connected through the PMIC.

Based on a patch by Dima Zavin <dima@android.com> that can be found at:
http://android.git.kernel.org/?p=kernel/msm.git;a=commitdiff;h=eb060bac4

This patch adds PMIC Arbiter support for the MSM8660. The PMIC Arbiter
is a hardware wrapper around the SSBI 2.0 controller that is designed to
overcome concurrency issues and security limitations.  A controller_type
field is added to the platform data to specify the type of the SSBI
controller (1.0, 2.0, or PMIC Arbiter).

Change-Id: Ic37e1505f0ed7cfb8c5926a4c8d1770aa43e67cc
Signed-off-by: Kenneth Heitke <kheitke@codeaurora.org>
2013-02-25 11:32:17 -08:00
Stephen Boyd
fc7a3d36a8 drivers: Start MSM platform directory 2013-02-25 11:32:16 -08:00
Matt Fleming
7f8d73f9e7 samsung-laptop: Disable on EFI hardware
commit e0094244e4 upstream.

It has been reported that running this driver on some Samsung laptops
with EFI can cause those machines to become bricked as detailed in the
following report,

	https://bugs.launchpad.net/ubuntu-cdimage/+bug/1040557

There have also been reports of this driver causing Machine Check
Exceptions on recent EFI-enabled Samsung laptops,

	https://bugzilla.kernel.org/show_bug.cgi?id=47121

So disable it if booting from EFI since this driver relies on
grovelling around in the BIOS memory map which isn't going to work.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Steve Langasek <steve.langasek@canonical.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-14 10:48:54 -08:00
Matt Fleming
739230186f efi: Make 'efi_enabled' a function to query EFI facilities
commit 83e6818974 upstream.

Originally 'efi_enabled' indicated whether a kernel was booted from
EFI firmware. Over time its semantics have changed, and it now
indicates whether or not we are booted on an EFI machine with
bit-native firmware, e.g. 64-bit kernel with 64-bit firmware.

The immediate motivation for this patch is the bug report at,

    https://bugs.launchpad.net/ubuntu-cdimage/+bug/1040557

which details how running a platform driver on an EFI machine that is
designed to run under BIOS can cause the machine to become
bricked. Also, the following report,

    https://bugzilla.kernel.org/show_bug.cgi?id=47121

details how running said driver can also cause Machine Check
Exceptions. Drivers need a new means of detecting whether they're
running on an EFI machine, as sadly the expression,

    if (!efi_enabled)

hasn't been a sufficient condition for quite some time.

Users actually want to query 'efi_enabled' for different reasons -
what they really want access to is the list of available EFI
facilities.

For instance, the x86 reboot code needs to know whether it can invoke
the ResetSystem() function provided by the EFI runtime services, while
the ACPI OSL code wants to know whether the EFI config tables were
mapped successfully. There are also checks in some of the platform
driver code to simply see if they're running on an EFI machine (which
would make it a bad idea to do BIOS-y things).

This patch is a prereq for the samsung-laptop fix patch.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Peter Jones <pjones@redhat.com>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Steve Langasek <steve.langasek@canonical.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-14 10:48:53 -08:00
Seth Forshee
2c3a3718da samsung-laptop: Add quirk for broken acpi_video backlight on N250P
commit e04c200f1f upstream.

BugLink: http://bugs.launchpad.net/bugs/1086921
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 08:50:52 -08:00
AceLan Kao
4368ade3ff asus-nb-wmi: add some video toggle keys
commit 3766054fff upstream.

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>
Cc: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-02 10:30:23 -07:00
Corentin Chary
91a1da919e asus-laptop: HRWS/HWRS typo
commit 8871e99f89 upstream.

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=24222
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-02 10:30:23 -07:00
Alex Hung
88cdb96565 asus-wmi: use ASUS_WMI_METHODID_DSTS2 as default DSTS ID.
commit 63a78bb105 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-15 08:10:04 -07:00
Takashi Iwai
665c7a83a1 intel_ips: blacklist HP ProBook laptops
commit 88ca518b0b upstream.

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.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-19 08:58:56 -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