Commit Graph

1082 Commits

Author SHA1 Message Date
Linux Build Service Account
7c6b53848c Merge "pmem: Fix a possible NULL pointer dereference" into msm-3.0 2012-01-20 14:12:37 -08:00
Vipul Gandhi
f752bf6a28 pmem: Fix a possible NULL pointer dereference
Fix a possible Null pointer dereference when allocating the
garbage page and fixed potential leaks caused in the error path.
Fixed potential leaks in pmem_remove.

Change-Id: I7d4fa0798553691ed80e5024b19ba363249576b3
CRs-Fixed: 313700
Signed-off-by: Vipul Gandhi <vgandhi@codeaurora.org>
2012-01-18 23:51:36 -08:00
Mona Hossain
6e2e26984f tzcom: Add support for modifying specific fields in cmd_buf
Allow client to send information to replace a specific field of
the cmd buffer with the physical address.  This is done via a new
IOCTL, TZCOM_IOCTL_SEND_CMD_FD_REQ, which is used to import the
ion fd handle. This IOCTL takes in a new send_cmd_fd_op_req
structure that has the same format as send-cmd_op_req with a
new field added: an array of ion handles (ifd_data.fd) and
cmd_buf_offset.

The client sends in an array of ion fd handle along with the
offset to the command buffer field.

This new IOCTL allows a client to send information regarding
which field(s) (at cmd_buf_offset) in the cmd_buf to replace.
These field(s) are replaced with the physical addr of the
buffer addressed by the respective ifd_data.fd handle.

Change-Id: If210013d46e24776fe6f5c6aa257505b3b1e6e00
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
2012-01-13 19:02:53 -08:00
Anirudh Ghayal
4786e9fdba drivers: pm8058: Delete pmic8058 specific subdevice drivers
PM8058 subdevices now use pm8xxx based drivers.
Delete keypad, power-key, vibrator, rtc, mpp, gpio, thermal,
batt-alarm, misc drivers.

Change-Id: I7cb06a48b7d724aa1e1790ba88feeece1701bb35
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2012-01-02 09:57:46 +05:30
Linux Build Service Account
dcee254e06 Merge "tspp: supporting files for building TSPP driver" into msm-3.0 2011-12-22 15:03:43 -08:00
Laura Abbott
511edafecf pmem: add support for reusable pmem
Individual pmem devices can now be marked as reusable. The
memory will be reused through fmem.

Change-Id: Id71c2e0c42f093420c241771d7a2620ed2accfc4
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-12-19 10:36:34 -08:00
Laura Abbott
72ae4bf926 pmem: Make request/release region return a value
the request_region/release_region call backs now return
an error code. This way if the request fails the allocation
can fail as well.

Change-Id: I817c65a43935fb41176ad03f5a7672fb5640084e
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-12-19 10:36:33 -08:00
Joel Nider
06a22edfd9 tspp: supporting files for building TSPP driver
These supporting files control the building of the TSPP driver.

Change-Id: I6cc087dd0c15ea5ce949506412466ec1fd39a5d1
Signed-off-by: Joel Nider <jnider@codeaurora.org>
2011-12-14 17:11:47 +02:00
Joel Nider
5556a85245 misc: tspp: adding TSPP driver files
The TSPP driver manages the transport stream packet processor.  This core
is used to offload the main CPU by handling MPEG TS packets, generally
coming from a broadcast modem using the ISDB-T (or variant) protocol.

Change-Id: Ia4c16dcce970ae0f52d8d17957a92fce34ecdb44
Signed-off-by: Joel Nider <jnider@codeaurora.org>
2011-12-13 10:14:33 +02:00
Linux Build Service Account
bcafbbb6ad Merge "drivers: misc: Add qfp_fuse into Makefile" into msm-3.0 2011-12-08 10:28:10 -08:00
Mohan Pallaka
acdca0fc02 misc: isa1200: Reset gpios properly in error path
Change-Id: I835e5ea520fe2e745b741e9e106a461062018199
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2011-12-08 11:45:22 +05:30
Anirudh Ghayal
83ba0ae668 misc: pm8xxx-vibrator: Fix unbalanced calls to spinlock
CRs-Fixed: 321105
Change-Id: Ia11cf8e15199277c2116498540ce2625fcb98786
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-12-02 14:50:52 +05:30
Rohit Vaswani
b187186a8c drivers: misc: Add qfp_fuse into Makefile
Change-Id: I14359a69217b27a698ab6a809c65d041c4e8138a
Acked-by:  Kaushik Sikdar <ksikdar@qualcomm.com>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2011-11-21 15:58:23 -07:00
Shubhraprakash Das
7788cadb00 pmem: Check for valid virtual address while flushing
Return invalid error if a NULL virtual address is
passed for pmem cache maintenance ioctl's

Change-Id: I18c369d4c2ac790b622408a988d171d6f75c4cd3
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2011-11-21 15:50:20 -07:00
Bryan Huntsman
d074fa2796 Merge remote-tracking branch 'common/android-3.0' into msm-3.0
* common/android-3.0: (570 commits)
  misc: remove kernel debugger core
  ARM: common: fiq_debugger: dump sysrq directly to console if enabled
  ARM: common: fiq_debugger: add irq context debug functions
  net: wireless: bcmdhd: Call init_ioctl() only if was started properly for WEXT
  net: wireless: bcmdhd: Call init_ioctl() only if was started properly
  net: wireless: bcmdhd: Fix possible memory leak in escan/iscan
  cpufreq: interactive governor: default 20ms timer
  cpufreq: interactive governor: go to intermediate hi speed before max
  cpufreq: interactive governor: scale to max only if at min speed
  cpufreq: interactive governor: apply intermediate load on current speed
  ARM: idle: update idle ticks before call idle end notifier
  input: gpio_input: don't print debounce message unless flag is set
  net: wireless: bcm4329: Skip dhd_bus_stop() if bus is already down
  net: wireless: bcmdhd: Skip dhd_bus_stop() if bus is already down
  net: wireless: bcmdhd: Improve suspend/resume processing
  net: wireless: bcmdhd: Check if FW is Ok for internal FW call
  tcp: Don't nuke connections for the wrong protocol
  ARM: common: fiq_debugger: make uart irq be no_suspend
  net: wireless: Skip connect warning for CONFIG_CFG80211_ALLOW_RECONNECT
  mm: avoid livelock on !__GFP_FS allocations
  ...

Conflicts:
	arch/arm/mm/cache-l2x0.c
	arch/arm/vfp/vfpmodule.c
	drivers/mmc/core/host.c
	kernel/power/wakelock.c
	net/bluetooth/hci_event.c

Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2011-11-16 13:52:50 -08:00
Anirudh Ghayal
c2019339bc mfd: pm8058: Modify pm8058 subdevices to pm8xxx interface
Move the following  subdevices to use the pm8xxx interface -
mpp, irq, gpio, keypad, power-key, leds, othc, vibrator,
rtc, batt-alarm, thermal, upl, nfc, pwm, xoadc, regulators,
xo-buffers, charger.

This allows usage of a common driver for modules which are same
across multiple PM8XXX PMICs. It also provides flexibility
to add/remove subdevices for multiple board configurations.

Change-Id: Id9795552fc9f4a2c920c070babfaef1f4cd6ca61
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-11-16 19:06:11 +05:30
Dima Zavin
9ab6a29787 misc: remove kernel debugger core
The current split between this and the fiq debugger is awkward and does
not have any benefit (the interface between the two is also too simplistic).
The fiq debugger code itself needs a lot of refactoring, part of which
would be to split out some components that are arch indpendent.

So, for now, move this very small piece back into the fiq_debugger.

Change-Id: Ie4ec2a2f5d907be1691a0eb6ae9304aad29ecd14
Signed-off-by: Dima Zavin <dima@android.com>
2011-11-14 10:27:10 -08:00
Colin Cross
2bb3e31015 Merge commit 'v3.0.8' into android-3.0 2011-10-27 15:01:19 -07:00
Siddartha Mohanadoss
8d8df13f60 misc: pmic8058-xoadc: Use ideal calibration for Headset
Input voltage range for Headset detect is in the region
close to the acceptable voltage range for this ADC.
Applying overall calibration on this channel offsets the
input voltage on this channel. Therefore use ideal
calibration for the HDSET MPP channel.

Change-Id: I9d4e926f9522ac2715accac47b1031d37ae38df7
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2011-10-26 18:31:30 -07:00
Ben Dooks
a6c514f3fb eeprom_93cx6: Add write support
Add support for writing data to EEPROM.

Change-Id: Id6b5096f2d59d21773c06ba3803151c2f3248956
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
[sboyd@codeaurora.org: use usleep_range() instead of msleep()]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2011-10-20 19:02:06 -07:00
Ben Dooks
69215d9680 eeprom_93cx6: Add data direction control.
Some devices need to know if the data is to be output or read, so add a
data direction into the eeprom structure to tell the driver whether the
data line should be driven.

The user in this case is the Micrel KS8851 which has a direction
control for the EEPROM data line and thus needs to know whether
to drive it (writing) or to tristate it for receiving.

Change-Id: Ic8bd7e13ce9bde423001ca23f3de02e76e1dbdaf
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2011-10-20 19:02:06 -07:00
Takashi Iwai
d694ac34a8 lis3: fix regression of HP DriveGuard with 8bit chip
commit 05faadcf59507e8eea57ffbeea9cbb14c9a2ab3d upstream.

Commit 2a7fade7e0 ("hwmon: lis3: Power on corrections") caused a
regression on HP laptops with 8bit chip.  Writing CTRL2_BOOT_8B bit seems
clearing the BIOS setup, and no proper interrupt for DriveGuard will be
triggered any more.

Since the init code there is basically only for embedded devices, put a
pdata check so that the problematic initialization will be skipped for
hp_accel stuff.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Cc: Samu Onkalo <samu.p.onkalo@nokia.com>
Signed-off-by: Andrew Morton <akpm@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-16 14:14:51 -07:00
Siddartha Mohanadoss
7112848099 misc: pmic8058-xoadc: request's done late into suspend
-Add checks in the driver for suspend_noirq/resume_noirq
to prevent clients from invoking the driver for ADC requests
after suspend has begun. This will lead to interrupts being
lost since the request is done very late into suspend.
-Obtain a wakelock when an ADC request is occuring.

CRs-Fixed: 295261
Change-Id: I610e1fbcd25f5ff947cb7e5e7738100ac86015a9
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2011-10-13 10:18:24 -07:00
Stephen Boyd
700819df8a tzcom: Rename playrdy to tzapps
Also fix a pil_put() bug while we're at it.

CRs-Fixed: 307844
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2011-10-05 10:28:02 -07:00
Sachin Shah
545fbfa16e tzcom: Set buffer address to NULL when alloc fails
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
2011-10-04 17:13:34 -07:00
Sachin Shah
d7e02d4d60 tzcom: Implement abort and cleanup of driver
Add a new IOCTL call to the driver to properly
abort all threads blocked on wait queues. Updated
release call for proper cleanup.

CRs-fixed: 303637, 304152
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
2011-10-03 16:21:33 -07:00
Sachin Shah
bae4ec0ec5 tzcom: Add more error checks and safe operations
Use safe list iterator where needed, check return
value for scm_call and add condition check for
different input buffer lengths.

Signed-off-by: Sachin Shah <sachins@codeaurora.org>
2011-10-03 16:21:08 -07:00
Mohan Pallaka
73787fae48 misc: isa1200: Add regulator support
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2011-10-03 16:20:56 -07:00
Matt Wagantall
640e5fd06d msm: tsif: Register device with clock driver and rename clocks
Rename the clocks per the new naming convention under which
similarly named clocks are distinguished between using their
associated device's name and ID.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2011-10-03 16:18:12 -07:00
Joel Nider
5578bdb65d tsif: tsif1 initialization bug fix
When using CONFIG_MSM_USE_TSIF1 to enable the second tsif instance,
the device initialization failed because of a errant device ID. The
check has been updated to accept the correct device ID range (0..1)

Signed-off-by: Joel Nider <jnider@codeaurora.org>
2011-10-03 16:17:16 -07:00
Sachin Shah
f0b51cd8ba tzcom: Turn some debug messages to error and warning
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
2011-10-03 16:15:45 -07:00
Sachin Shah
f3b54abcce tzcom: Fix resp calculation
Response buffer is always an offset in input shared buffer.
Can't rely on the sb_in_rsp_addr as that value is not filled
from TZ side. This also makes it consitent with the response
buffer calculation in tzcom_send_cmd().

Signed-off-by: Sachin Shah <sachins@codeaurora.org>
2011-10-03 16:15:19 -07:00
Sachin Shah
c3f8dd345d tzcom: Zero out input shared buffer
- Zero out SB input buffer after a request is
  successfully fulfilled to meet security
  requirements.
- Remove redundant check for response length.

Signed-off-by: Sachin Shah <sachins@codeaurora.org>
2011-10-03 16:15:18 -07:00
Naveen Ramaraj
189f188d29 PMEM: Pre reserve virtual address range for on demand devices.
Since the PMEM driver establishes ioremaps on the fly for
on demand devices it is possible for the virtual address space
to become quickly fragmented. For such devices, pre-reserve the
virtual address range and only set up page table mappings when
required.

CRs-Fixed: 299510
Signed-off-by: Naveen Ramaraj <nramaraj@codeaurora.org>
2011-10-03 16:15:12 -07:00
Willie Ruan
965072ee65 misc: pm8058-pwm: change a variable name to match its struct name
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
2011-10-03 16:14:27 -07:00
Willie Ruan
7bd1819099 misc: pm8058-pwm: select higher resolution if possible
More bits in PWM size means higher resolution, which is preferred
if we have such choice without sacrificing accuracy.

Signed-off-by: Willie Ruan <wruan@codeaurora.org>
2011-10-03 16:14:27 -07:00
Willie Ruan
368db79940 misc: pm8058-pwm: add two APIs
These two new APIs allow a driver to specify its PWM period
and duty cycle separately using PM8058 chip specific parameters
or raw values. The API to program a duty cycle uses hardware
module's LUT (LookUpTable) to output PWM value, which can be
used to alleviate potential glitches using direct writing to
PWM register.

Signed-off-by: Willie Ruan <wruan@codeaurora.org>
2011-10-03 16:14:26 -07:00
Willie Ruan
8a08b966fe misc: pm8058-pwm: bypass period calculation if no change
If a period is the same as before, there is no need to recalculate
it. This patch is adding such optimizations.

Signed-off-by: Willie Ruan <wruan@codeaurora.org>
2011-10-03 16:14:26 -07:00
Willie Ruan
efc2fa44f6 misc: pm8058-pwm: use small functions to replace bigger ones
Add small functions to replace bigger ones for better readability
and error checking.

Signed-off-by: Willie Ruan <wruan@codeaurora.org>
2011-10-03 16:14:25 -07:00
Willie Ruan
d3337ed9e3 misc: pm8058-pwm: split pw8058_pwm_config to smaller structs
A big struct of pw8058_pwm_config is not easy to manage. Split it
to smaller structs and make the period struct public.

Signed-off-by: Willie Ruan <wruan@codeaurora.org>
2011-10-03 16:14:25 -07:00
Anirudh Ghayal
fcfbea6273 drivers: misc: Add pm8xxx based vibrator driver
This driver uses the timed output framework to
support the vibrator functionality.

Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-10-03 10:28:13 -07:00
Vikram Mulukutla
f98205f74a pmic8058-vibrator: Do not call hrtimer_cancel when preemption is disabled
The hrtimer_cancel logic exposes a possible spinlock live-lock
situation, if this call is made when preemption is disabled.
Fix the code to avoid this situation.

CRs-Fixed: 299333
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2011-10-03 10:28:05 -07:00
Laura Abbott
6b3eb1abf1 pmem: Correctly account for aligned blocks
when finding an aligned chunk, the allocator cannot assume that
bit 0 will point to an aligned block. The only way to guarantee
a block will be aligned is to pass in the starting bit of a block
that is aligned. if t is the start bit which points to an aligned
block, and s is the spacing, bit t+n*s is guaranteed to be aligned
to spacing s for positive integer values of n.

CRs-Fixed: 288000
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-03 10:27:48 -07:00
Laura Abbott
1e36a02967 pmem: ensure SMI correctness
Due to hardware constraints, the SMI should not be mapped
in the kernel space when not in use. Unmap the SMI from
the kernel address space when the last allocation is freed.
Vote for bus bandwidth as well while the SMI is allocated.

CRs-Fixed: 281723
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-03 10:27:04 -07:00
Willie Ruan
0d9acd9735 misc: pm8058-pwm: add pr_fmt to simplify debug messages
Adding pr_fmt with __func__ to simplify the debug messages which
need to print out __func__.

Signed-off-by: Willie Ruan <wruan@codeaurora.org>
2011-10-03 10:26:02 -07:00
Bryan Huntsman
3f2bc4d6eb Initial Contribution
msm-2.6.38: tag AU_LINUX_ANDROID_GINGERBREAD.02.03.04.00.142

Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2011-10-03 09:57:10 -07:00
Colin Cross
9abd59b0df Merge commit 'v3.0.1' into android-3.0 2011-08-10 18:07:59 -07:00
Philip A. Prindeville
cb83d9f784 geode: reflect mfgpt dependency on mfd
commit 703f03c896fdbd726b809066ae279df513992f0e upstream.

As stated in drivers/mfd/cs5535-mfd.c, the mfd driver exposes the BARs
which then make the GPIO, MFGPT, ACPI, etc.  all visible to the system.

So the dependencies of the MFGPT stuff have changed, and most people
expect Kconfig to bring in the necessary dependencies.  Without them, the
module fails to load and most people don't understand why because the
details of the rewrite aren't captured anywhere most people who know to
look.

This dependency needs to be reflected in Kconfig.

Signed-off-by: Philip A. Prindeville <philipp@redfish-solutions.com>
Acked-by: Alexandros C. Couloumbis <alex@ozo.com>
Acked-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-04 21:58:38 -07:00
Dima Zavin
814cdea670 Merge commit 'v3.0-rc6' into android-3.0 2011-07-07 17:55:44 -07:00
Colin Cross
e55d4fa967 Merge commit 'v3.0-rc5' into android-3.0 2011-06-29 13:54:42 -07:00