Commit graph

39,336 commits

Author SHA1 Message Date
Mike Lockwood
99b7fdff26 USB: gadget: f_accessory: Add string for accessory's unique serial number
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-14 19:48:33 -04:00
Mike Lockwood
5dcd55b2e9 USB: gadget: f_accessory: Misc improvements and cleanup:
- Add URI string

- Replace type string with a description string

- Add a control call to retrieve accessory protocol version (currently 1)

- Driver read() and write() calls now fail after USB disconnect until
  driver file is closed and reopened.

- Misc cleanup work

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-10 10:07:27 -05:00
makarand.karvekar
80013113a0 misc: gyro: interrupt based gyro data read and report
gyro ODR set at 100/200/400/800 Hz
closest to requested delay.
gyro data read and reported at every interrupt.
Reported rate matches the gyro ODR rate

Change-Id: I754ea31054d73863b0512607abe81f1f1dcea367
Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
2011-03-09 13:19:55 -08:00
makarand.karvekar
cbdfcbc03f leds: lp8550: get backlight scaling factor from platform data
backlight scaling factor varies with display panel

Change-Id: I45ea0d76526d4297412d177481acded082ce7104
Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
2011-03-04 10:54:29 -08:00
Colin Cross
11267bd7f0 Merge branch 'android-tegra-2.6.36' into android-tegra-moto-2.6.36 2011-03-01 17:27:10 -08:00
Colin Cross
4f72bb8edd Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36 2011-03-01 17:26:56 -08:00
Benoit Goby
406248bb21 usb: otg: Add ulpi viewport access ops
Add generic access ops for controllers with a ulpi viewport register
(e.g. Chipidea based controller).

Change-Id: I53d50857d4716f8df708af199ad1def1ff9d4beb
Signed-off-by: Benoit Goby <benoit@android.com>
2011-03-01 17:13:32 -08:00
Benoit Goby
54463de0ff usb: host: tegra: Cleanup before sending upstream
Change-Id: I846d43b1ecbe6c726f024b6a0fb318d6300a3746
Signed-off-by: Benoit Goby <benoit@android.com>
2011-03-01 17:13:31 -08:00
Benoit Goby
adbe9c4871 usb: host: Moved tegra_usb.h to include/linux/platform_data
Change-Id: Ic093d07858eb6e27aae9cd04d4c59407b5b1d76d
Signed-off-by: Benoit Goby <benoit@android.com>
2011-03-01 17:13:29 -08:00
Erik Gilling
5257d707de Merge branch 'android-tegra' into android-tegra-moto 2011-02-24 17:18:22 -08:00
Erik Gilling
56edb8f957 Merge branch linux-tegra-2.6.36 into android-tegra-2.6.36
Conflicts:
	drivers/video/tegra/dc/hdmi.c

Change-Id: I10fd2dbcc07d7961dd75e10a2c4de926457c2912
2011-02-24 17:13:10 -08:00
Jon Mayo
cf030d95bb [ARM] tegra: hdmi nvhdcp driver
Device /dev/nvhdcpX is used to manage NVHDCP on framebuffer /dev/fbX.
These devices are created on hdmi driver initialition when it is
attached to dc. Currently only one nvhdcp device may be created. An ioctl
interface is in video/nvhdcp.h

Check for repeaters and store repeater info. userspace application
queries this status to authenticate the connection. When authentication
fails, auto-renegotiate every 1.75 seconds. Give up after 5 failed attempts,
reset after hotplug or policy change.

use TEGRA_DC_OUT_NVHDCP_POLICY_ON_DEMAND in tegra_dc_out.flags in board
panel configuration to select a different default policy at probe. Currently
only TEGRA_DC_OUT_NVHDCP_POLICY_ALWAYS_ON is supported.

Change-Id: I0db66fc86096b98d2604544061721d291523de75
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Tested-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Phillip Smith <psmith@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Signed-off-by: Erik Gilling <konkers@android.com>
2011-02-24 16:59:40 -08:00
Mike Lockwood
5826bb3c46 USB: gadget: f_accessory: New gadget driver for android USB accesories
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-23 15:55:52 -08:00
James Wylder
246ce81338 misc: radio_ctrl: Add Wrigley Driver to support LTE
Add driver to support control operations power-up,
power-down, incoming wakeup and reset for the Motorola
Wrigley Modem.

Change-Id: I6955759b7bbfd48a9756c07886aa8b3f34dd2762
Signed-off-by: James Wylder <james.wylder@motorola.com>
2011-02-18 18:46:27 -08:00
James Wylder
5c9ec517d0 misc: radio_ctrl: Create radio control interface
Migrate the mdm6x00 sysfs interface to its own
driver so that additional drivers can be added.

Change-Id: Ia647f298adaba75ac296b2b33e632ba55e4dd55a
Signed-off-by: James Wylder <james.wylder@motorola.com>
2011-02-18 16:33:37 -08:00
Rebecca Schultz Zavin
7f10211b31 Merge remote branch 'tegra/android-tegra-2.6.36' into android-tegra-moto-2.6.36 2011-02-16 09:59:39 -08:00
Rebecca Schultz Zavin
fd57a71c00 Merge remote branch 'common/android-2.6.36' into android-tegra-2.6.36 2011-02-16 09:56:33 -08:00
Dmitry Shmidt
69fa8ccfb7 net: wireless: Add get_country_code functionality to platform
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-02-14 16:58:48 -08:00
Colin Cross
7aa771f81d Merge branch 'android-tegra-2.6.36' into android-tegra-moto-2.6.36 2011-02-12 14:23:33 -08:00
Colin Cross
5a7997f3fb Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36 2011-02-12 14:13:29 -08:00
Colin Cross
87666eb18a Merge branch 'android-2.6.36' into android-tegra-2.6.36 2011-02-12 14:13:19 -08:00
Colin Cross
1cd64ef5c1 Revert "mmc: subtract boot sectors from disk size for eMMC 4.3+ devices"
This reverts commit f0b0e4bec1.

The reverted commit incorrectly calculates the size of eMMC
devices in some (all?) cases.

This revert may cause problems in cases where the bootloader was
bug-compatible and puts a GPT partition at the incorrect end of
the eMMC device.

Change-Id: Ib006acf9e517b3b8f7570220c28e19c91e7b5f25
Signed-off-by: Colin Cross <ccross@android.com>
2011-02-12 13:24:26 -08:00
Colin Cross
6b53bad8ac Revert "mmc: subtract boot sectors from disk size for eMMC 4.3+ devices"
This reverts commit 2cdc235bbe.

The reverted commit incorrectly calculates the size of eMMC
devices in some (all?) cases.

This revert may cause problems in cases where the bootloader was
bug-compatible and puts a GPT partition at the incorrect end of
the eMMC device.

Change-Id: Icc9ddb3d294aa2a1caeddfe8fedd2e12aa7691e1
2011-02-11 14:03:52 -08:00
Mike Lockwood
99648ea95e USB: gadget: android: Support switching vendor ID when configuration changes
Based on the list of enabled USB functions, we can now switch the vendor ID
as well as the product ID.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-09 13:01:05 -05:00
prabhu annabathula
919c384106 misc: gps_brcm4750: Adding wake up timer support for Brcm gps v17 library
broadcom gps library will schedule the wake up timer in two cases
 - when a fix interval longer than 5 seconds is requested
 - when integrating long for very weak gps signals
In these two cases brcm library will release the wakelock and schedule
timer to wake up if the system goes in to deep sleep.

Signed-off-by: prabhu annabathula <prabhu.annabathula@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-09 10:37:14 -05:00
Robert Morell
a0d7774b25 USB: HCD: Add driver hooks for (un)?map_urb_for_dma
Provide optional hooks for the host controller driver to override the
default DMA mapping and unmapping routines.  In general, these shouldn't
be necessary unless the host controller has special DMA requirements,
such as alignment contraints.  If these are not specified, the
general usb_hcd_(un)?map_urb_for_dma functions will be used instead.
Also, pass the status to unmap_urb_for_dma so it can know whether the
DMA buffer has been overwritten.

Finally, add a flag to be used by these implementations if they
allocated a temporary buffer so it can be freed properly when unmapping.

Signed-off-by: Robert Morell <rmorell@nvidia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-08 15:18:16 -08:00
Robert Morell
736268d863 USB: HCD: Add usb_hcd prefix to exported functions
The convention is to prefix symbols exported from the USB HCD core with
"usb_hcd".  This change makes unmap_urb_setup_for_dma() and
unmap_urb_for_dma() consistent with that.

Signed-off-by: Robert Morell <rmorell@nvidia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-08 15:18:11 -08:00
Erik Gilling
2a65edc3ae Merge branch android-tegra-2.6.36 into android-tegra-moto-2.6.36
Change-Id: I7647524dbf346987bcd1dcc1c19479d74470b308
2011-02-07 15:20:38 -08:00
Erik Gilling
e51ab3740d Merge branch linux-tegra-2.6.36 into android-tegra-2.6.36
Change-Id: I6fcdbcd0eb7103ac580deb94faf79959a5818ba1
2011-02-07 15:18:27 -08:00
Erik Gilling
cef13d98eb video: fbmon: add HDMI dectetion to fbmod edid parsing
Looks for ieee registration numver 0x000c03 as per HDMI spec.

Change-Id: I6875b24c66e8754510edabcb4f9ba682a50d6ac1
Signed-off-by: Erik Gilling <konkers@android.com>
2011-02-07 14:56:20 -08:00
makarand.karvekar
4efb08969e misc: cap_prox: add fail-safe threshold checks
if either of the sensors are in failure mode,
keep device in body proximity detect.

Change-Id: I4e460ac30e3612863a995e73b7869aa619ea5eb6
Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
2011-01-14 15:24:45 -08:00
makarand.karvekar
ee28cc2854 misc: l3g4200d: update gyro register set and general cleanup
Change-Id: I17c2384842e1528c4dbdedb094e79de3c44ac5ee
Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
2011-01-14 12:10:22 -08:00
makarand.karvekar
56e6a430f4 misc: kxtf9: report accelerometer data as EV_REL events
reports EV_REL type events for continuous data.
updated ODR table.

Change-Id: I0da2ac63a25816641207f748d9f477fc16779b2c
Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
2011-01-14 12:06:23 -08:00
makarand.karvekar
24a0ad84a0 input: touchscreen: qtouch: update palm suppression cfg params
Change-Id: I74d99c06ee8b73a2ed59cbfe5264f2f7370c4e48
Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
2011-01-14 12:02:23 -08:00
Colin Cross
c07aee9df0 Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36
Conflicts:
	drivers/misc/Kconfig
	drivers/misc/Makefile

Change-Id: I826244513f799fdd2fb0269abad3271c96661293
2011-01-08 14:47:29 -08:00
Todd Poynor
4b1622335d NCT1008 temperature sensor driver
Replace the PM-only driver for NCT1008 with a new version written by
Varun Wadekar and Dmitriy Gruzman.  Add a callback to an alarm
function specified in the board platform data.

Change-Id: Ib429533930ee75af3402d24b0bc286da9f6ee67b
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-01-07 20:42:59 -08:00
Greg Meiste
63b6d550a6 misc: Initial NCT1008 driver
Initial version of the NCT1008 driver to turn off the sensor when the
device is suspended.  This improves standby current drain.

Change-Id: Ia64613c33c0052434d5e304c434605611e5ef789
Signed-off-by: Greg Meiste <w30289@motorola.com>
2011-01-07 20:37:34 -08:00
Todd Poynor
3d9f0d7a7e NCT1008 temperature sensor driver
Replace the PM-only driver for NCT1008 with a new version written by
Varun Wadekar and Dmitriy Gruzman.  Add a callback to an alarm
function specified in the board platform data.

Change-Id: Ib429533930ee75af3402d24b0bc286da9f6ee67b
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-01-07 18:00:41 -08:00
Colin Cross
07e419d412 Merge branch 'android-tegra-2.6.36' into android-tegra-moto-2.6.36 2011-01-07 17:21:20 -08:00
Colin Cross
3515161181 Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36
Conflicts:
	arch/arm/mm/cache-v6.S

Change-Id: I1a2063218dd705a762a40f4a9dfe504ce1a1d491
2011-01-07 17:20:53 -08:00
Colin Cross
c37bff7878 Merge branch 'android-2.6.36' into android-tegra-2.6.36 2011-01-07 17:16:59 -08:00
Colin Cross
bd842b53fa Merge commit 'v2.6.36.3' into linux-tegra-2.6.36 2011-01-07 17:14:48 -08:00
Colin Cross
77fc4228f7 input: keyreset: Allow reset function to be overriden
Change-Id: Ibb3dda05772b2e89d7b2646689944d309cb1f74e
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-07 14:52:56 -08:00
Mauro Carvalho Chehab
a61eefaccf Don't export format_by_forcc on two different drivers
commit a757ee2216 upstream.

Drivers should append their name on exported symbols, to avoid
conflicts with allyesconfig:

drivers/staging/built-in.o: In function `format_by_fourcc':
/home/v4l/work_trees/linus/drivers/staging/cx25821/cx25821-video.c:96: multiple definition of `format_by_fourcc'
drivers/media/built-in.o:/home/v4l/work_trees/linus/drivers/media/common/saa7146_video.c:88: first defined here

Let's rename both occurences with a small shellscript:

for i in drivers/staging/cx25821/*.[ch]; do sed s,format_by_fourcc,cx25821_format_by_fourcc,g <$i >a && mv a $i; done
for i in drivers/media/common/saa7146*.[ch]; do sed s,format_by_fourcc,saa7146_format_by_fourcc,g <$i >a && mv a $i; done
for i in include/media/saa7146*.[ch]; do sed s,format_by_fourcc,saa7146_format_by_fourcc,g <$i >a && mv a $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07 13:58:54 -08:00
Martin K. Petersen
42e9b5a7c3 block: Deprecate QUEUE_FLAG_CLUSTER and use queue_limits instead
commit e692cb668f upstream.

When stacking devices, a request_queue is not always available. This
forced us to have a no_cluster flag in the queue_limits that could be
used as a carrier until the request_queue had been set up for a
metadevice.

There were several problems with that approach. First of all it was up
to the stacking device to remember to set queue flag after stacking had
completed. Also, the queue flag and the queue limits had to be kept in
sync at all times. We got that wrong, which could lead to us issuing
commands that went beyond the max scatterlist limit set by the driver.

The proper fix is to avoid having two flags for tracking the same thing.
We deprecate QUEUE_FLAG_CLUSTER and use the queue limit directly in the
block layer merging functions. The queue_limit 'no_cluster' is turned
into 'cluster' to avoid double negatives and to ease stacking.
Clustering defaults to being enabled as before. The queue flag logic is
removed from the stacking function, and explicitly setting the cluster
flag is no longer necessary in DM and MD.

Reported-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07 13:58:51 -08:00
Rafael J. Wysocki
e87167421b PM / Runtime: Fix pm_runtime_suspended()
commit f08f5a0add upstream.

There are some situations (e.g. in __pm_generic_call()), where
pm_runtime_suspended() is used to decide whether or not to execute
a device's (system) ->suspend() callback.  The callback is not
executed if pm_runtime_suspended() returns true, but it does so
for devices that don't even support runtime PM, because the
power.disable_depth device field is ignored by it.  This leads to
problems (i.e. devices are not suspened when they should), so rework
pm_runtime_suspended() so that it returns false if the device's
power.disable_depth field is different from zero.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07 13:58:32 -08:00
Peter Zijlstra
2ebd26f64a sched: Cure more NO_HZ load average woes
commit 0f004f5a69 upstream.

There's a long-running regression that proved difficult to fix and
which is hitting certain people and is rather annoying in its effects.

Damien reported that after 74f5187ac8 (sched: Cure load average vs
NO_HZ woes) his load average is unnaturally high, he also noted that
even with that patch reverted the load avgerage numbers are not
correct.

The problem is that the previous patch only solved half the NO_HZ
problem, it addressed the part of going into NO_HZ mode, not of
comming out of NO_HZ mode. This patch implements that missing half.

When comming out of NO_HZ mode there are two important things to take
care of:

 - Folding the pending idle delta into the global active count.
 - Correctly aging the averages for the idle-duration.

So with this patch the NO_HZ interaction should be complete and
behaviour between CONFIG_NO_HZ=[yn] should be equivalent.

Furthermore, this patch slightly changes the load average computation
by adding a rounding term to the fixed point multiplication.

Reported-by: Damien Wyart <damien.wyart@free.fr>
Reported-by: Tim McGrath <tmhikaru@gmail.com>
Tested-by: Damien Wyart <damien.wyart@free.fr>
Tested-by: Orion Poplawski <orion@cora.nwra.com>
Tested-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Chase Douglas <chase.douglas@canonical.com>
LKML-Reference: <1291129145.32004.874.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07 13:58:31 -08:00
Jeremy Fitzhardinge
4f7b9db5e1 xen: Provide a variant of __RING_SIZE() that is an integer constant expression
commit 667c78afae upstream.

Without this, gcc 4.5 won't compile xen-netfront and xen-blkfront, where
this is being used to specify array sizes.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07 13:58:31 -08:00
Eric Dumazet
414bdc2581 filter: fix sk_filter rcu handling
[ Upstream commit 46bcf14f44 ]

Pavel Emelyanov tried to fix a race between sk_filter_(de|at)tach and
sk_clone() in commit 47e958eac2

Problem is we can have several clones sharing a common sk_filter, and
these clones might want to sk_filter_attach() their own filters at the
same time, and can overwrite old_filter->rcu, corrupting RCU queues.

We can not use filter->rcu without being sure no other thread could do
the same thing.

Switch code to a more conventional ref-counting technique : Do the
atomic decrement immediately and queue one rcu call back when last
reference is released.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07 13:58:27 -08:00
Eric Dumazet
12987cd3a4 af_unix: limit recursion level
[ Upstream commit 25888e3031 ]

Its easy to eat all kernel memory and trigger NMI watchdog, using an
exploit program that queues unix sockets on top of others.

lkml ref : http://lkml.org/lkml/2010/11/25/8

This mechanism is used in applications, one choice we have is to have a
recursion limit.

Other limits might be needed as well (if we queue other types of files),
since the passfd mechanism is currently limited by socket receive queue
sizes only.

Add a recursion_level to unix socket, allowing up to 4 levels.

Each time we send an unix socket through sendfd mechanism, we copy its
recursion level (plus one) to receiver. This recursion level is cleared
when socket receive queue is emptied.

Reported-by: Марк Коренберг <socketpair@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07 13:58:26 -08:00