cascardo/linux.git
11 years agoCHROMIUM: tpm: tpm_tis_i2c: switch to workqueue for tpm self test
Olof Johansson [Tue, 3 Jul 2012 02:50:49 +0000 (19:50 -0700)]
CHROMIUM: tpm: tpm_tis_i2c: switch to workqueue for tpm self test

Moving to a workqueue means that the rest of boot can continue. It's
just important to make sure the selftest has actually completed before
any reads/writes are done.

BUG=chrome-os-partner:11403
TEST=tpm test suite

Change-Id: I5c12f3db88ac6ddaa8d5caeb0aa2a56a550cc267
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28915
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: config: disable serial on exynos by default
Olof Johansson [Tue, 3 Jul 2012 02:12:57 +0000 (19:12 -0700)]
CHROMIUM: config: disable serial on exynos by default

Serial slows down boot, besides there will be no accessible serial port on actual
devices.

BUG=chrome-os-partner:11403
TEST=boot

Change-Id: If7a0f19a299c1f220ddfc95294caea6ff98ef7c3
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28921
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: video: exynos: move dp configuration to a workqueue
Olof Johansson [Wed, 1 Aug 2012 05:22:11 +0000 (22:22 -0700)]
CHROMIUM: video: exynos: move dp configuration to a workqueue

This speeds up boot significantly, since it can take up to a second to
get the display up and going, and we want to keep on booting (through
some userspace) while that happens.

BUG=chrome-os-partner:11403
TEST=boot

Change-Id: I88a287d427b870c0521aa0c9aec79fd6d943233e
Signed-off-by: Olof Johansson <olof@lixom.net>
Reviewed-on: https://gerrit.chromium.org/gerrit/28918
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>

11 years agoCHROMIUM: video: exynos: remove redundant parameters
Olof Johansson [Wed, 1 Aug 2012 04:40:37 +0000 (21:40 -0700)]
CHROMIUM: video: exynos: remove redundant parameters

They're not needed.

BUG=none
TEST=build

Change-Id: I3b879e5093ff93d41c0225fb3a92dbf4996ae2c6
Signed-off-by: Olof Johansson <olof@lixom.net>
Reviewed-on: https://gerrit.chromium.org/gerrit/28917
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>

11 years agoCHROMIUM: input: cyapa: switch to async_schedule for detect and start
Olof Johansson [Tue, 3 Jul 2012 02:51:09 +0000 (19:51 -0700)]
CHROMIUM: input: cyapa: switch to async_schedule for detect and start

This speeds up boot since it's one of the long init functions.

BUG=chrome-os-partner:11403
TEST=boot

Change-Id: I7d005f95656510164b2368196b6b94884e77fc56
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28916
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
11 years agoARM: exynos: backlight: Init the backlight high
Sean Paul [Wed, 1 Aug 2012 23:04:18 +0000 (16:04 -0700)]
ARM: exynos: backlight: Init the backlight high

Initialize the backlight enable pin high so we don't drop the backlight
between u-boot and kernel.

BUG=None
TEST=Tested on snow, verified backlight was maintained through boot

Change-Id: I0bb7ee36277059f21821012ba255ed07fcaa0842
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28990
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: ALSA: hda/realtek - Ignore mic sense without headphones on Parrot.
Dylan Reid [Tue, 31 Jul 2012 20:28:32 +0000 (13:28 -0700)]
CHROMIUM: ALSA: hda/realtek - Ignore mic sense without headphones on Parrot.

Add an automic and automute hook for Parrot.  The mic hook checks if the
headphones are attached before checking the mic sense.  The mic sense
for Parrot reports "attached" when the combo jack is empty, this change
causes that to be ignored.  The automute hook is added so that the mic sense
will be checked when headphones state changes.

BUG=chrome-os-partner:11254
TEST=Call the echo bot with parrot plug/unplug headsets and mics.

Change-Id: Iee6c1a41c98b0829f6254ec2f9eacbead40d1468
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28869
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: ALSA: hda/realtek - Add automic hook.
Dylan Reid [Tue, 31 Jul 2012 18:48:51 +0000 (11:48 -0700)]
CHROMIUM: ALSA: hda/realtek - Add automic hook.

This hook mirrors the automute hook functionality, but for input
selection instead of output selection.  The hook will be used allow for
board specific mic routing behaviour.  On some machines the mic sense
signal is only valid if headphones are attached, this will allow for a
hook to filter mic sense events based on headphone jack state.

BUG=chrome-os-partner:11254
TEST=plug/unplug mic on parrot.

Change-Id: I01168baaa9ad9ee449eb8c2ac93e585f77f16065
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28844
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agodrm/exynos: pageflip_event_list accesses must be protected
Mandeep Singh Baines [Tue, 31 Jul 2012 22:43:05 +0000 (15:43 -0700)]
drm/exynos: pageflip_event_list accesses must be protected

We manipulate the list in a number of places and they are all protected
except for exynos_drm_crtc_page_flip.

BUG=none
TEST=Many Planets Deep

Change-Id: I715492631e2f0018182b8fc9856a469a565d903f
Reviewed-on: https://gerrit.chromium.org/gerrit/28868
Commit-Ready: Mandeep Singh Baines <msb@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Tested-by: Mandeep Singh Baines <msb@chromium.org>
11 years agodrm/exynos: HACK: return an error when flip called with event flag
Mandeep Singh Baines [Fri, 27 Jul 2012 18:20:55 +0000 (11:20 -0700)]
drm/exynos: HACK: return an error when flip called with event flag

The event flag to the page_flip ioctl is optional. If it is set,
an event will be sent to the drm fd after page flip is complete.
Otherwise, no event is sent after page flip. The exynos implementation
was doing nothing if the event flag was not set. This would
break any application expecting a page flip to happen. Rather than
do nothing (which is incorrect behavior), we'll now return and log
an error.

Rather than silently breaking applications, we'll return and log
an error so that we can detect anything that's broken.

This also removes one level of indenting, making the code easier to
read.

BUG=none
TEST=Verified that no errors were logged.

Change-Id: I31af40a392c89ea4386bfe38c00d79979aa9dc0b
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28853

11 years agodrm/exynos: Use 4WORD burstlen for cursorfb <= 64
Anush Elangovan [Tue, 31 Jul 2012 17:29:56 +0000 (10:29 -0700)]
drm/exynos: Use 4WORD burstlen for cursorfb <= 64

BUG=chrome-os-partner:12016
TEST=run on snow and see no hwcursor tearing while perf is
still the same (on many planets

Change-Id: I1d354f6ab9729eb50b37acfb2349ef4f2da49375
Signed-off-by: Anush Elangovan <anush@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28824
Reviewed-by: Abhinav Kochhar <abhinav@chromium.org>
Tested-by: Abhinav Kochhar <abhinav@chromium.org>
Tested-by: Anush Elangovan <anush@google.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Ready: Anush Elangovan <anush@google.com>

11 years agogpio: samsung: Clarify gpio powerdown-settings values
Jonathan Kliegman [Tue, 31 Jul 2012 20:34:04 +0000 (16:34 -0400)]
gpio: samsung: Clarify gpio powerdown-settings values

Clarify the 0 value for powerdown-settings to indicate it preserves
previously set values.

BUG=None
TEST=Kernel still compiles

Change-Id: I1b3373bad1b5f687cfa08060e5ab388610419639
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28847
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: Input: atmel_mxt_ts : Expose T38 object in debugfs
Yufeng Shen [Tue, 31 Jul 2012 19:22:54 +0000 (15:22 -0400)]
CHROMIUM: Input: atmel_mxt_ts : Expose T38 object in debugfs

We plan to use T38 (MXT_SPT_USERDATA object) to store device
specific information (e.g. sensor pattern information). This
CL exposes the T38 in debugfs so the userspace can query it to
get the device specific information.

Signed-off-by: Yufeng Shen <miletus@chromium.org>
BUG=chrome-os-partner:12059
TEST=cat /sys/kernel/debug/atmel_mxt_ts/2-004a/object
     and check that T38 data is present.

Change-Id: Ie773be9c7a1b7132aa51fd99021f426fe98960bb
Reviewed-on: https://gerrit.chromium.org/gerrit/28838
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Ready: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
11 years agoRevert "drm/exynos: Check for null dev_priv and return"
Mandeep Singh Baines [Tue, 31 Jul 2012 20:58:14 +0000 (13:58 -0700)]
Revert "drm/exynos: Check for null dev_priv and return"

This reverts commit 622b68598331d185f0c4e2cea1926f97e30a1676.

The reverted change did not actually fix the bug (since root-caused).
The change also introduced a compile warning.

BUG=none
TEST=Booted.

Change-Id: If6e5af465fcc0f6c512e0f795a8d91ad3b587906
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28850
Reviewed-by: Anush Elangovan <anush@google.com>
11 years agoCHROMIUM: tpm: Fix wrong parameter type warning in tpm_continue_selftest
Jonathan Kliegman [Tue, 31 Jul 2012 15:34:39 +0000 (11:34 -0400)]
CHROMIUM: tpm: Fix wrong parameter type warning in tpm_continue_selftest

Fix an incorrect typecast that was generating a warning calling
tpm_transmit_cmd

This warning was introduced in a CL that diverged from mainstream
so no change to upstream.

BUG=None
TEST=Compiler warnings went away, suspend/resume on snow works, trybot
  run.

Change-Id: I0ce191e74da1532ff04bf4b639dc2fb4ee448d48
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28815
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: tpm: Cleanup missing newlines in string constants
Jonathan Kliegman [Tue, 31 Jul 2012 15:12:46 +0000 (11:12 -0400)]
CHROMIUM: tpm: Cleanup missing newlines in string constants

A few dev_info strings are missing terminating newlines. Fix them.

Upstream does not have these strings in them so not upstreaming.

BUG=None
TEST=Booted, saw log message with proper newline

Change-Id: I77db2516e450de609cfb7e1608dc4e33113abca0
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28814
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoarm: exynos5: Pull i2c busses high on suspend
Jonathan Kliegman [Mon, 30 Jul 2012 23:22:46 +0000 (19:22 -0400)]
arm: exynos5: Pull i2c busses high on suspend

Set the i2c busses to be configured as input pins pulled up
on suspend.

BUG=chrome-os-partner:11846
TEST=Multiple suspend/resumes.  Ensure i2c devices aren't confused
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Change-Id: Iec2a7fb856e67b32b5ffa813880a9ceba99f1ed8
Reviewed-on: https://gerrit.chromium.org/gerrit/28640
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Jon Kliegman <kliegs@chromium.org>
Tested-by: Jon Kliegman <kliegs@chromium.org>
11 years agogpio: samsung: add flags for suspend conditions for gpios
Jonathan Kliegman [Mon, 30 Jul 2012 23:17:02 +0000 (19:17 -0400)]
gpio: samsung: add flags for suspend conditions for gpios

On suspend, gpio lines are driven active low by default.  This
extends the flags field for samsung,exynos4-gpio compatible
gpio chips to support specifying the suspend state of its gpios.

In addition modifying the saving of GPIO registers to only save
the CONPDN and PUDPDN registers for chips that indicate they support
it.

The information is passed through a new powerdown-settings property
in the GPIO chip configuration.  It specifies the state during powerdown
of each individual gpio as:
     0 - Use existing
     1 - Float (input, no PU/PD)
     2 - Pull up (input)
     3 - Pull down (input)
     4 - Output high
     5 - Output low

BUG=chrome-os-partner:11846
TEST=Suspend/resume multiple times, confirm state of pins
  from interaction with other components.
  Insert bad values, confirm proper error handling.
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Change-Id: Ife5e9070eaaf1fb5feec2d70623fddc5aea48613
Reviewed-on: https://gerrit.chromium.org/gerrit/28639
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Jon Kliegman <kliegs@chromium.org>
Tested-by: Jon Kliegman <kliegs@chromium.org>
11 years agoRevert "CHROMIUM: config: exynos5: Enable ADC and thermistor"
Jon Kliegman [Mon, 30 Jul 2012 23:42:05 +0000 (16:42 -0700)]
Revert "CHROMIUM: config: exynos5: Enable ADC and thermistor"

This reverts commit e3129054ac44022520e24c8948084de87a7d7a74

With this change in the tree suspend now causes the system to shutdown.

Change-Id: Iba2dca6349228fc0d3ef923c89b1a0c5b8091592
Reviewed-on: https://gerrit.chromium.org/gerrit/28739
Commit-Ready: Doug Anderson <dianders@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
11 years agoRevert "Revert "drm/exynos: KDS fix for performance at vsync""
Anush Elangovan [Mon, 30 Jul 2012 22:28:23 +0000 (15:28 -0700)]
Revert "Revert "drm/exynos: KDS fix for performance at vsync""

There is a race condition when we try to handle event from KDS callback.
When guest mode resumes, there is a cleanup of buffers and drm driver is closed. At this time if we were in the irq handler then we may crash while accessing the event list which would have been destroyed in close().
Need to add events in page_flip ioctl where spin locks ensure there is no race condition.

This reverts commit 7f639dfd3c1e7707cf31985a04f39b4e6b306e52

Change-Id: Ib9c1eaa71dc133949343fbd44ed7b3a9e6079df1
Reviewed-on: https://gerrit.chromium.org/gerrit/28732
Reviewed-by: Pawel Osciak <posciak@google.com>
Commit-Ready: Anush Elangovan <anush@google.com>
Tested-by: Anush Elangovan <anush@google.com>
11 years agoARM: exynos: dp: Move bridge init into phy init
Sean Paul [Fri, 27 Jul 2012 21:22:00 +0000 (14:22 -0700)]
ARM: exynos: dp: Move bridge init into phy init

Move the eDP bridge initialization code into the dp phy init function so
we run it both on startup and on resume. As a side-effect of this
change, we need to wait 90ms so we know the bridge chip has come out of
reset since the phy init is much closer to the HPD loop.

BUG=chrome-os-partner:11908
TEST=Tested on DVT and PVT snow

Change-Id: I3522b8aacd4a8cebc8bc230e81fe23b9afae02f2
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28626
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agodrm/exynos: dp: Lower AUX failure messages to dbg
Sean Paul [Fri, 27 Jul 2012 21:18:42 +0000 (14:18 -0700)]
drm/exynos: dp: Lower AUX failure messages to dbg

Change the level of Aux Transaction fail messages from error to debug.
We retry the transactions a few times and will report errors if
warranted outside of this function.

BUG=chrome-os-partner:11908
TEST=Tested on PVT and DVT snow

Change-Id: I8b636890d02d7e77308d78a3165925b7b7728fa1
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28625
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
11 years agoARM: exynos: snow: dts: Set DP gpios as outputs
Sean Paul [Mon, 30 Jul 2012 21:56:09 +0000 (14:56 -0700)]
ARM: exynos: snow: dts: Set DP gpios as outputs

Properly set the DP bridge gpios outputs in the snow device tree
file.

BUG=chrome-os-partner:11908
TEST=Tested on snow, ensured display came up properly

Change-Id: Idef088242557dc5c396190eb815e93fab58f4429
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28728
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoUPSTREAM: Input: gpio_keys - report a wakeup_event for a button press
NeilBrown [Mon, 30 Jul 2012 05:18:47 +0000 (22:18 -0700)]
UPSTREAM: Input: gpio_keys - report a wakeup_event for a button press

In order to avoid races with suspend, a wakeup event must register as
such by calling pm_wakeup_event() or pm_stay_awake().  This will ensure
that the current suspend cycle aborts.

When the user-space visible event is created in the interrupt handler
(gpio_keys_irq_isr), a simple pm_wakeup_event() with no delay is
sufficient as suspend will synchronise with all interrupt delivery.

When the user-space visible event is created later
(gpio_keys_gpio_isr), we need to bracket the event with
pm_stay_awake() and pm_relax().

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit 032169f6513ccf83f9ba30969528c48ee0555df6)
Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:11869
TEST=stop powerm
watch -n 0.1 cat /sys/power/wakeup_count
press the power button. close and open the lid.
Ensure that the wakeup_count rises on those inputs.
echo disabled > /sys/devices/gpio-keys.9/power/wakeup
watch -n 0.1 cat /sys/power/wakeup_count
Ensure that the wakeup_count does not rise with the wakeup disabled.

Change-Id: I8a700d8be0d3c6eda06afc3ee7047de5769ad953
Reviewed-on: https://gerrit.chromium.org/gerrit/28712
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
11 years agoCHROMIUM: i2c-i801: enable irq for Panther Point
Benson Leung [Mon, 30 Jul 2012 21:22:11 +0000 (14:22 -0700)]
CHROMIUM: i2c-i801: enable irq for Panther Point

Enable irq for byte by byte and block transactions on
Panther Point PCH as well as Cougar Point.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:11958
TEST=cat /proc/interrupts on parrot and link systems.
Check that i801_smbus appears on list of interrupts.
test smbus cyapa (parrot):
 1) is detected on both warm and cold boot.
 2) fw update takes ~15 seconds (was 95 sec)

Change-Id: Iae81aec7cdaadc9e385d82efb6a8d7068e637a77
Reviewed-on: https://gerrit.chromium.org/gerrit/28721
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
11 years agoHACK: tpm: Resume tpm chip after suspend
Jonathan Kliegman [Thu, 26 Jul 2012 23:32:27 +0000 (19:32 -0400)]
HACK: tpm: Resume tpm chip after suspend

The tpm chip is being reset accidentally on suspend/resume.  As
a temporary fix while more secure solutions are being worked on,
resume the tpm in the driver instead of firmware.

TEST=tpmc rand 5 worked post-resume.
BUG=chrome-os-partner:11639

Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Change-Id: I84ff9858e60d0c8d45b96bca28b483d13a2a4271
Reviewed-on: https://gerrit.chromium.org/gerrit/28534

11 years agoARM: SAMSUNG: Save drive and powerdown gpio registers
Jonathan Kliegman [Fri, 27 Jul 2012 14:24:06 +0000 (10:24 -0400)]
ARM: SAMSUNG: Save drive and powerdown gpio registers

On suspend the GPIOs are all set based on GPxxCONPDN and
GPxxPUDPDN registers.  Make sure these get saved and restored.

Save the GPxxDRV registers as well.

BUG=chrome-os-partner:11846
TEST=Did multiple suspends, confirmed configured gpios
  stayed correct.
  Visually confirmed from debug output DRV register persists.
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Change-Id: I600ed0a201e28873f5454d65ef092affe46b5716
Reviewed-on: https://gerrit.chromium.org/gerrit/28619
Commit-Ready: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
Tested-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: config: exynos5: Enable ADC and thermistor
Naveen Krishna Chatradhi [Mon, 30 Jul 2012 11:19:14 +0000 (20:19 +0900)]
CHROMIUM: config: exynos5: Enable ADC and thermistor

Enable support for Samsung's s3c-adc driver and NTC thermistor
driver.

BUG=chrome-os-partner:11688
TEST=With future CL to add thermistors, can cat the sysfs
entry for each hwmon representing the thermistors:
  localhost ~ # cat /sys/class/hwmon/hwmon1/device/temp1_input
  61542

Change-Id: Ia0cc8b8e9cb27e00699531c22f3d691518d7e9be
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27152

11 years agoCHROMIUM: ARM: cros5250: add vdd regulator
Naveen krishna Chatradhi [Wed, 11 Jul 2012 10:56:48 +0000 (16:26 +0530)]
CHROMIUM: ARM: cros5250: add vdd regulator

This is used by the ADC driver (among other things) which probes
regulator "vdd". Adding the same under MAX77686.

BUG=chrome-os-partner:11688
TEST=BUCK5 value is configured as per the schematics

Change-Id: Ic1b1efc7455f1f788657984df72e2587e6fdaaf6
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Naveen krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27148
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: ath9k: Do not divide by zero cycle counter
Paul Stewart [Fri, 27 Jul 2012 23:14:46 +0000 (16:14 -0700)]
CHROMIUM: ath9k: Do not divide by zero cycle counter

cc_rxpoll.cycles can be zero under certain circumstances.
Skip this round of rx hang detection when this happens.

Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chromium-os:32956
TEST=Reboot system.  Still waiting to see this message.

Change-Id: Id0a6d4b01137af4c36a27424615c30c52ed05fd8
Reviewed-on: https://gerrit.chromium.org/gerrit/28642
Reviewed-by: Simon Que <sque@chromium.org>
Reviewed-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agogpu: vithar: Set aclk_400_g3d as the source for GPU
Abhilash Kesavan [Sun, 29 Jul 2012 05:40:33 +0000 (11:10 +0530)]
gpu: vithar: Set aclk_400_g3d as the source for GPU

To run at 533MHz set aclk_400_g3d to be the source clock
for the GPU.

BUG=chrome-os-partner:11853
TEST=Verify that "cat /sys/devices/platform/mali-t604.0/clock shows
     533 MHz (after applying Sam Leffler's Iae7ae43c: ARM MALI:
     Cleanup sysfs support.)

Change-Id: If018bddbdf77d33192b2ebda9eb37584e45767c6
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/28671
Reviewed-by: Anush Elangovan <anush@google.com>
Commit-Ready: Anush Elangovan <anush@google.com>
Tested-by: Anush Elangovan <anush@google.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoarm: exynos5: Fix the g3d clock hierarchy
Abhilash Kesavan [Sun, 29 Jul 2012 05:32:25 +0000 (11:02 +0530)]
arm: exynos5: Fix the g3d clock hierarchy

As per Pg445 of Exynos_5250_SCP_UM_REV1.00, to setup an initial
frequency of 533MHz for the G3D block we need to have the parent
source clock of MOUTACLK_400_G3D as sclk_gpll and the divisor
register as 0. Fix the clock hierarchy for the same.

BUG=chrome-os-partner:11853
TEST=Build and boot Snow.
     1) Verify that ACLK400G3D print at bootup shows 533MHz.
     2) Verify CLK_SRC_TOP1[28], CLK_SRC_TOP2[28] and CLK_DIV_TOP0[24]
     bits are set appropriately for 533 MHz (1, 1, 0).
     3) Verify that "cat /sys/devices/platform/mali-t604.0/clock shows
     533 MHz (after applying Sam Leffler's Iae7ae43c: ARM MALI: Cleanup
     sysfs support.)

Change-Id: Ib1e9631bc1232f0df590ece5b9c5770aca1801e3
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/28489
Reviewed-by: Anush Elangovan <anush@google.com>
Commit-Ready: Anush Elangovan <anush@google.com>
Tested-by: Anush Elangovan <anush@google.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agomedia: s5p-mfc: propagate flags when setting up private controls.
Pawel Osciak [Sat, 28 Jul 2012 00:19:34 +0000 (17:19 -0700)]
media: s5p-mfc: propagate flags when setting up private controls.

V4L2_CID_MPEG_MFC51_VIDEO_CHECK_STATE is a read-only control and has to be
initialized as one, otherwise the v4l2 code that initially sets controls
to their default values will call s_ctrl for it and the driver will
complain that a read-only control is being modified.

Signed-off-by: Pawel Osciak <posciak@chromium.org>
BUG=none
TEST=manual run

Change-Id: I8b552201df5e09678f21298e82ef6f2c8a584a53
Reviewed-on: https://gerrit.chromium.org/gerrit/28647
Tested-by: Pawel Osciak <posciak@chromium.org>
Reviewed-by: Sunil Mazhavanchery <sunilm@samsung.com>
Reviewed-by: Bibhuti Bhusan Panigrahi <bibhuti.p@samsung.com>
Tested-by: Bibhuti Bhusan Panigrahi <bibhuti.p@samsung.com>
Reviewed-by: kiran <kiran@chromium.org>
Tested-by: kiran <kiran@chromium.org>
Reviewed-by: Naveen Krishna Chatradhi <naveen@chromium.org>
Commit-Ready: Pawel Osciak <posciak@google.com>
Tested-by: Pawel Osciak <posciak@google.com>
11 years agomwifiex: Change some debug logging to info logging
Gary Morain [Fri, 27 Jul 2012 16:56:08 +0000 (09:56 -0700)]
mwifiex: Change some debug logging to info logging

Some issues occur infrequently and more logging is required
to diagnose them.  This patch changes some debug logging to
info logging.

BUG=chrome-os-partner:11586
TEST=Build and boot kernel.

Change-Id: I460374061eab32ea3b978eb9d6e39f9b0a4c726a
Signed-off-by: Gary Morain <gmorain@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28596
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agoRevert "drm/exynos: dp: Disable DP scrambling"
Sean Paul [Fri, 27 Jul 2012 20:23:44 +0000 (13:23 -0700)]
Revert "drm/exynos: dp: Disable DP scrambling"

People are reporting much worse glitching while using Chrome, seems
like this patch aggrevates it. Reverting until we know why.

This reverts commit e0547c7cc8eefd095e09fec19ab1b3f34adb3d38

Change-Id: I47c208b10f1e5441387cc3da6af7638a435458fc
Reviewed-on: https://gerrit.chromium.org/gerrit/28618
Reviewed-by: Anush Elangovan <anush@google.com>
Tested-by: Sean Paul <seanpaul@chromium.org>
Commit-Ready: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
11 years agoCHROMIUM: Input: cyapa - support left/right/middle physical buttons
Du, Dudley [Tue, 17 Jul 2012 02:23:03 +0000 (10:23 +0800)]
CHROMIUM: Input: cyapa - support left/right/middle physical buttons

Set bits for BTN_RIGHT, BTN_MIDDLE, and BTN_LEFT if the trackpad
reports each button in its capabilities.

Signed-off-by: Du, Dudley <dudl@cypress.com>
Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:11753
TEST=Test on butterfly platform. Verify that Left and Right buttons
are correctly reported when clicked and testing with mtplot/evtest.
Verify that right click generates a context menu in Chrome OS.

Change-Id: I60c22d2110feea8815aee4104fd013f129c89dc9
Reviewed-on: https://gerrit.chromium.org/gerrit/27704
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Commit-Ready: Benson Leung <bleung@chromium.org>

11 years agodrm/exynos: dp: Disable DP scrambling
Sean Paul [Fri, 27 Jul 2012 06:53:20 +0000 (23:53 -0700)]
drm/exynos: dp: Disable DP scrambling

Displayport scrambling is causing screen glitches/corruption when the
device is under heavy load. This requires investigation into why it's
happening, but let's disable it until we can fix it the right way.

BUG=chrome-os-partner:11834
TEST=Tested by running 2 instances of "dd if=/dev/zero of=/dev/null"

Change-Id: I513406e1a96d762363af1ac8d831481dd877a643
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28578
Reviewed-by: Anush Elangovan <anush@google.com>
11 years agodrm/exynos: Check for null dev_priv and return
Anush Elangovan [Fri, 27 Jul 2012 03:39:15 +0000 (20:39 -0700)]
drm/exynos: Check for null dev_priv and return

During suspend resume we seem to be getting a NULL dev_priv
Good to check and return when null.

BUG=none
TEST=Crash is hard to reproduce tried 10 times. But hopefully
wont happen

Change-Id: I2c99e86103bc23f7b62f417e48232c98d6eca176
Signed-off-by: Anush Elangovan <anush@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28568
Reviewed-by: Pawel Osciak <posciak@google.com>
Commit-Ready: Anush Elangovan <anush@google.com>
Tested-by: Anush Elangovan <anush@google.com>
11 years agoCHROMIUM: ARM: exynos: add sata clock
Taylor Hutt [Wed, 27 Jun 2012 17:44:45 +0000 (10:44 -0700)]
CHROMIUM: ARM: exynos: add sata clock

Add clock definition for 'sclk_sata'.

TEST=Kernel compiles
BUG=none
Signed-off-by: Taylor Hutt <thutt@chromium.org>
Change-Id: Ibb720d0eb55057bca80c07b649c8ec9113faa0b9
Reviewed-on: https://gerrit.chromium.org/gerrit/26474
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: cpufreq_interactive: merge up/down work
Sam Leffler [Mon, 9 Jul 2012 17:41:07 +0000 (10:41 -0700)]
CHROMIUM: cpufreq_interactive: merge up/down work

Down-clocking was being done in a workqueue but there is already a
realtime task for handling up-clocking: do both in the task and remove
the workqueue.  This eliminates conflicts and the mtx that guarded
frequency/clock changes.  As a side-effect input handler registration
is now done on the system workqueue.

While here also move the updown state mtx so that pcpu data
are correctly synchronized between cpufreq_interactive_boost and
cpufreq_interactive_timer (handling cpufreq_interactive_updown_task is
more difficult and may not matter).

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=none
TEST=run workloads and examine event traces

Change-Id: I84937df032287c925499d88bbdd2931f213ac1b9
Reviewed-on: https://gerrit.chromium.org/gerrit/27096
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>

11 years agoARM MALI: add mali trace events for dvfs
Sam Leffler [Wed, 25 Jul 2012 20:02:27 +0000 (13:02 -0700)]
ARM MALI: add mali trace events for dvfs

Add trace events for dvfs event handling, voltage and clock changes.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=none
TEST=enable dvfs and collect trace data

Change-Id: Ibf9d239462b5d1517a842086cc2aabb7024544b9
Reviewed-on: https://gerrit.chromium.org/gerrit/28438
Commit-Ready: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
11 years agoAdded support for VIDEO_CHECK_STATE in mfc driver
bibhuti [Fri, 13 Jul 2012 14:32:29 +0000 (20:02 +0530)]
Added support for VIDEO_CHECK_STATE in mfc driver

Added V4L2_CID_MPEG_MFC51_VIDEO_CHECK_STATE config in g_ctrl
ioctl so that application can get the state by calling
v4l2_mfc_g_ctrl.

BUG=None
TEST= Tested with VDA test application.

Change-Id: I20e618443ca87803804b2ae1dbe0dcb6c2127627
Signed-off-by: Bibhuti Bhusan Panigrahi <bibhuti.p@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/27364
Reviewed-by: Pawel Osciak <posciak@google.com>
Commit-Ready: Kiran Avnd <kiran@chromium.org>

11 years agoUPSTREAM: usb: dwc3: core: split host address space
Ido Shayevitz [Tue, 24 Apr 2012 11:18:39 +0000 (14:18 +0300)]
UPSTREAM: usb: dwc3: core: split host address space

This fix prevents a problem with dwc3 and host mode where
we were requesting the entire memory region in dwc3/core.c,
thus preventing xhci-plat from ever ioremapping its own address space.

Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Cherry-picking from 'master' branch of 3.5rc7
(cherry picked from commit 51249dca627d9d0e6b41531e716cbc308554a62c)

BUG=chrome-os-partner:9771
TEST=emerge-daisy chromeos-kernel; booted kernel
and tested with USB 2.0 and USB 3.0 MSD and USB HID.

Change-Id: I280bf83c84fee4c923d8ff1cc0af5c23bf5c6929
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/28382
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>

11 years agoRevert "usb: exynos: hack: Removing code for mem request for xhci"
Vivek Gautam [Wed, 25 Jul 2012 09:14:20 +0000 (05:14 -0400)]
Revert "usb: exynos: hack: Removing code for mem request for xhci"

This reverts commit d1dbd1a237f12ba274578578892c3505f03b081c.

Reverting this CL since it is fixed in upstream.

BUG=chrome-os-partner:9771
TEST=emerge-daisy chromeos-kernel; booted kernel
and tested with USB 2.0 and USB 3.0 MSD and USB HID.

Change-Id: I057cadb1966accb545318d82d4aa5e3b53270233
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/28381
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>

11 years agoCHROMIUM: ASoC: samsung: Route clocks to i2s.
Dylan Reid [Thu, 26 Jul 2012 00:28:37 +0000 (17:28 -0700)]
CHROMIUM: ASoC: samsung: Route clocks to i2s.

Configure the clocks so that the i2s block is driven with a clock that
can be divided to the current audio frequency.  The rate of epll is
already being adjusted to match the frame rate, but epll was not being
configured to drive the audio clocks.  At init, set the clock muxes to
route epll through the muxes.  This fixes audio on Daisy playing back
too fast (6% fast for 44.1, almost 2x for 48k).

BUG=chrome-os-partner:11225
TEST=Play sine waves of various frequencies and check they are rendered
correctly with a spectrum analyzer.

Change-Id: I46c5f466088a825942931007b49fcde2e40e9fc6
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28453
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: ath9k: fix dynamic WEP related regression
Felix Fietkau [Sat, 23 Jun 2012 17:23:31 +0000 (19:23 +0200)]
UPSTREAM: ath9k: fix dynamic WEP related regression

commit 7a532fe7131216a02c81a6c1b1f8632da1195a58
ath9k_hw: fix interpretation of the rx KeyMiss flag

This commit used the rx key miss indication to detect packets that were
passed from the hardware without being decrypted, however it seems that
this bit is not only undefined in the static WEP case, but also for
dynamically allocated WEP keys. This caused a regression when using
WEP-LEAP.

This patch fixes the regression by keeping track of which key indexes
refer to CCMP keys and only using the key miss indication for those.

Reported-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
(cherry picked from commit bed3d9c0b71f9afbfec905cb6db3b9f16be29d4d)

Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chromium-os:32941
TEST=Autotest network_WiFiSecMat/003CheckWEP_8021x

Change-Id: I32698eab7ddb0ae59bb32aea952d8b3242fac077
Reviewed-on: https://gerrit.chromium.org/gerrit/28400
Reviewed-by: Gary Morain <gmorain@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>

11 years agodrm/exynos: Release KDS resource before dmabuf
Abhinav Kochhar [Wed, 25 Jul 2012 23:00:30 +0000 (16:00 -0700)]
drm/exynos: Release KDS resource before dmabuf

Release current KDS resource before its corresponding
dmabuf release.

BUG=chrome-os-partner:11637
TEST=build and run on system without "KDS resource in use" msg

Change-Id: I6d5d1c832e0d8612e0f586d99209a95992cfbd14
Signed-off-by: Anush Elangovan <anush@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28440
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Commit-Ready: Anush Elangovan <anush@google.com>
Tested-by: Anush Elangovan <anush@google.com>
11 years agoCHROMIUM: Input: cyapa - Disable runtime PM
Benson Leung [Mon, 23 Jul 2012 23:09:56 +0000 (16:09 -0700)]
CHROMIUM: Input: cyapa - Disable runtime PM

Disable runtime pm to prevent the use of low power modes at
runtime. Firmware 11.22 on Lumpy incorrectly handles unrelated
i2c traffic when in IDLE state, potentially wedging the
SMBUS until powered down.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:10550
TEST=Boot system.
check /sys/bus/i2c/devices/7-0067/power
check that runtime_suspend_scanrate_ms does not exist.

Change-Id: I7758837bac0f109f500baf2543e98275721e7445
Reviewed-on: https://gerrit.chromium.org/gerrit/28221
Reviewed-by: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Commit-Ready: Benson Leung <bleung@chromium.org>

11 years agoCHROMIUM: Input: cyapa - Set active at probe and at cyapa_resume
Benson Leung [Wed, 25 Jul 2012 06:01:13 +0000 (23:01 -0700)]
CHROMIUM: Input: cyapa - Set active at probe and at cyapa_resume

pm_runtime_set_active should be called before pm_runtime_enable
in cyapa_start_runtime to reflect the initial state of FULL_ACTIVE
as set by cyapa_detect.

Also, at resume time, we should also pm_runtime_set_active to
reflect the transition to FULL_ACTIVE by cyapa_resume.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chromium-os:32929
TEST=Add a debug message in set_power_mode, and verify that
at init, and at resume time, we set to an IDLE state
shortly after setting to FULL_ACTIVE.

Change-Id: Id80ab31c7bff777f6907e4804512da6e165359cd
Reviewed-on: https://gerrit.chromium.org/gerrit/28361
Reviewed-by: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Commit-Ready: Benson Leung <bleung@chromium.org>

11 years agoMALI: Set the mali voltage to 1.25V
Anush Elangovan [Wed, 25 Jul 2012 17:54:39 +0000 (10:54 -0700)]
MALI: Set the mali voltage to 1.25V

Define CONFIG_T6XX_HWVER_R0P0 since we use hwver r0p0
For now retain the clock setup that we have been using

BUG=chrome-os-partner:11818
TEST=build and verify on running system

localhost regulator.13 # cat /sys/class/regulator/regulator.13/name
vdd_g3d
localhost regulator.13 # cat /sys/class/regulator/regulator.13/microvolts
1250000

Change-Id: If89232ea2444fc1ff70f96c64590023243a49f0e
Signed-off-by: Anush Elangovan <anush@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28408
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Anush Elangovan <anush@google.com>
Tested-by: Anush Elangovan <anush@google.com>
11 years agoi915: Use 120MHz LVDS SSC clock for gen5/gen6/gen7
Duncan Laurie [Tue, 24 Jul 2012 16:59:16 +0000 (09:59 -0700)]
i915: Use 120MHz LVDS SSC clock for gen5/gen6/gen7

We had been using a DMI table workaround to select the right
frequency for devices, but this is fragile and must be updated
with every new platform.

Instead the default case when VBT is missing is changed to use
120MHz clock for LVDS SSC for these generations.

The docs for 2010-Core, SandyBridge, and IvyBridge all indicate
that the reference frequency for LVDS is 120MHz:

"2010 Core"
http://intellinuxgraphics.org/IHD_OS_Vol3_Part3r2.pdf
page 38
Reference Frequency: 120MHz for CRT and LVDS.  100MHz for the FDI.

"2011 SandyBridge"
http://intellinuxgraphics.org/documentation/SNB/IHD_OS_Vol3_Part3.pdf
page 33
Reference Frequency: 120MHz for CRT, HDMI, LVDS.  100MHz for the FDI.

"2012 IvyBridge"
http://intellinuxgraphics.org/documentation/IVB/IHD_OS_Vol3_Part4.pdf
page 27
Reference Frequency: 120 MHz for CRT, HDMI, LVDS, 100MHz for the FDI.

BUG=chrome-os-partner:11744
TEST=manual: boot on Lumpy and Parrot with and without VBIOS

Change-Id: Ieae3d37d4a5f6eb11c45a5e2fa76b0c106404e69
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28274
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
11 years agoRevert "arm: exynos5: Add NTC Thermistor attached to S3C-ADC"
Hung-Te Lin [Wed, 25 Jul 2012 09:42:38 +0000 (17:42 +0800)]
Revert "arm: exynos5: Add NTC Thermistor attached to S3C-ADC"

This reverts commit 5f5d100942e2482c63645c95c59fff9897f403a7.

Using s3c_adc_read must define CONFIG_S3C_ADC in corresponding kernel
configuration files, otherwise all exynos5 family builds would fail.

BUG=chromium-os:32934
TEST=emerge-daisy chromeos-kernel # pass

Change-Id: I6a142bd62e26474a4bed633201e304e522982b27
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28379
Reviewed-by: Brian Harring <ferringb@chromium.org>
11 years agohwmon: ntc_thermistor: Modify read_uV amd read_ohm function prototypes
Abhilash Kesavan [Fri, 13 Jul 2012 06:25:06 +0000 (11:55 +0530)]
hwmon: ntc_thermistor: Modify read_uV amd read_ohm function prototypes

Add a pdev parameter to the read_uV and read_ohm call-backs to handle
multiple thermistor support. (Modifications implemented by Grant Grundler)

BUG=None
TEST=Temperature is read using the sysfs entries in NTC Thermistor
driver: cat /sys/class/hwmon/hwmonX/device/temp1_input

Change-Id: I463b009354ee7f20bb15a0447c87223aefa8b59d
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27277
Tested-by: naveen krishna chatradhi <naveen@chromium.org>
Commit-Ready: Naveen Krishna Chatradhi <naveen@chromium.org>

11 years agoarm: exynos5: Add NTC Thermistor attached to S3C-ADC
Abhilash Kesavan [Fri, 13 Jul 2012 06:46:43 +0000 (12:16 +0530)]
arm: exynos5: Add NTC Thermistor attached to S3C-ADC

This patch allows platform configurations to share information about
the NTC thermistor device attached to ADC port of S3C.

A platform configuration is required to initialize the ADC port for NTC
thermistor by calling "s3c_adc_ntc_init(pdev);" before registering the
NTC thermistor device. Then, registering a platform device,
s3c_device_adc_ntc_thermistor enables NTC thermistor for the platform.
(Modifications implemented by Grant Grundler)

BUG=None
TEST=Temperature is read using the sysfs entries in NTC Thermistor
driver: cat /sys/class/hwmon/hwmonX/device/temp1_input

Change-Id: Ifbe91202213f2dda589d2ca9d3e99eea43f1508e
Signed-off-by: Naveen krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27150
Tested-by: naveen krishna chatradhi <naveen@chromium.org>
Commit-Ready: Naveen Krishna Chatradhi <naveen@chromium.org>

11 years agoUPSTREAM: usb: dwc3: Fix the dwc3 dependency
joseph daniel [Fri, 11 May 2012 10:23:40 +0000 (15:53 +0530)]
UPSTREAM: usb: dwc3: Fix the dwc3 dependency

The warning shown up when ran with randconfig,

warning: (USB_DWC3) selects USB_XHCI_PLATFORM which has unmet direct dependencies (USB_SUPPORT && USB_XHCI_HCD)

Signed-off-by: joseph daniel <josephdanielwalter@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cherry-picking from 'master' branch of 3.5rc7
(cherry picked from commit b8cacf33f09c60208a914b36b3e6de8e9ba228d5)

Change-Id: I757a3cee918fa11581c86f8fc59993e24a8ca741
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/27750
Commit-Ready: Doug Anderson <dianders@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
11 years agoARM: exynos: mct: mark exynos4_read_sched_clock notrace
Colin Cross [Tue, 17 Jul 2012 08:23:14 +0000 (01:23 -0700)]
ARM: exynos: mct: mark exynos4_read_sched_clock notrace

Mark exynos4_read_sched_clock notrace to prevent infinite recursion as
soon as function_graph tracing is turned on, leading to a crash.

Signed-off-by: Colin Cross <ccross@android.com>
BUG=chromium-os:32890
TEST=boot kernel and echo function_graph > /sys/kernel/debug/tracing/current_tracer

Change-Id: I829e7abc1ffa7b140c983b0e8f9fa26c728ceac5
Reviewed-on: https://gerrit.chromium.org/gerrit/28091
Tested-by: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>

11 years agoCHROMIUM: chromeos platform: ramoops OF fix
Olof Johansson [Tue, 24 Jul 2012 04:56:21 +0000 (21:56 -0700)]
CHROMIUM: chromeos platform: ramoops OF fix

Removes a warning at boot time due to multiple calls; once when
the platform_device is registered, another when the of-probed version
comes along.

Skip the regular platform device when OF is enabled.

BUG=none
TEST=boot, check for warnings.

Change-Id: I7d9edf9bf91342a5e1f5ab8bf3a489ffd355c2d3
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28245
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-by: Bryan Freed <bfreed@chromium.org>
11 years agoCHROMIUM: config/base: Enable Multi LUNs support on SCSI
Vivek Gautam [Tue, 17 Jul 2012 14:26:40 +0000 (10:26 -0400)]
CHROMIUM: config/base: Enable Multi LUNs support on SCSI

This patch enables CONFIG_SCSI_MULTI_LUN in chromium base config.

Note:Some devices support more than one LUN (Logical Unit Number)
in order to allow access to several media, e.g. CD jukebox,
USB cardreader, mobile phone in mass storage mode.
This option forces the kernel to probe for all LUNs by default.

BUG=none
TEST=emerge-daisy chromeos-kernel; successful detection of
SD card + micro SD card in 3-1 card reader.

Change-Id: I9befaee8adaf7b133303df6ea7abe095717ada5a
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/27641
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>

11 years agoARM: sched_clock: update epoch_cyc on resume
Colin Cross [Tue, 17 Jul 2012 23:27:51 +0000 (16:27 -0700)]
ARM: sched_clock: update epoch_cyc on resume

[olofj: This patch has been posted for upstream but not yet acked/picked
up by Russell. We're picking it up in our tree meanwhile:

http://marc.info/?i=1342567672-29071-1-git-send-email-ccross@android.com

]

Many clocks that are used to provide sched_clock will reset during
suspend.  If read_sched_clock returns 0 after suspend, sched_clock will
appear to jump forward.  This patch resets cd.epoch_cyc to the current
value of read_sched_clock during resume, which causes sched_clock() just
after suspend to return the same value as sched_clock() just before
suspend.

In addition, during the window where epoch_ns has been updated before
suspend, but epoch_cyc has not been updated after suspend, it is unknown
whether the clock has reset or not, and sched_clock() could return a
bogus value.  Add a suspended flag, and return the pre-suspend epoch_ns
value during this period.

This will have a side effect of causing SoCs that have clocks that
continue to count in suspend to appear to stop counting, reporting the
same sched_clock() value before and after suspend.

BUG=chrome-os-partner:11461
TEST=boot, powerd_suspend + resume, check dmesg timestamps

Change-Id: I664c6beaa066972a0e1a891daee7062a16089b4b
From: Colin Cross <ccross@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28243
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: iio: isl29018: Read lux msb and lsb in one transaction
Daniel Kurtz [Mon, 23 Jul 2012 11:31:22 +0000 (19:31 +0800)]
CHROMIUM: iio: isl29018: Read lux msb and lsb in one transaction

The lux value is a two byte quantity, located at consecutive addresses.
Reading both bytes in a single transaction saves 3 bytes of i2c overhead.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:32838
TEST=cat /sys/bus/i2c/devices/7-0044/iio\:device0/in_illuminance0_input
TEST=reports entire range of lux values: 0-1000 (dark to bright light)

Change-Id: Ic3217ef5c514e529f8b5f2de8edc03f6831eb834
Reviewed-on: https://gerrit.chromium.org/gerrit/28168
Reviewed-by: Rhyland Klein <rklein@nvidia.com>
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoarm: exynos5: Add ADC device support
Abhilash Kesavan [Fri, 13 Jul 2012 06:41:45 +0000 (12:11 +0530)]
arm: exynos5: Add ADC device support

Add platform device definition and enable ADC on EXYNOS5.

BUG=None
TEST=ADC probe succeeds

Change-Id: I723e3310a90f24732014b964d0712f5025566986
Signed-off-by: Naveen krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/27151
Tested-by: naveen krishna chatradhi <naveen@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Commit-Ready: Naveen Krishna <naveen@chromium.org>

11 years agosamsung: adc: Add ADCv4 support for Exynos5
Naveen krishna Chatradhi [Wed, 11 Jul 2012 10:56:14 +0000 (16:26 +0530)]
samsung: adc: Add ADCv4 support for Exynos5

EXYNOS5 has v4 version of ADC. Modify the existing adc driver
to support the same.

BUG=None
TEST=ADC device is probed as "samsung-adc-v4".

Change-Id: I2ab9560978e8ffe87fad795056bde3c2cac3b3be
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/27147
Tested-by: naveen krishna chatradhi <naveen@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Commit-Ready: Naveen Krishna <naveen@chromium.org>

11 years agoarm: exynos5: add ADC clock support
Naveen krishna Chatradhi [Wed, 11 Jul 2012 10:57:26 +0000 (16:27 +0530)]
arm: exynos5: add ADC clock support

Add support for clock instance for ADC

BUG=None
TEST=ADC clock is added as per the user manual

Change-Id: I3521c521e039a2a9615b0397b8d09729223fcfc2
Signed-off-by: Naveen krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/27149
Tested-by: naveen krishna chatradhi <naveen@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Commit-Ready: Naveen Krishna <naveen@chromium.org>

11 years agoRevert "drm/exynos: KDS fix for performance at vsync"
Anush Elangovan [Mon, 23 Jul 2012 22:02:28 +0000 (15:02 -0700)]
Revert "drm/exynos: KDS fix for performance at vsync"

This reverts commit 6684ad7d8b7994d6f1ef255d6caff34ece7a247f

We are reverting this since we see some unexplained X behaviour and to be on the safe side are going to revert this change to rule it out.

Change-Id: I7f639dfd3c1e7707cf31985a04f39b4e6b306e52
Reviewed-on: https://gerrit.chromium.org/gerrit/28207
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Ready: Anush Elangovan <anush@google.com>
Tested-by: Anush Elangovan <anush@google.com>
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoCHROMIUM: gobi: Add Option GTM681W and GTM689W Gobi modem support.
Ben Chan [Wed, 27 Jun 2012 16:55:09 +0000 (09:55 -0700)]
CHROMIUM: gobi: Add Option GTM681W and GTM689W Gobi modem support.

BUG=chrome-os-partner:11513
TEST=Tested the following:
1. emerge-{x86,amd64,arm}-generic chromeos-kernel
2. Manually test modem support for Option GTM681W and GTM689W module.

Change-Id: I3ebb8576bf85031afd84319203e8f5d1c9e5469d
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28185

11 years agoCHROMIUM: gpio: Add PantherPoint NM70 and HM70 device IDs
Duncan Laurie [Mon, 23 Jul 2012 18:17:33 +0000 (11:17 -0700)]
CHROMIUM: gpio: Add PantherPoint NM70 and HM70 device IDs

These are used by upcoming devices and without it crossystem is
unable to read GPIO values on the chipset.

BUG=chrome-os-partner:11540,chrome-os-partner:11323
TEST=manual test on Parrot device

1) Verify that a GPIO can be exported and read:
> echo $(( 160 + 70 )) > /sys/class/gpio/export
> cat /sys/class/gpio/gpio$(( 160 + 70 ))/value
0

2) Verify that crossystem does not report any errors:
> crossystem | grep -c error
0

Change-Id: Iebdc2396bf401c6df6b7802cbd05832b53f0e0c3
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28183
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
11 years agoCHROMIUM: gobi: use IMEI when MEID is not available
Ben Chan [Wed, 18 Jul 2012 17:30:53 +0000 (10:30 -0700)]
CHROMIUM: gobi: use IMEI when MEID is not available

The previous CL (https://gerrit.chromium.org/gerrit/11700) changes the
Gobi kernel driver to return an error if MEID is not available. That
prevents the driver from supporting modems without a MEID. This CL
changes the driver to obtain both MEID and IMEI from a modem and use
IMEI when MEID is not available.

BUG=chromium-os:32690
TEST=Tested the following:
1. emerge-{x86,amd64,arm}-generic chromeos-kernel
2. Verify that the driver handles modems with and without a MEID.

Change-Id: I2624f22022e406ebfd3d6dea767fa7a3b3944dfc
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27784
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agoath9k/ath9k_htc: fix txop limit handling
Felix Fietkau [Sun, 15 Jul 2012 17:53:34 +0000 (19:53 +0200)]
ath9k/ath9k_htc: fix txop limit handling

In all those years apparently nobody noticed that the txop limit programmed
into the chip was off by a factor of 32 (!), probably because the VI and VO
queues aren't used that much aside from mgmt frames on VO.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chrome-os-partner:10078
TEST=Associate and speed test

Change-Id: I553dbc55af0fef72829b382f12066bfdb38d83eb
Reviewed-on: https://gerrit.chromium.org/gerrit/28180
Reviewed-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agoath9k: fix a use-after-free-bug when ath_tx_setup_buffer() fails
Felix Fietkau [Thu, 24 May 2012 12:32:20 +0000 (14:32 +0200)]
ath9k: fix a use-after-free-bug when ath_tx_setup_buffer() fails

ath_tx_setup_buffer() can fail if there is no ath_buf left, or if mapping DMA
failed. In this case it frees the skb passed to it.
If ath_tx_setup_buffer is called from ath_tx_form_aggr, the skb is still
linked into the tid buffer list and must be dequeued before being released.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chrome-os-partner:10078
TEST=Associate and speed test

Change-Id: Ib62ccae62cf61953048a4c4d3ad24bccce91db55
Reviewed-on: https://gerrit.chromium.org/gerrit/28179
Reviewed-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agoath9k_hw: do not load noise floor readings when it is running
Rajkumar Manoharan [Sun, 1 Jul 2012 14:23:52 +0000 (19:53 +0530)]
ath9k_hw: do not load noise floor readings when it is running

Noise floor calibration is performed on longcal interval and
the reading will be updated in history buffer. On rare occasions,
the previous noisefloor calibration might not be completed within
the period and trying to load nf reading will be failed. In such
situation, postpone the nf cabliration to next cycle to give
enough time to complete the calibration. This was already taken
care for ar9002 chips.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chrome-os-partner:10078
TEST=Associate and speed test

Change-Id: I44c536e46a51bc3cec630b9a09af20870821e6ec
Reviewed-on: https://gerrit.chromium.org/gerrit/28178
Reviewed-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agoath9k: fix ANI operation in AP mode
Felix Fietkau [Wed, 27 Jun 2012 12:58:19 +0000 (14:58 +0200)]
ath9k: fix ANI operation in AP mode

ath9k_ani_reset (which is called at reset time) uses a state variable
ani->update_ani to prevent the ANI noise immunity state on the operating
channel from being overwritten by background scans. Unfortunately this
is also being set for AP mode, since it's mixed with code that is only
supposed to change the default settings after a reset.

In AP mode this has the side effect of having ANI run, but being unable to
change its runtime noise immunity level, making it effectively useless.

Fix this by getting rid of ani->update_ani and passing a parameter to
ath9k_hw_set_ofdm_nil and ath9k_hw_set_cck_nil instead.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chrome-os-partner:10078
TEST=Associate and speed test

Change-Id: I996a88cb430276374433e8486aed2ba2d00066f7
Reviewed-on: https://gerrit.chromium.org/gerrit/28177
Reviewed-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agos5p-mfc: Bug fix of timestamp/timecode copy mechanism for MFCv6
Sunil Mazhavanchery [Fri, 20 Jul 2012 23:33:29 +0000 (16:33 -0700)]
s5p-mfc: Bug fix of timestamp/timecode copy mechanism for MFCv6

Based on Kamil Debski MFCv5 patch
Fixed the code copying timecode/timestamp to corresponding
frames between OUTPUT and CAPTURE.

BUG=chrome-os-partner:11464
TEST=Built Kernel & tested VDA & Verified the OOO H264 Stream

Change-Id: I69c4cb82d1efb23741d94434c6b1487b548cc65a
Signed-off-by: Sunil Mazhavanchery <sunilm@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/28098
Reviewed-by: Prashanth Godrehal <prashanth.g@samsung.com>
Reviewed-by: Pawel Osciak <posciak@google.com>
Reviewed-by: Arun Kumar K <arun.kk@samsung.com>
Tested-by: kiran <kiran@chromium.org>
Commit-Ready: kiran <kiran@chromium.org>

11 years agoCHROMIUM: mfd: max77686: use standard wake setup
Olof Johansson [Sun, 22 Jul 2012 03:26:32 +0000 (20:26 -0700)]
CHROMIUM: mfd: max77686: use standard wake setup

If the i2c_board_info struct sets I2C_CLIENT_WAKE (or done through the generic
i2c bindings), then there's no need to initialize wakeup in the driver.
So thus the custom setup and the platform_data member can be removed.

BUG=chrome-os-partner:8921
TEST=rtcwake -m mem -s 10

Change-Id: I7f24684b8a2ac36325b0887b19acb40fa7bf8f53
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28132
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
11 years agoCHROMIUM: mfd: chromeos_ec: remove compilation warning
Olof Johansson [Sat, 21 Jul 2012 23:46:09 +0000 (16:46 -0700)]
CHROMIUM: mfd: chromeos_ec: remove compilation warning

Really confusing since it warns for use in the function called:

drivers/mfd/chromeos_ec.c: In function 'cros_ec_command_xfer':
drivers/mfd/chromeos_ec.c:156:6: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]

BUG=none
TEST=build, make sure warning is gone

Change-Id: Ib21c8a90a20a71ede9a2458a83f1d530b619c20a
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28128
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
11 years agoCHROMIUM: mfd: chromeos_ec: suspend/resume fixes
Olof Johansson [Sat, 21 Jul 2012 22:29:24 +0000 (15:29 -0700)]
CHROMIUM: mfd: chromeos_ec: suspend/resume fixes

If IRQs are left on, one will fire before the rest of the system is up
enough to process it if there has been a pending keypress. So we need to
disable interrupts across suspend/resume.

Also, enable wake source, and register the pm event.

BUG=chrome-os-partner:11625
TEST=powerd_suspend + wake from keyboard

Change-Id: I9996f766ffd1c49f7e45ba8f76f273884151d593
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28127
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
11 years agoCHROMIUM: cpufreq_interactive: do input boosting for more devices
Sam Leffler [Thu, 19 Jul 2012 18:04:20 +0000 (11:04 -0700)]
CHROMIUM: cpufreq_interactive: do input boosting for more devices

Extend the input boost mechanism to match keyboard devices and more
pointing devices (e.g. mice).

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=none
TEST=verify input connect to existing+new devices and check for boosting with chrome:tracing

Change-Id: I6c4e2e6ff1291c92ec6db4acd51642df7526e24d
Reviewed-on: https://gerrit.chromium.org/gerrit/27897
Reviewed-by: Benson Leung <bleung@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>

11 years agoCHROMIUM: cpufreq_interactive: fix input connect for multiple devices
Sam Leffler [Thu, 19 Jul 2012 18:04:20 +0000 (11:04 -0700)]
CHROMIUM: cpufreq_interactive: fix input connect for multiple devices

Eliminate the global inputopen work struct. When multiple devices are
matched quickly enough the work queue callbacks race (even with the
in-flight limit set to 1).

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=chromium-os:32807
TEST=use follow-on change to match multiple devices; verify connect of all matched devices

Change-Id: I06df81f40e08d229422498d370ed300f87c22ebf
Reviewed-on: https://gerrit.chromium.org/gerrit/28084
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>

11 years agoCHROMIUM: dts: mmc: dwmci: add sdio power bindings
Abhilash Kesavan [Sat, 21 Jul 2012 18:24:40 +0000 (23:54 +0530)]
CHROMIUM: dts: mmc: dwmci: add sdio power bindings

Add dt-based retrieval of host sdio pm capabilities. Based on
the dt based discovery do a bus init in the resume function.

BUG=chrome-os-partner:8921
TEST=echo +20 > /sys/class/rtc/rtc0/wakealarm
     echo mem > /sys/power/state
     See the system resume after 20 secs and verify wifi connection

Change-Id: I9dca144a647a2cbf8728db0f581600c7800cbc94
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
[olofj: reworded commit message]
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26756

11 years agoarm: exynos5: Enable optional SDIO pm capabilities
Abhilash Kesavan [Fri, 13 Jul 2012 08:02:26 +0000 (13:32 +0530)]
arm: exynos5: Enable optional SDIO pm capabilities

Enable PM capabilities for SDIO channel on Snow/Daisy.

BUG=None
TEST=Build and boot snow; test along with the driver change commit

Change-Id: I2966ea63532a0449c78fcd566474b7e280c5ce01
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/27278
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: mmc: sdio: avoid spurious calls to interrupt handlers
Nicolas Pitre [Mon, 16 Apr 2012 23:16:54 +0000 (19:16 -0400)]
UPSTREAM: mmc: sdio: avoid spurious calls to interrupt handlers

Commit 06e8935feb ("optimized SDIO IRQ handling for single irq")
introduced some spurious calls to SDIO function interrupt handlers,
such as when the SDIO IRQ thread is started, or the safety check
performed upon a system resume.  Let's add a flag to perform the
optimization only when a real interrupt is signaled by the host
driver and we know there is no point confirming it.

Reported-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
(cherry picked from commit bbbc4c4d8c5face097d695f9bf3a39647ba6b7e7)

BUG=chrome-os-partner:8921
TEST=suspend/resume testing

Change-Id: I15493fe10b6a862ad59f7157f904e6838f35f122
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28130
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoCHROMIUM: i2c: samsung: resume race fix
Olof Johansson [Sat, 21 Jul 2012 22:33:05 +0000 (15:33 -0700)]
CHROMIUM: i2c: samsung: resume race fix

Don't unmark the device as suspended until after it's been re-setup. Also,
mark it as suspended before tearing down setup.

The main race would be w.r.t. an i2c driver that gets resumed at the same
time (asyncronously), that is allowed to do a transfer since suspended
is set to 0 before reinit, but really should have seen the -EIO return
instead.

BUG=none
TEST=none

Change-Id: Ie3a16daef73095dadcbad59ce8ccd6e53b5aec9e
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28126
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
11 years agoCHROMIUM: cros5250: add wakeup-source properties to i2c nodes
Olof Johansson [Sat, 21 Jul 2012 18:50:17 +0000 (11:50 -0700)]
CHROMIUM: cros5250: add wakeup-source properties to i2c nodes

Add the generic wakeup-source properties to device tree nodes that can
wake the system up.

BUG=chrome-os-partner:8921
TEST=Make sure trackpad, rtc and keyboard wakes snow.

Change-Id: I5b93600f14d5c4f5d44f663bb7ed86bc1dcc359e
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28124
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
11 years agoof: i2c: add support for wakeup-source property
Olof Johansson [Sat, 21 Jul 2012 18:49:39 +0000 (11:49 -0700)]
of: i2c: add support for wakeup-source property

Add support for specifying a generic "wakeup-source" property on i2c
clients, which will set the I2C_CLIENT_WAKE flag, thus configuring the
device to wake the system from suspend (via IRQ).

This obviously doesn't make sense on devices lacking IRQ, but since we
still allow that in the i2c_board_info case, I don't see a reason to
restrict it here.

Note: Since the generic i2c bindings aren't documented in the kernel,
I didn't find a good place to add documentation for this binding
extension. I still think it makes sense to have a generic property
instead of having each device do its own binding for the same.

BUG=chrome-os-partner:8921
TEST=make sure trackpad, keyboard and rtc wakes snow

Change-Id: Ia7b2d06203545c278d154cdc07f64e7db8f37786
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28123
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
11 years agoarm: exynos: sysmmu: release iommu mapping during module exit
Subash Patel [Fri, 20 Jul 2012 10:16:20 +0000 (15:46 +0530)]
arm: exynos: sysmmu: release iommu mapping during module exit

This change will add support for detaching iommu mapping, domain
and switchoff the hardware for an attached device.

This commit adds the following changes:
a) support in dma-mapping framework to call iommu_detach_device()
b) support in the exynos to call arm_iommu_detach_device() and
   arm_iommu_release_mapping()
c) changes to the module exit of drm_drv, drm_fimd, gsc, tv and mfc

BUG=chrome-os-partner:11310
TEST=none

Change-Id: I68254d0f94c22125cd4f6cffd3d4946f400d0d68
Signed-off-by: Subash Patel <subash.ramaswamy@linaro.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27362
Tested-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Anush Elangovan <anush@google.com>
Reviewed-by: Anush Elangovan <anush@google.com>
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoCHROMIUM: Input: cyapa - Use a descriptive name
Benson Leung [Fri, 6 Jul 2012 00:14:33 +0000 (17:14 -0700)]
CHROMIUM: Input: cyapa - Use a descriptive name

Use the descriptive name "Cypress APA Trackpad (cyapa)"

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chromium-os:21047
TEST=Builds clean.
Check that input name that shows up in evtest is
Cypress APA Trackpad (cyapa)
Verify that the cyapa specific input classes still match.
For example, on Lumpy :
$ grep "touchpad lumpy cyapa" /var/log/Xorg.0.log
Check that the InputClass is applied correctly :
Cypress APA Trackpad (cyapa): Applying InputClass "touchpad lumpy cyapa"
Also, check that tpcontrol status still finds the device by name :
/opt/google/touchpad/tpcontrol status
Device 'Cypress APA Trackpad (cyapa)':
...

Change-Id: I9aa51ba06d7b7cf40277b534a08706c62e18fae7
Reviewed-on: https://gerrit.chromium.org/gerrit/26873
Reviewed-by: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Commit-Ready: Benson Leung <bleung@chromium.org>

11 years agoCHROMIUM: ARM: cros5250: Enable wake for rtc-max77686
Abhilash Kesavan [Fri, 20 Jul 2012 18:44:37 +0000 (14:44 -0400)]
CHROMIUM: ARM: cros5250: Enable wake for rtc-max77686

Turn on wake capabilities for rtc-max77686 so it can
bring the system out of suspend.

TEST=./run_remote_tests --remote=${REMOTE} power_Resume/control$
  Manual verification:
    echo +15 > /sys/class/rtc/rtc0/wakealarm
    echo mem > /sys/power/state
    See system suspend then wake in 15 seconds.
BUG=chrome-os-partner:11416

Change-Id: I1c2f8b92777b3b9eb3ad98c40466e07fcf0b8642
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/28037
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agodrm/exynos: KDS fix for performance at vsync
Akshu Agrawal [Fri, 20 Jul 2012 02:46:16 +0000 (19:46 -0700)]
drm/exynos: KDS fix for performance at vsync

At KDS callback we now wait for vsync to update the register.
At pageflip ioctl we register for vsync event and the event is
handled at every vsync. Earlier, registering for vsync event at
callback was making eglSwapBuffer call wait for vsync to
complete and thus slowing down performance.

Change-Id: I367ba0e0b19ee9f02e2da8f1508ca6b049f0d4df
Signed-off-by: Akshu Agrawal <akshu.a@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/27974
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
Tested-by: Anush Elangovan <anush@google.com>
Commit-Ready: Anush Elangovan <anush@google.com>

11 years agoARM: exynos: snow: Get DP_PD_N & DP_RST_N from dt
Sean Paul [Fri, 20 Jul 2012 18:37:45 +0000 (11:37 -0700)]
ARM: exynos: snow: Get DP_PD_N & DP_RST_N from dt

Add a new node in the device tree which contains entries for DP_PD_N and
DP_RST_N. These values will be fixed up by u-boot to reflect the correct
values for the current board.

BUG=chrome-os-partner:11315
TEST=Tested on snow, ensure the gpio was being correctly harvested and
set

Change-Id: I71b7367c3cbff1407a8d84e0f2a4d7c133ae8ded
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28036
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agogpio: samsung: Fix off-by-one bug in gpio addresses
Sean Paul [Fri, 20 Jul 2012 18:19:31 +0000 (11:19 -0700)]
gpio: samsung: Fix off-by-one bug in gpio addresses

Move gpc4 to the end of the automatically processed gpio controllers so
we don't taint the automatic offset calculation.

This bug caused all controllers coming after gpc4 to map to the
incorrect address. The result is <&gpd1 0 0 0 0> would actually map to
GPIO 0 in gpd0.

BUG=None
TEST=Tested on snow, verified correct addresses for the controllers

Change-Id: Ia41b9a28c7dd6c06147ac5329462be1e3c3a0381
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28031
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agommc: dw_mmc: exynos: Turn SDIO interrupts on
Doug Anderson [Fri, 20 Jul 2012 17:48:45 +0000 (10:48 -0700)]
mmc: dw_mmc: exynos: Turn SDIO interrupts on

With previous fixes for SDIO interrupts we can now turn them on
for exynos.  I have tested these with port 3 but believe that the
SDIO interrupts are applicable on all ports.

BUG=chrome-os-partner:10251
TEST=Boot and can use WiFi; verify that bandwidth is significantly
improved with this fix.

Change-Id: Iffd6ce9685d65ae4afcaeb21379ea147b9af7a33
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26729
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
11 years agommc: dw_mmc: Disable low power mode if SDIO interrupts are used
Doug Anderson [Fri, 20 Jul 2012 00:02:58 +0000 (17:02 -0700)]
mmc: dw_mmc: Disable low power mode if SDIO interrupts are used

The documentation for the dw_mmc part says that the low power
mode should normally only be set for MMC and SD memory and should
be turned off for SDIO cards that need interrupts detected.

The best place I could find to do this is when the SDIO interrupt
was first enabled.  I rely on the fact that dw_mci_setup_bus()
will be called when it's time to reenable.

BUG=chrome-os-partner:10251
TEST=With patch to turn on SDIO interrupts was able to use WiFi.

Change-Id: Id0e33a4e3a0a77ce8a5053b6e73197d53a5d46bb
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28025
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
11 years agoCHROMIUM: chromeos_laptop - add cyapa on Butterfly
Benson Leung [Thu, 19 Jul 2012 17:03:04 +0000 (10:03 -0700)]
CHROMIUM: chromeos_laptop - add cyapa on Butterfly

Add the cyapa device on smbus on the Butterfly platform.

BUG=chrome-os-partner:11535
TEST=Builds clean.
Test that cyapa device shows up on butterfly platform
run evtest as root.
Check that "cyapa" device shows up in the list of devices.

Change-Id: I1e2dfd1478861f0c2fbb3b69ec2feff2a3a0f088
Signed-off-by: Benson Leung <bleung@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27893
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: chromeos_laptop : consolidate cyapa smbus setups
Benson Leung [Thu, 19 Jul 2012 16:48:17 +0000 (09:48 -0700)]
CHROMIUM: chromeos_laptop : consolidate cyapa smbus setups

Consolidate all cyapa on smbus setups to one function.

BUG=chromium-os:32749
TEST=Builds clean.
Test kernel on Lumpy and Parrot. Ensure that touchpad works
on both platforms.

Change-Id: I28f99d01f6f1285e72eea56f63d36985532f593b
Signed-off-by: Benson Leung <bleung@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27892
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: Exynos5: Turn on ramoops FDT support.
Bryan Freed [Mon, 4 Jun 2012 23:19:10 +0000 (16:19 -0700)]
CHROMIUM: Exynos5: Turn on ramoops FDT support.

Add a ramoops fdt entry in our shared cros5250 dtsi file.
Reserve the specified memory with memblock_remove() in the exynos5
".reserve" hook.

BUG=chrome-os-partner:8931
TEST=echo bug > /proc/breakme, then check /var/spool/crash after reboot.

Change-Id: I156db15cca691890408a0c8df73070232f02f705
Signed-off-by: Bryan Freed <bfreed@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26502

11 years agoCHROMIUM: ramoops: Add support for the Flattened Device Tree.
Bryan Freed [Mon, 4 Jun 2012 22:28:30 +0000 (15:28 -0700)]
CHROMIUM: ramoops: Add support for the Flattened Device Tree.

When called with a non-zero of_node, fill out a new ramoops_platform_data
with data from the specified Flattened Device Tree node.
Update ramoops documentation with the new FDT interface.
Remove documentation for the module parameters that were removed a while ago.

BUG=chrome-os-partner:8931
TEST=Test ramoops with an fdt entry in a dts or dtsi file.

Change-Id: I08896b266e217514c3d0235e86b1c006eaba227a
Signed-off-by: Bryan Freed <bfreed@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26501
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: ramoops: Fix some error handling goto's.
Bryan Freed [Mon, 4 Jun 2012 22:08:45 +0000 (15:08 -0700)]
CHROMIUM: ramoops: Fix some error handling goto's.

If we probe for a second ramoops device, still return an error, but do
not zero out the first device's bufsize.

BUG=chrome-os-partner:8931
TEST=Test with fdt and chromeos ramoops devices defined.

Change-Id: Idd509bf218f12280f863260fed9520766b096753
Signed-off-by: Bryan Freed <bfreed@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26500
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoBACKPORT: ALSA: hda - Turn on PIN_OUT from hdmi playback prepare.
Dylan Reid [Fri, 20 Jul 2012 00:52:58 +0000 (17:52 -0700)]
BACKPORT: ALSA: hda - Turn on PIN_OUT from hdmi playback prepare.

Turn on the pin widget's PIN_OUT bit from playback prepare. The pin is
enabled in open, but is disabled in hdmi_init_pin which is called during
system resume.  This causes a system suspend/resume during playback to
mute HDMI/DP. Enabling the pin in prepare instead of open allows calling
snd_pcm_prepare after a system resume to restore audio.

BUG=chromium-os:32693
TEST=suspend/resume lumpy while playing audio to DP.  Audio should
continue upon resume.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(cherry picked from commit 9e76e6d031482194a5b24d8e9ab88063fbd6b4b5)

Change-Id: I1599d06c6d5cbe28f1f5280ab09cdbca33249143
Reviewed-on: https://gerrit.chromium.org/gerrit/28023
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
11 years agoCHROMIUM: ARM: exynos: cros5250: add DMIC settins to max98095
Olof Johansson [Thu, 19 Jul 2012 19:52:33 +0000 (12:52 -0700)]
CHROMIUM: ARM: exynos: cros5250: add DMIC settins to max98095

BUG=chrome-os-partner:10849
TEST=boot, arecord, aplay

Change-Id: I0ef3dc6a224dee9e550f25739c742f949f737fb8
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27914
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: Katie Roberts-Hoffman <katierh@chromium.org>
11 years agoCHROMIUM: ASoC: max98095: first fragment of DT support
Olof Johansson [Thu, 19 Jul 2012 19:51:12 +0000 (12:51 -0700)]
CHROMIUM: ASoC: max98095: first fragment of DT support

First pieces of DT support for max98095. It will be filled in more as
we move the ASoC for exynos to device tree (and upstreamed when it has
more than just a fragment in there).

BUG=chrome-os-partner:10849
TEST=boot; arecord -r 44100 /tmp/foo ; aplay /tmp/foo

Change-Id: Ib1cece184a26a801caa82b496610bfc98063ca68
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27913
Reviewed-by: Dylan Reid <dgreid@chromium.org>
11 years agoCHROMIUM: ASoC: samsung: HP detect plumbing for snow
Olof Johansson [Thu, 19 Jul 2012 07:25:53 +0000 (00:25 -0700)]
CHROMIUM: ASoC: samsung: HP detect plumbing for snow

This adds HP detect through the external GPIO on Snow. I've hardcoded
the GPIO for now since we need to move the whole ASoC configuration to
device tree (a la tegra) and will move it to a proper gpio specifier
there when we do so.

BUG=none
TEST=start up, browse youtube, bring up an awesome music video, plug in
headphones, rock out.

Change-Id: I9b7d1452f43f68f1e17bc8868f1d9c56d09db87b
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27866
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: Katie Roberts-Hoffman <katierh@chromium.org>