7 years agomedia: video: tegra: Add OV9772 Camera sensor support.
Shantanu Nath [Sat, 8 Sep 2012 06:20:16 +0000]
media: video: tegra: Add OV9772 Camera sensor support.

Support for OV9772 Camera sensor driver.

Bug 1011174

Change-Id: Ib978646dbbec9db4e9c4622c949b5d75be2aad8c
Signed-off-by: Shantanu Nath <snath@nvidia.com>
Reviewed-on: http://git-master/r/132959
(cherry picked from commit fbae204b284cb115e8a0066a6277900d331bc50c)
Reviewed-on: http://git-master/r/130864
Tested-by: Rakesh Sharma <rasharma@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

7 years agovideo: tegra: dc: Use more exact error messages.
Tuomas Kulve [Fri, 7 Sep 2012 09:55:43 +0000]
video: tegra: dc: Use more exact error messages.

Describe DC CRC related error messages more precisely to be able to
distinguish the errors from each other based on the kernel log.

Bug 1039940

Change-Id: I9853e4a508df27c87d30a8ae4e72aaa16fae6a9b
Signed-off-by: Tuomas Kulve <tkulve@nvidia.com>
Reviewed-on: http://git-master/r/130645
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

7 years agovideo: tegra: dc: remove unused pointer variable
Deepak Nibade [Thu, 20 Sep 2012 08:04:13 +0000]
video: tegra: dc: remove unused pointer variable

fix Coverity issue
pointer 'win' is not used in context so remove it

bug 1046331

Change-Id: I3a6f962000591d93a017eb2065da7aff01796b35
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/134016
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Morell <rmorell@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-by: Adam Cheney <acheney@nvidia.com>

7 years agoarm: tegra: clock: Fix coverity issue
Sri Krishna chowdary [Mon, 17 Sep 2012 05:50:35 +0000]
arm: tegra: clock: Fix coverity issue

Check return value of debug_create_file syncevents if
success or not.

Bug 1046331

Change-Id: I0295af9280dc78db117fa4d51bd94ca152d12279
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/133177
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoarm: tegra: Fix coverity issue
Sri Krishna chowdary [Mon, 17 Sep 2012 05:03:54 +0000]
arm: tegra: Fix coverity issue

Differentiate between success and failure of gpio_request.

Bug 1046331

Change-Id: I400d574e8fd492739cd0dffb3a96f8801c624a3e
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/133167
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoARM: tegra: kai: adjust ov2710 power sequence
Sang-Hun Lee [Fri, 17 Aug 2012 23:54:05 +0000]
ARM: tegra: kai: adjust ov2710 power sequence

Update the power sequence to match the specification

Bug 1031318

Reviewed-on: http://git-master/r/128945
(cherry picked from commit 5c13235fdd38404b3b785aa5c2d7e6f51e4bfb53)

Change-Id: I60e57f3c662c6775e6ced9c4084e530d64fe1ed7
Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/133395
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoARM: tegra: usb: read hot plug only in host mode
Rakesh Bodla [Thu, 20 Sep 2012 06:41:39 +0000]
ARM: tegra: usb: read hot plug only in host mode

Hot plug data is available only in host mode. Guard hotplug
read with host mode.

Bug 1047763
Bug 1050193

Change-Id: I92fccc228db38f0ae0cebffe8a6fc69378f3da83
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/133682
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoarm: tegra: usb_phy: remove warn_on messages
Rohith Seelaboyina [Tue, 18 Sep 2012 08:54:07 +0000]
arm: tegra: usb_phy: remove warn_on messages

Removed warn_on messages and made code independent of
checking phy interface.

Bug 1050193

Change-Id: If8bfa277d51663f978eb9eb8290124259f8e0c89
Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-on: http://git-master/r/133280
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

7 years agovideo: tegra: host: Clear syncpt intr on disable
Terje Bergstrom [Wed, 19 Sep 2012 06:04:09 +0000]
video: tegra: host: Clear syncpt intr on disable

Clear syncpt interrupt status when disabling it. Otherwise the
interrupt might have been left asserted.

Bug 1042566

Change-Id: Ib20b05af8782630dd711d203c0155eec7628bcd3
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/133807
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

7 years agovideo: tegra: host: Fix copyright text on Tegra11
Terje Bergstrom [Wed, 19 Sep 2012 05:58:25 +0000]
video: tegra: host: Fix copyright text on Tegra11

Replace copyright text for Tegra11 code with appropriate one.

Change-Id: I4a0a8d2d0ddbd6c464e6c8e70ddfe03dbc68215c
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/133746
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

7 years agomedia: video: tegra: ar0832: rectify locking sequence
Sang-Hun Lee [Thu, 30 Aug 2012 01:09:25 +0000]
media: video: tegra: ar0832: rectify locking sequence

Problem description:
 - ar0832_set_alternate_addr writes to registers thus should be
   protected by a lock
 - ar0832_power_on will not release the mutex lock in an error case

Fix description:
 - Do not unlock ar0832_camera_lock until ar0832_set_alternate_addr is
   done
 - Release ar0832_camera_lock in a regulator error case as well

Bug 1039067

Reviewed-on: http://git-master/r/130407
(cherry picked from commit 8be77fd1a61a1c93c04f1f141f1df91d24b5e54d)

Change-Id: Ic93a0a729a7df4ae704658a1774f7f5dfbb438bd
Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/133398
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>

7 years agoarm: tegra: xmm: add post_resume phy callback
Vinayak Pane [Fri, 24 Aug 2012 02:48:12 +0000]
arm: tegra: xmm: add post_resume phy callback

phy post_resume is called when usb port+hub is resumed,
check if modem has finished resume by then. Notify modem
about post resume by setting bb_wake to low.

Modify check for CP initiated wakeup to read current
modem state (ap_wake).

Bug 1034420

Change-Id: Ie9a3aa581bd7660183464e3fc2554ceb055b69b2
Signed-off-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-on: http://git-master/r/129533
(cherry picked from commit e96e462aee43ed8699f5cd64728c389e92ef402e)
Reviewed-on: http://git-master/r/131996
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agokernel: Modify default schedule interval to 1ms
Mitch Luban [Thu, 6 Sep 2012 20:45:54 +0000]
kernel: Modify default schedule interval to 1ms

Modifies the OS default system scheduling interval
to 1ms.

Bug 954903

Change-Id: I306c2183bd94df3147aab636c9d7d2f813e4fa30
Signed-off-by: Mitch Luban <mluban@nvidia.com>
Reviewed-on: http://git-master/r/130300
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agovideo: tegra: host: Tegra3 3D reg read on Tegra11
Terje Bergstrom [Wed, 19 Sep 2012 05:54:05 +0000]
video: tegra: host: Tegra3 3D reg read on Tegra11

Replace Tegra11 3D register read with the same code path as in
Tegra3.

Bug 1038891

Change-Id: Iac15dd2187049246777ffc7b398d643936f7ea32
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/133745
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

7 years agoARM: tegra: Document sysfs params
Juha Tukkinen [Tue, 18 Sep 2012 09:02:20 +0000]
ARM: tegra: Document sysfs params

Intoduction of cpuquiet framework broke tegra sysfs API. Document the new
sysfs interface.

Bug 894311
Bug 1031064

Change-Id: I6ef94921dd0807bfaeb3bf637a6c1b037d2a337f
Signed-off-by: Juha Tukkinen <jtukkinen@nvidia.com>
Reviewed-on: http://git-master/r/133467
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>

7 years agovideo: tegra: host: fix memory leak during submit
Tuomas Tynkkynen [Mon, 17 Sep 2012 14:32:47 +0000]
video: tegra: host: fix memory leak during submit

If a channel submit is performed while an existing job is not yet
flushed, the memory used for the old job gets leaked.
Also, if pinning a job fails partially, the successful pins
would get leaked.

Bug 1038389

Change-Id: I167dd1724027e8cd7eb40a551e0a48627b7b2d2f
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Reviewed-on: http://git-master/r/133264
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

7 years agovideo: tegra: host: Use 3D DW for register read
Terje Bergstrom [Sat, 15 Sep 2012 10:58:57 +0000]
video: tegra: host: Use 3D DW for register read

Use 3D direct to memory write for reading 3D registers.

Bug 1038891

Change-Id: I9dc17ea988b6946d5f8748fd22ae3589d42cdef0
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/132990
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

7 years agodrivers: video: tegra: host: Faster queue cleanup
Arto Merilainen [Fri, 14 Sep 2012 07:42:35 +0000]
drivers: video: tegra: host: Faster queue cleanup

If a job timeouts, remaining jobs in the queue (that came from the
same task) are handled with a small timeout (500ms).

Change-Id: I83539d4de3c38446f08c06b20899c1ba73b46c83
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/132562
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Kirill Artamonov <kartamonov@nvidia.com>
Tested-by: Kirill Artamonov <kartamonov@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

7 years agodrivers: video: tegra: Set correct clock for 3d
Arto Merilainen [Wed, 12 Sep 2012 07:38:06 +0000]
drivers: video: tegra: Set correct clock for 3d

This patch ensures that 3d clock is set to its maximum when 3d
scaling is disabled.

Change-Id: I2ddbb3c0359b28477fbd7d637b468132353d64a7
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/131717
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoarm: tegra: add device tree support
Prashant Gaikwad [Sat, 15 Sep 2012 04:58:41 +0000]
arm: tegra: add device tree support

Enable device tree support for kai, dalmore, pluto and curacao
by adding board compatible tables.

Also add dts/dtsi files for kai, dalmore, pluto and curacao.

Bug 973078
Bug 1037657

Change-Id: I24fdcde555f4bf840ad839cad25c8d0d43ced7cc
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/130634
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoMerge remote-tracking branch 'origin/dev/from-android-3.4' into promotion_build
Simone Willett [Tue, 18 Sep 2012 21:35:54 +0000]
Merge remote-tracking branch 'origin/dev/from-android-3.4' into promotion_build

7 years agoARM: Tegra: Add T30 DVFS tables to DT
Prashant Gaikwad [Tue, 4 Sep 2012 11:05:49 +0000]
ARM: Tegra: Add T30 DVFS tables to DT

Add CPU and Core DVFS tables for Cardhu to device
tree.

Bug 906383

Change-Id: I0dcddd4bc2ab4c057c4b85f630db912c9bc849d4
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/130672
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoARM: Tegra: Add support for T30 DVFS DT bindings
Prashant Gaikwad [Thu, 16 Aug 2012 13:41:32 +0000]
ARM: Tegra: Add support for T30 DVFS DT bindings

This patch implements functions required to parse
DVFS tabled defined in device tree.

Bug 906383

Change-Id: I13cf76b3a8c1284349d6684f91f62f011501c84d
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/130671
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agotracing: Add event for tracing power gating
Antti P Miettinen [Fri, 7 Sep 2012 10:56:36 +0000]
tracing: Add event for tracing power gating

Define trace events for measuring power gating latencies.

Change-Id: I656bb449fa9494b51963ed7c49a03b4a6e130006
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Reviewed-on: http://git-master/r/130660
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
GVS: Gerrit_Virtual_Submit

7 years agoCHROMIUM: config: Enable reading bpp from HW
Christopher Freeman [Mon, 17 Sep 2012 20:26:27 +0000]
CHROMIUM: config: Enable reading bpp from HW

Set config option to read hardware value for bits per pixel off DC hardware
and use it as the initial setting.  This helps maintain an image in the
framebuffer from u-boot over the uboot-to-kernel transition.

Bug 1044429

Change-Id: I2db2e7aaf704b08abe202e81aeaf02314a9d8bdc
Signed-off-by: Christopher Freeman <cfreeman@nvidia.com>
Reviewed-on: http://git-master/r/133324
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Allen Martin <amartin@nvidia.com>

7 years agodrivers: video: tegra: host: Fix sysfs interface
Arto Merilainen [Mon, 17 Sep 2012 08:11:38 +0000]
drivers: video: tegra: host: Fix sysfs interface

The sysfs interface was accidentally modified at the same time
when devfreq was taken into use. This patch returns the old
sysfs interface.

Bug 965517

Change-Id: I45de75a87cd109454c118988abf36014922109ac
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/133217
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Tested-by: Juha Tukkinen <jtukkinen@nvidia.com>

7 years agovideo: tegra: host: Set Tegra11 host1x clock
Terje Bergstrom [Fri, 14 Sep 2012 13:06:00 +0000]
video: tegra: host: Set Tegra11 host1x clock

Set Tegra11 host1x clock default to 102MHz.

Change-Id: I68d44328ed09b501c76677f3f0d1c6f01bfa6383
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/132653
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

7 years agoARM: tegra: emc: Add DECERR_EMEM to diagnostic
Antti P Miettinen [Fri, 14 Sep 2012 09:43:00 +0000]
ARM: tegra: emc: Add DECERR_EMEM to diagnostic

Give information about error type 2 for MC error.

Change-Id: Ib5763204937a61a6646c12dba45a8cb36b74ce21
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Reviewed-on: http://git-master/r/132604
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoARM: Tegra: Disable data cache before flush
Antti P Miettinen [Fri, 14 Sep 2012 09:45:53 +0000]
ARM: Tegra: Disable data cache before flush

When entering power gating, disable L1 data cache before
flushing. This is needed in order to prevent data cache
making allocations during/after flushing.

Bug 1045096

Change-Id: I0a6b2516e2bbd21ca35b74d24f7311318e127607
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Reviewed-on: http://git-master/r/132590
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Bo Yan <byan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agopm: EDP: bug fixes
Sivaram Nair [Thu, 13 Sep 2012 14:06:14 +0000]
pm: EDP: bug fixes

This patch includes several minor bug fixes:
(1) fixing example documentation
(2) fixing minor errors in sysfs
(3) fixing governor initcalls to postcore
(4) adding missing include

Change-Id: I3c1115cc23e6e887c083801a59143c5a06e75d12
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: http://git-master/r/132525
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agoARM: tegra11: clock: Fix CPU clock source initialization
Alex Frid [Fri, 14 Sep 2012 01:45:54 +0000]
ARM: tegra11: clock: Fix CPU clock source initialization

Fixed incorrect order in enforcing PLLX DIV2 bypass and CPU clock
source initialization.

Bug 1048603

Change-Id: I0ad503bf0762612b47ad7347ef449f6428631cdf
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/132486
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

7 years agovideo: tegra: host: use constant EMC clock for MPE
Jihoon Bang [Thu, 6 Sep 2012 18:22:23 +0000]
video: tegra: host: use constant EMC clock for MPE

MPE clock is tied to MPE EMC clock. Although MPE clock
goes low due to DFS, lowering MPE EMC is not recommended
because video recording is high memory bandwidth use case.
MPE EMC is set to 400MHz initially and won't change even
if MPE is set to a new clock frequency.

For now, 400MHz is used for MPE EMC. But later it might be
tuned in a way to have relatioship with MPE clock.
For example, MPE EMC could be (MPE + 100MHz). To find
a right value, we need more experiment.

Bug 1039281

Reviewed-on: http://git-master/r/130240
(cherry picked from commit a1fcf5c38f76c1b939fed7f8c771dbbc7147b244)

Change-Id: Ia364daee5ffb3ccd5917953b471f53f065e8af55
Signed-off-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-on: http://git-master/r/132483
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agovideo: tegra: host: Add Tegra11 3D per pipe context switching
Wei Sun [Thu, 30 Aug 2012 00:34:16 +0000]
video: tegra: host: Add Tegra11 3D per pipe context switching

Change-Id: If96b13d4efe238a4fba4f0a33fee1b170c6ca39f
Signed-off-by: Wei Sun <wsun@nvidia.com>
Reviewed-on: http://git-master/r/132368
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

7 years agoedp: edp nodes moved to $DEBUGFS/edp/vdd_cpu/
Mitch Luban [Tue, 11 Sep 2012 01:30:19 +0000]
edp: edp nodes moved to $DEBUGFS/edp/vdd_cpu/

Moved edp nodes to $DEBUGFS/edp/vdd_cpu/ so
that EDP manager and VDD_CPU_EDP capping have
equal footing in debugfs namespace.

Requires the following changes:
http://git-master/r/131482
http://git-master/r/131272
http://git-master/r/131273

Bug 1046809

Change-Id: I61184bf8bd54a2a701fd4182b421b0da229883b7
Signed-off-by: Mitch Luban <mluban@nvidia.com>
Reviewed-on: http://git-master/r/131271
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Tested-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-by: Matthew Longnecker <mlongnecker@nvidia.com>

7 years agonet: wireless: bcmdhd: Update wifi stack ps state if was changed
Dmitry Shmidt [Sun, 16 Sep 2012 21:35:23 +0000]
net: wireless: bcmdhd: Update wifi stack ps state if was changed

Change-Id: Ib1ee0b6ee05077d1ed6cfb578b6384dfc9787c81
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Adjust PS mode if we are in 'suspend'
Dmitry Shmidt [Sun, 16 Sep 2012 21:06:21 +0000]
net: wireless: bcmdhd: Adjust PS mode if we are in 'suspend'

Change-Id: I007eb5311ba4935b2f26c2292ad5a1b9e6725fc2
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Add print when power-save mode is OFF
Dmitry Shmidt [Sun, 16 Sep 2012 17:20:48 +0000]
net: wireless: bcmdhd: Add print when power-save mode is OFF

Change-Id: I83703cf305d0ac1b209c7068094783487ec0b364
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Update to Version 1.28.12-1
Dmitry Shmidt [Thu, 13 Sep 2012 20:08:07 +0000]
net: wireless: bcmdhd: Update to Version 1.28.12-1

- Add sync up with PROP_TXSTATUS setting as
  dhd->pub.wlfc_enabled = TRUE for proper P2P&VSDB funationality
- Add ROAM setting per platform from Makefle
- Change debug level of WL message at run time
- Fix ARP offloading doesn't work for virtual IF
- Check return error of wldev_ioctl in wl_cfg80211.c

Change-Id: I2287652a27b72f2bb787ccad4228fe4df415064c
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agokthread_worker: reimplement flush_kthread_work() to allow freeing the work item being...
Tejun Heo [Thu, 19 Jul 2012 20:52:53 +0000]
kthread_worker: reimplement flush_kthread_work() to allow freeing the work item being executed

kthread_worker provides minimalistic workqueue-like interface for
users which need a dedicated worker thread (e.g. for realtime
priority).  It has basic queue, flush_work, flush_worker operations
which mostly match the workqueue counterparts; however, due to the way
flush_work() is implemented, it has a noticeable difference of not
allowing work items to be freed while being executed.

While the current users of kthread_worker are okay with the current
behavior, the restriction does impede some valid use cases.  Also,
removing this difference isn't difficult and actually makes the code
easier to understand.

This patch reimplements flush_kthread_work() such that it uses a
flush_work item instead of queue/done sequence numbers.

Signed-off-by: Tejun Heo <tj@kernel.org>

7 years agokthread_worker: reorganize to prepare for flush_kthread_work() reimplementation
Tejun Heo [Thu, 19 Jul 2012 20:52:53 +0000]
kthread_worker: reorganize to prepare for flush_kthread_work() reimplementation

Make the following two non-functional changes.

* Separate out insert_kthread_work() from queue_kthread_work().

* Relocate struct kthread_flush_work and kthread_flush_work_fn()
  definitions above flush_kthread_work().

v2: Added lockdep_assert_held() in insert_kthread_work() as suggested
    by Andy Walls.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Andy Walls <awalls@md.metrocast.net>

7 years agoUSB: gadget: f_audio_source: New gadget driver for audio output
Mike Lockwood [Fri, 11 May 2012 16:01:08 +0000]
USB: gadget: f_audio_source: New gadget driver for audio output

This driver presents a standard USB audio class interface to the host
and an ALSA PCM device to userspace

Change-Id: If16b14a5ff27045f9cb2daaf1ae9195c5eeab7d0
Signed-off-by: Mike Lockwood <lockwood@google.com>

7 years agoUSB: gadget: f_accessory: Add support for HID input devices
Mike Lockwood [Mon, 26 Mar 2012 18:03:55 +0000]
USB: gadget: f_accessory: Add support for HID input devices

Change-Id: I4f1452db32508382df52acdc47c0eb395ae328c7
Signed-off-by: Mike Lockwood <lockwood@google.com>

7 years agoUSB: gadget: Add ACCESSORY_SET_AUDIO_MODE control request and ioctl
Mike Lockwood [Fri, 11 May 2012 16:00:40 +0000]
USB: gadget: Add ACCESSORY_SET_AUDIO_MODE control request and ioctl

The control request will be used by the host to enable/disable USB audio
and the ioctl will be used by userspace to read the audio mode

Change-Id: I81c38611b588451e80eacdccc417ca6e11c60cab
Signed-off-by: Mike Lockwood <lockwood@google.com>

7 years agowakeup: Use irqsave/irqrestore for events_lock
John Stultz [Thu, 6 Sep 2012 18:07:37 +0000]
wakeup: Use irqsave/irqrestore for events_lock

Jon Medhurst (Tixy) recently noticed a problem with the
events_lock usage. One of the Android patches that uses
wakeup_sources calls wakeup_source_add() with irqs disabled.
However, the event_lock usage in wakeup_source_add() uses
spin_lock_irq()/spin_unlock_irq(), which reenables interrupts.
This results in lockdep warnings.

The fix is to use spin_lock_irqsave()/spin_lock_irqrestore()
instead for the events_lock.

Full bug report here:
https://bugs.launchpad.net/linaro-landing-team-arm/+bug/1037565

Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Android Team <kernel-team@android.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Jon Medhurst (Tixy) <tixy@linaro.org>
Reported-and-debugged-by: Jon Medhurst (Tixy) <tixy@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: Id455188931229f04e353969af389e49b069cb34c

7 years agogpu: ion: Fix memory leak of dirty bits
Rebecca Schultz Zavin [Mon, 10 Sep 2012 23:12:01 +0000]
gpu: ion: Fix memory leak of dirty bits

Change-Id: Ia65ebac1f094bbea4090a5ddfa91bf8f5497bc16
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agoASoC: dapm: release lock on error paths
Dan Carpenter [Fri, 13 Apr 2012 19:25:43 +0000]
ASoC: dapm: release lock on error paths

We added locking here but there were a couple error paths where we
forgot to drop the lock before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

7 years agoASoC: dapm: Use DAPM mutex for DAPM ops instead of codec mutex
Liam Girdwood [Wed, 7 Mar 2012 10:38:26 +0000]
ASoC: dapm: Use DAPM mutex for DAPM ops instead of codec mutex

It has now become necessary to use a DAPM mutex instead of the codec
mutex to lock the DAPM operations. This is due to the recent multi
component support and forth coming Dynamic PCM updates.

Currently we lock DAPM operations with the codec mutex of the calling
RTD context. However, DAPM operations can span the whole card context
and all components.

This patch updates the DAPM operations that use the codec mutex to
now use the DAPM mutex PCM subclass for all DAPM ops.

We also add a mutex subclass for DAPM init and PCM operations.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

7 years agoASoC: core: Add card mutex locking subclasses
Liam Girdwood [Wed, 7 Mar 2012 10:38:25 +0000]
ASoC: core: Add card mutex locking subclasses

This is the first part of a change that is intended to improve
ASoC locking protection for DAPM and PCM operations.

This part of the series adds a mutex class for the soc_card mutex. The
SND_SOC_CARD_CLASS_INIT class is used for card initialisation only whilst the
SND_SOC_CARD_CLASS_PCM class is used for the forth coming Dynamic
PCM operations. The new mutex classes are required otherwise we will see a false
positive mutex deadlock warning between the card initialisation and the PCM
operations (something that would never deadlock in real life).

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

7 years agosync: improve timeout dumps
Erik Gilling [Tue, 4 Sep 2012 22:29:09 +0000]
sync: improve timeout dumps

Change-Id: I3b378d63c324c7b5862dd214f380b5e91131cc2a
Signed-off-by: Erik Gilling <konkers@android.com>

7 years agosync: use correct signed type when handling SYNC_IOC_WAIT
Erik Gilling [Tue, 4 Sep 2012 22:28:52 +0000]
sync: use correct signed type when handling SYNC_IOC_WAIT

Change-Id: Ic7d5adf9b145765e52b23186b8c3c793ccf29be7
Signed-off-by: Erik Gilling <konkers@android.com>

7 years agow1: ds2482: Manage SLPZ pin sleep state
Todd Poynor [Fri, 31 Aug 2012 06:09:14 +0000]
w1: ds2482: Manage SLPZ pin sleep state

Place SLPZ pin in sleep state at system suspend time if a GPIO is
provided by board platform data.

Change-Id: I93c61fa0ae474e968e0f909209c9bfcaafe3dd2c
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agogpu: ion: Add debug information for orphaned handles
Rebecca Schultz Zavin [Wed, 29 Aug 2012 00:27:22 +0000]
gpu: ion: Add debug information for orphaned handles

It is possible for a buffer to exist only as a dma_buf file
descriptor without it being held in any handles.  When this
occurs it is impossible to track where the buffer is in the
system (without traversing every process in the system and
inspecting its file table).  When buffers are orphaned like
this, copy the task comm and pid of the last client to hold
them into the buffer so we have a debugging hint as to where
this buffer came from.  In practice this will probalby be
the process that allocated the buffer.

Change-Id: I49d179f9ccdee36982f365af15d0f0b577c6347e
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agogpu: ion: Fix bug in ion_free
Rebecca Schultz Zavin [Wed, 29 Aug 2012 17:30:08 +0000]
gpu: ion: Fix bug in ion_free

Change-Id: I9e92ed750c5cd5d0329ce1747e419c908e0f37ef
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agogpu: ion: Fix race between ion_import and ion_free
Rebecca Schultz Zavin [Mon, 20 Aug 2012 22:41:11 +0000]
gpu: ion: Fix race between ion_import and ion_free

If preemted during ion_free after the refcount is updated but
before the handle can be removed from the rb_tree, import
might find that handle in the tree and try to reuse it
when execution returns to free, the handle will be cleaned
up leaving the caller of import with a corrupt handle.
This patch modifies the locking to protect agains this race.

Change-Id: I31d18cc6398f0ca18e05cd919e2bcf86fa18d568
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agonetfilter: xt_qtaguid: report only uid tags to non-privileged processes
JP Abgrall [Tue, 28 Aug 2012 23:53:32 +0000]
netfilter: xt_qtaguid: report only uid tags to non-privileged processes

In the past, a process could only see its own stats (uid-based summary,
and details).
Now we allow any process to see other UIDs uid-based stats, but still
hide the detailed stats.

Change-Id: I7666961ed244ac1d9359c339b048799e5db9facc
Signed-off-by: JP Abgrall <jpa@google.com>

7 years agopower: smb347: reset charge full whenever charging restarted
Todd Poynor [Tue, 28 Aug 2012 02:16:26 +0000]
power: smb347: reset charge full whenever charging restarted

Change-Id: Ibfc21bdee5c79467c25c608159f451c27e143f85
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agopower: smb347: Allow disabling STAT interrupts
Todd Poynor [Tue, 28 Aug 2012 01:48:31 +0000]
power: smb347: Allow disabling STAT interrupts

Allow STAT output to disable interrupt pulses and associated
configuration.  Can still use charging status output as an
interrupt if the irq_gpio is provided in platform data.

Based on code from hongmin.son <hongmin.son@samsung.com>

Change-Id: I036cd3c4b5b431f87d22c3a16a4ee0cecde432ce
Signed-off-by: hongmin.son <hongmin.son@samsung.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agopower: smb347: Add Automatic recharge disable
hongmin.son [Sat, 18 Aug 2012 06:29:20 +0000]
power: smb347: Add Automatic recharge disable

Add automatic recharge disable selectable in platform data.

Change-Id: I155d639bfd9b0f6b7fe2d345aa9d249d409d19cb
Signed-off-by: hongmin.son <hongmin.son@samsung.com>

7 years agosync: dump sync state to console on timeout
Erik Gilling [Fri, 24 Aug 2012 20:48:57 +0000]
sync: dump sync state to console on timeout

Change-Id: I74bca6b4a2afa7ed5b1f5233c5165d2edddf269a
Signed-off-by: Erik Gilling <konkers@android.com>

7 years agosync: clean up compiler warnings
Erik Gilling [Fri, 24 Aug 2012 20:48:34 +0000]
sync: clean up compiler warnings

Change-Id: I8a2ec5db652c61fd04571402067b37273b91e78f
Signed-off-by: Erik Gilling <konkers@android.com>

7 years agopower: smb347: move STAT interrupt code to h/w init function
Todd Poynor [Fri, 24 Aug 2012 00:00:23 +0000]
power: smb347: move STAT interrupt code to h/w init function

STAT config may reset to default values on unplug, overwriting the
boot time setup.  Configure STAT interrupts on each re-init.

Change-Id: Iec82608ba9bbc87a646714e1d455ed497d084ed1
Reported-by: hongmin.son <hongmin.son@samsung.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agopower: smb347: Add charge full detection via termination status
hongmin.son [Thu, 23 Aug 2012 21:11:41 +0000]
power: smb347: Add charge full detection via termination status

Also detect charge full via STAT_C register "at least one charging
cycle has terminated since charging first enabled" bit.

Keep track of charge done and report status Full or Not Charging
as appropriate.

[toddpoynor@google.com: update full status on termination current IRQ]
Change-Id: Ie872be771a4c0ec4b04489f96ddb750148d94946
Signed-off-by: hongmin.son <hongmin.son@samsung.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agopower: android-battery: use 1/10th deg C units for temperature
Todd Poynor [Thu, 23 Aug 2012 20:41:54 +0000]
power: android-battery: use 1/10th deg C units for temperature

Same units as power_supply, don't need 1/10000 deg C and conversion
is error-prone.

Change-Id: I8cf146d2a7725df2dacc415daa66b2986b69f2a7
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agopower: android-battery: Add USB and AC battery power supplies
hongmin.son [Thu, 23 Aug 2012 20:11:30 +0000]
power: android-battery: Add USB and AC battery power supplies

For reflecting board-level decisions on whether USB or AC charger
is connected, which may differ from charger power supply notion
of USB input path (which may be connected to an AC charger) vs.
AC input path.

Change-Id: I9d2eb446db8b4d9496ba7ce1472d0e7a4d4e24ef
[toddpoynor@google.com: refactoring]
Signed-off-by: hongmin.son <hongmin.son@samsung.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agogpu: ion: fix page offset in dma_buf_kmap()
Greg Hackmann [Thu, 23 Aug 2012 00:38:04 +0000]
gpu: ion: fix page offset in dma_buf_kmap()

Change-Id: I1c975f0ffde5c75d6166ae20d379991d3f770a26
Signed-off-by: Greg Hackmann <ghackmann@google.com>

7 years agopower: android-battery: Provide fake values when fuel gauge missing
Todd Poynor [Thu, 23 Aug 2012 02:02:26 +0000]
power: android-battery: Provide fake values when fuel gauge missing

Avoid shutdown due to battery capacity or temperature out of range.

Change-Id: I54abe4dc54bf2fb8a9b972a3940e6fd93cc60473
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agogpu: ion: Switch to using kmalloc rather than kmap during allocation
Rebecca Schultz Zavin [Wed, 22 Aug 2012 04:35:20 +0000]
gpu: ion: Switch to using kmalloc rather than kmap during allocation

Previously, metadata was stored in the allocated pages themselves
during allocation.  However the system can only have a limited
number of kmapped pages.  A very large allocation might exceed
this limit.

Change-Id: Ibe972096e83924bf5e621d8282c4cd133ca75b0a
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agosync: fix erase-o in sync_fence_wait
Erik Gilling [Wed, 22 Aug 2012 01:43:21 +0000]
sync: fix erase-o in sync_fence_wait

Change-Id: I189707cf658a9f1f2943515c891b43961994e774
Signed-off-by: Erik Gilling <konkers@android.com>

7 years agosync: change wait timeout to mirror poll semantics
Erik Gilling [Wed, 22 Aug 2012 00:57:19 +0000]
sync: change wait timeout to mirror poll semantics

Change-Id: Ib38e6d339d41885a33027752690d65a52b6897f6
Signed-off-by: Erik Gilling <konkers@android.com>

7 years agoARM: disable preemption in machine_shutdown
Mike J. Chen [Thu, 24 May 2012 22:12:36 +0000]
ARM: disable preemption in machine_shutdown

Since the smp call to stop the other cpus are handled in those
cpus in interrupt context, there's a potential for those smp
handlers to interrupt threads holding spin locks (such as the
one a mutex holds).  This prevents those threads from ever
releasing their spin lock, so if the cpu doing the shutdown
is allowed to switch to another thread that tries to grab the
same lock/mutex, we could get into a deadlock (the spin lock
call is called with preemption disabled in the mutex lock code).

To avoid that possibility, disable preemption before doing the
smp_send_stop().

Change-Id: I7976c5382d7173fcb3cd14da8cc5083d442b2544
Signed-off-by: Mike J. Chen <mjchen@google.com>

7 years agoHACK: ARM: disable sleeping while atomic warning in do_signal
Colin Cross [Wed, 15 Aug 2012 20:10:04 +0000]
HACK: ARM: disable sleeping while atomic warning in do_signal

ARM disables interrupts in do_signal, which triggers a warning in
try_to_freeze, see details at https://lkml.org/lkml/2011/8/23/221.
To prevent the warnings, add try_to_freeze_nowarn and call it from
do_signal.

Change-Id: If7482de21c386adc705fa1ac4ecb8c7ece5bb356
Signed-off-by: Colin Cross <ccross@android.com>

7 years agoHID: uhid: Fix sending events with invalid data
Vinicius Costa Gomes [Sat, 14 Jul 2012 21:59:25 +0000]
HID: uhid: Fix sending events with invalid data

This was detected because events with invalid types were arriving
to userspace.

The code before this patch would only work for the first event in the
queue (when uhid->tail is 0).

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Reviewed-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agoHID: uhid: silence gcc warning
Jiri Kosina [Mon, 18 Jun 2012 15:08:08 +0000]
HID: uhid: silence gcc warning

gcc is giving me:

drivers/hid/uhid.c: In function ‘uhid_hid_get_raw’:
drivers/hid/uhid.c:157: warning: ‘len’ may be used uninitialized in this function

which is clearly bogus, as

- when used as memcpy() argument, it's initialized properly
- the code is structured in a way that either 'ret' or 'len'
  is always initialized, so the return statement always has
  an initialized value.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agoMAINTAINERS: add UHID entry
David Herrmann [Sun, 10 Jun 2012 13:16:28 +0000]
MAINTAINERS: add UHID entry

Add an UHID entry to the MAINTAINERS file.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agoHID: uhid: add example program
David Herrmann [Sun, 10 Jun 2012 13:16:27 +0000]
HID: uhid: add example program

This adds an example user-space program that emulates a 3 button mouse
with wheel. It detects keyboard presses and moves the mouse accordingly.

It register a fake HID device to feed the raw HID reports into the kernel.
In this example, you could use uinput to get the same result, but this
shows how to get the same behavior with uhid so you don't need HID parsers
in user-space.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agoHID: uhid: add documentation
David Herrmann [Sun, 10 Jun 2012 13:16:26 +0000]
HID: uhid: add documentation

This describes the protocol used by uhid for user-space applications. It
describes the details like non-blocking I/O and readv/writev for multiple
events per syscall.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agoHID: uhid: implement feature requests
David Herrmann [Sun, 10 Jun 2012 13:16:25 +0000]
HID: uhid: implement feature requests

HID standard allows sending a feature request to the device which is
answered by an HID report. uhid implements this by sending a UHID_FEATURE
event to user-space which then must answer with UHID_FEATURE_ANSWER. If it
doesn't do this in a timely manner, the request is discarded silently.

We serialize the feature requests, that is, there is always only a single
active feature-request sent to user-space, other requests have to wait.
HIDP and USB-HID do it the same way.

Because we discard feature-requests silently, we must make sure to match
a response to the corresponding request. We use sequence-IDs for this so
user-space must copy the ID from the request into the answer.
Feature-answers are ignored if they do not contain the same ID as the
currently pending feature request.

Internally, we must make sure that feature-requests are synchronized with
UHID_DESTROY and close() events. We must not dead-lock when closing the
HID device, either, so we have to use separate locks.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agoHID: uhid: forward raw output reports to user-space
David Herrmann [Sun, 10 Jun 2012 13:16:24 +0000]
HID: uhid: forward raw output reports to user-space

Some drivers that use non-standard HID features require raw output reports
sent to the device. We now forward these requests directly to user-space
so the transport-level driver can correctly send it to the device or
handle it correspondingly.

There is no way to signal back whether the transmission was successful,
moreover, there might be lots of messages coming out from the driver
flushing the output-queue. However, there is currently no driver that
causes this so we are safe. If some drivers need to transmit lots of data
this way, we need a method to synchronize this and can implement another
UHID_OUTPUT_SYNC event.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agoHID: uhid: forward output request to user-space
David Herrmann [Sun, 10 Jun 2012 13:16:23 +0000]
HID: uhid: forward output request to user-space

If the hid-driver wants to send standardized data to the device it uses a
linux input_event. We forward this to the user-space transport-level
driver so they can perform the requested action on the device.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agoHID: uhid: forward open/close events to user-space
David Herrmann [Sun, 10 Jun 2012 13:16:22 +0000]
HID: uhid: forward open/close events to user-space

HID core notifies us with *_open/*_close callbacks when there is an actual
user of our device. We forward these to user-space so they can react on
this. This allows user-space to skip I/O unless they receive an OPEN
event. When they receive a CLOSE event they can stop I/O again to save
energy.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agoHID: uhid: add UHID_START and UHID_STOP events
David Herrmann [Sun, 10 Jun 2012 13:16:21 +0000]
HID: uhid: add UHID_START and UHID_STOP events

We send UHID_START and UHID_STOP events to user-space when the HID core
starts/stops the device. This notifies user-space about driver readiness
and data-I/O can start now.

This directly forwards the callbacks from hid-core to user-space.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agoHID: uhid: forward hid report-descriptor to hid core
David Herrmann [Sun, 10 Jun 2012 13:16:20 +0000]
HID: uhid: forward hid report-descriptor to hid core

When the uhid_hid_parse callback is called we simply forward it to
hid_parse_report() with the data that we got in the UHID_CREATE event.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agoHID: uhid: allow feeding input data into uhid devices
David Herrmann [Sun, 10 Jun 2012 13:16:19 +0000]
HID: uhid: allow feeding input data into uhid devices

This adds a new event type UHID_INPUT which allows user-space to feed raw
HID reports into the HID subsystem. We copy the data into kernel memory
and directly feed it into the HID core.

There is no error handling of the events couldn't be parsed so user-space
should consider all events successfull unless read() returns an error.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agoHID: uhid: add UHID_CREATE and UHID_DESTROY events
David Herrmann [Sun, 10 Jun 2012 13:16:18 +0000]
HID: uhid: add UHID_CREATE and UHID_DESTROY events

UHID_CREATE and UHID_DESTROY are used to create and destroy a device on an
open uhid char-device. Internally, we allocate and register an HID device
with the HID core and immediately start the device. From now on events may
be received or sent to the device.

The UHID_CREATE event has a payload similar to the data used by
Bluetooth-HIDP when creating a new connection.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agoHID: uhid: implement write() on uhid devices
David Herrmann [Sun, 10 Jun 2012 13:16:17 +0000]
HID: uhid: implement write() on uhid devices

Similar to read() you can only write() a single event with one call to an
uhid device. To write multiple events use writev() which is supported by
uhid.

We currently always return -EOPNOTSUPP but other events will be added in
later patches.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agoHID: uhid: implement read() on uhid devices
David Herrmann [Sun, 10 Jun 2012 13:16:16 +0000]
HID: uhid: implement read() on uhid devices

User-space can use read() to get a single event from uhid devices. read()
does never return multiple events. This allows us to extend the event
structure and still keep backwards compatibility.

If user-space wants to get multiple events in one syscall, they should use
the readv()/writev() syscalls which are supported by uhid.

This introduces a new lock which helps us synchronizing simultaneous reads
from user-space. We also correctly return -EINVAL/-EFAULT only on errors
and retry the read() when some other thread captured the event faster than
we did.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agoHID: uhid: allow poll()'ing on uhid devices
David Herrmann [Sun, 10 Jun 2012 13:16:15 +0000]
HID: uhid: allow poll()'ing on uhid devices

As long as the internal buffer is not empty, we return POLLIN to
user-space.

uhid->head and uhid->tail are no atomics so the comparison may return
inexact results. However, this doesn't matter here as user-space would
need to poll() in two threads simultaneously to trigger this. And in this
case it doesn't matter if a cached result is returned or the exact new
result as user-space does not know which thread returns first from poll()
and the following read(). So it is safe to compare the values without
locking.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agoHID: uhid: add internal message buffer
David Herrmann [Sun, 10 Jun 2012 13:16:14 +0000]
HID: uhid: add internal message buffer

When receiving messages from the HID subsystem, we need to process them
and store them in an internal buffer so user-space can read() on the char
device to retrieve the messages.

This adds a static buffer for 32 messages to each uhid device. Each
message is dynamically allocated so the uhid_device structure does not get
too big.

uhid_queue() adds a message to the buffer. If the buffer is full, the
message is discarded. uhid_queue_event() is an helper for messages without
payload.

This also adds a public header: uhid.h. It contains the declarations for
the user-space API. It is built around "struct uhid_event" which contains
a type field which specifies the event type and each event can then add a
variable-length payload. For now, there is only a dummy event but later
patches will add new event types and payloads.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agoHID: uhid: introduce user-space I/O driver support for HID
David Herrmann [Sun, 10 Jun 2012 13:16:13 +0000]
HID: uhid: introduce user-space I/O driver support for HID

This adds a dummy driver that will support user-space I/O drivers for the
HID subsystem. This allows to write transport-level drivers like USB-HID
and Bluetooth-HID in user-space.

Low-Energy Bluetooth needs this to feed HID data that is parsed in
user-space back into the kernel.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

7 years agopower: smb347: mask old value when setting float voltage
hongmin.son [Wed, 15 Aug 2012 22:18:02 +0000]
power: smb347: mask old value when setting float voltage

Fixed set float voltage function to mask off previous value in
register before OR'ing in new value.

Change-Id: I7b413a8c0190c1b011e8f142b95ca79e9188cebc
Signed-off-by: hongmin.son <hongmin.son@samsung.com>

7 years agoARM: tegra: pm: Use rcuidle tracing for cluster switch
Antti P Miettinen [Wed, 12 Sep 2012 16:16:25 +0000]
ARM: tegra: pm: Use rcuidle tracing for cluster switch

Change traces in idle to use rcuidle variants.

Change-Id: I3684c5ddd246202ae204f583f4755b542def4c5c
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Reviewed-on: http://git-master/r/131882
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoARM: tegra: enterprise: set I2S as slave mode.
Ankit Gupta [Mon, 13 Aug 2012 06:44:51 +0000]
ARM: tegra: enterprise: set I2S as slave mode.

Setting default I2S mode as slave. This will help in power
optimization of around 4mW.

Reviewed-on: http://git-master/r/125181
(cherry picked from commit 6667859ccb945a51c93d3f282e31b9283334fa53)

Change-Id: Ibe4020de5095004f7d525620fd8a9f05792bb4b9
Signed-off-by: Chandrakanth <cgorantla@nvidia.com>
Reviewed-on: http://git-master/r/131788
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoARM: Tegra: Define DT bindings for T30 DVFS
Prashant Gaikwad [Wed, 1 Aug 2012 12:45:34 +0000]
ARM: Tegra: Define DT bindings for T30 DVFS

Define device tree bindings for Tegra30 CPU and
Core DVFS tables.

Bug 906383

Change-Id: Ib04bc59fe314c82321f9cf414dd50b6ba9c3b822
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/130670
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agodrivers: devfreq: Fix devfreq stub functions
Arto Merilainen [Fri, 14 Sep 2012 06:36:13 +0000]
drivers: devfreq: Fix devfreq stub functions

This patch allows the kernel to build even if devfreq.h is included
when devfreq support is not available.

Change-Id: I01f1bdd9dda755f86255e5609c2a5411cfb64480
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/132557
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>

7 years agovideo: tegra: host: new syncpoint max interface
Michal Pecio [Wed, 29 Aug 2012 21:34:38 +0000]
video: tegra: host: new syncpoint max interface

Add the NVHOST_IOCTL_CTRL_SYNCPT_READ_MAX ioctl for reading max value
of a syncpoint.

Bug 1039058

Change-Id: I61c348c3007a4fb919fbe48993907d46f38c5fa8
Signed-off-by: Michal Pecio <mpecio@nvidia.com>
Reviewed-on: http://git-master/r/132387
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

7 years agoARM: tegra: dalmore: Add cpu dfll platform data
Alex Frid [Thu, 13 Sep 2012 00:34:07 +0000]
ARM: tegra: dalmore: Add cpu dfll platform data

Change-Id: Ie61c0a87c1c5d71ead81fd9768de5ecff2a32c8e
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/131982
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

7 years agodrivers: video: tegra: Allow disabling devfreq
Arto Merilainen [Fri, 14 Sep 2012 07:14:08 +0000]
drivers: video: tegra: Allow disabling devfreq

This patch allows to build host1x driver without configuring devfreq.
If devfreq is not used, the 3d is set to its maximum clock always
when the device is busy.

Bug 965517

Change-Id: I372779bdb8563ed9cce96de0a62422c7e0d26c8f
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/132558
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

7 years agoregulator: core: change microvolt permission to 0644
Laxman Dewangan [Fri, 14 Sep 2012 05:42:22 +0000]
regulator: core:  change microvolt permission to 0644

Allow change of voltage through user space with root
permission only.

bug 1004472

Change-Id: I8f96872c9c3915f1e39191a26f2a18acdc9c5d6c
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/132529
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agovideo: tegra: host: Actmon cannot be disabled
Terje Bergstrom [Thu, 13 Sep 2012 10:11:14 +0000]
video: tegra: host: Actmon cannot be disabled

Actmon cannot be disabled directly. Work around that by turning off
periodic mode when we want to disable it. When we want to re-enable,
wait for actmon to be disabled before re-initializing.

Bug 1036209

Change-Id: If6344b39eb86c66073a55bae5794c3608821156b
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/132165
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

7 years agortc: tps65910: add RTC driver for TPS65910 PMIC RTC
Venu Byravarasu [Thu, 13 Sep 2012 01:01:18 +0000]
rtc: tps65910: add RTC driver for TPS65910 PMIC RTC

TPS65910 PMIC is a MFD with RTC as one of the device.  Adding RTC driver
for supporting RTC device present inside TPS65910 PMIC.

Only support for RTC alarm is implemented as part of this patch.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 7df2d82cd4b0b350d4e507eb502b31b568029172)
Change-Id: Ibc977599db45a7f8d4930c8182a18f31ba535a68
Reviewed-on: http://git-master/r/132543
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit