Commit Graph

25595 Commits

Author SHA1 Message Date
Linux Build Service Account
585339b007 Merge changes Ida66a62a,I206d116b,I29c71a20 into msm-3.0
* changes:
  power: pm8921-bms: expose start and end charging parameters
  power: pm8921-bms: refactor BMS driver code
  power: pm8921-bms: force max_voltage at end of charge
2011-12-15 07:10:54 -08:00
Linux Build Service Account
d3f83726f1 Merge changes Ic51664f7,I6614dc07 into msm-3.0
* changes:
  hwmon: pm8xxx-adc: Fix setting disable bit for CNTRL register
  power: pm8921-charger: Disable BTM before entering suspend
2011-12-14 10:25:00 -08:00
Linux Build Service Account
e48e9d12b8 Merge changes Ief2357bb,Iac66d768,Ib49a41f5 into msm-3.0
* changes:
  defconfig: 9615: Enable USB BAM driver
  msm: board-9615: Add USB BAM driver
  usb: gadget: SPS BAM-to-BAM - USB BAM driver
2011-12-14 04:44:16 -08:00
Linux Build Service Account
e9b4b64a51 Merge changes I74d93f35,Iea942e84 into msm-3.0
* changes:
  fmem: reserve memory for fmem
  fmem: add fmem API header file
2011-12-14 04:44:16 -08:00
Linux Build Service Account
c2f25f737f Merge "misc: tspp: adding TSPP driver files" into msm-3.0 2011-12-14 04:44:16 -08:00
David Keitel
f222602046 power: pm8921-charger: Disable BTM before entering suspend
Significant sleep current is seen with BTM enabled during suspend.

Fix this by disabling BTM before entering suspend and re-enable it
on resume. A board file option may be added to disable this feature.
By default battery temperature monitoring will be turned off on
suspend.

Change-Id: I6614dc076d8ea69f25840dd3eeef94f9739e392f
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2011-12-13 20:22:52 -08:00
Larry Bassel
1daa0f027e fmem: add fmem API header file
Change-Id: Iea942e84106512ba4c1418fe10bd7f53e635451e
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
2011-12-13 11:25:55 -08:00
Ofir Cohen
c7827e45a3 usb: gadget: SPS BAM-to-BAM - USB BAM driver
USB BAM driver to support BAM-to-BAM
USB<->Peripheral transactions.

Change-Id: Ib49a41f5dcdccb6f6bff2492fa64ead40f18b870
Signed-off-by: Ofir Cohen <ofirc@codeaurora.org>
2011-12-13 20:46:22 +02:00
Linux Build Service Account
1dc5ae6b97 Merge changes I1c9e58dd,I3e3d0f36,I132df8e6 into msm-3.0
* changes:
  genirq: percpu: allow interrupt type to be set at enable time
  genirq: Add support for per-cpu dev_id interrupts
  irq: Track the owner of irq descriptor
2011-12-13 09:09:54 -08:00
Linux Build Service Account
2acd05e80b Merge "vidc: Add metabuffer mode support for encoder driver." into msm-3.0 2011-12-13 09:09:54 -08: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
4c3a49e1c7 Merge "mfd: pm8901: Modify pm8901 subdevices to pm8xxx interface" into msm-3.0 2011-12-12 16:35:44 -08:00
Gopikrishnaiah Anandan
0a34f5ce81 vidc: Add metabuffer mode support for encoder driver.
Video encoder driver when configured in meta buffer mode,
will allow clients to register buffers in data path.

Change-Id: I23e2cb07386461275da5731134d8aad7df1cd060
Signed-off-by: Gopikrishnaiah Anandan <gopikr@codeaurora.org>
2011-12-12 16:11:19 -08:00
Sameer Thalappil
409ed358cf wcnss: Proxy vote for Iris regulators on behalf of Riva
This patch includes the following changes,
a. Proxy vote for Iris regulators on behalf of Riva.
b. During SSR power-on, vote for Iris regulators just like in
   cold boot.
c. Remove wcnss_riva.h, it was meant to be local to platform driver.
d. Make WCNSS platform driver part of kernel

Change-Id: Ied1f91297305469a0e4d9e524a03b49e1f600852
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2011-12-12 15:01:08 -08:00
Abhijeet Dharmapurikar
a93ede8e3f power: pm8921-bms: force max_voltage at end of charge
When an end of charge with a full battery happens, the bms driver
fakes max ocv and zero cc. To force max ocv the driver currently
assumes that the first row last column will have the highest profiled
voltage. This may not be true always.

Pass the maximum voltage from platform data and use that to force
max ocv.

Change-Id: I29c71a20648fb2f9066f2f82e14a6080692c63fd
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2011-12-12 13:53:12 -08:00
Anirudh Ghayal
9f77e968dd mfd: pm8901: Modify pm8901 subdevices to pm8xxx interface
Move the following  subdevices to use the pm8xxx interface -
mpp, irq, thermal, regulators.

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: I6478ec1b99b1ab55ca370d314dbeb590103a4b1c
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2011-12-12 13:43:27 -08:00
Linux Build Service Account
970346bf4d Merge "mmc: core: Ensure clocks are always enabled before host interaction" into msm-3.0 2011-12-12 04:59:53 -08:00
Sujit Reddy Thumma
abb9681051 mmc: core: Ensure clocks are always enabled before host interaction
Ensure clocks are always enabled before any interaction with the
host controller driver. This makes sure that there is no race
between host execution and the core layer turning off clocks
in different context with clock gating framework.

CRs-Fixed: 324380
Change-Id: Id3dc2074ed81bf758649bc61ce918500a95e9bae
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
2011-12-12 15:00:03 +05:30
Anji jonnala
a7c1c5ce1f USB: OTG: prevent idle standalone PC when USB cable is connected.
When USB cable is connected, the mass storage function in the
device will get interrupts for every 3ms. Entering and exiting the
idle standalone PC itself will take around 3ms on 8960. Hence allowing
idle standalone PC when USB cable is connected causes processor to
spend most of the time in entering and exiting the idle standalone PC.
Hence Vote for minimum DMA latency to prevent idle standalone PC
when USB cable is connected.

Change-Id: Id625dc01f253ed553b2f65f08900022a8c6e1daa
Signed-off-by: Anji jonnala <anjir@codeaurora.org>
2011-12-12 13:44:31 +05:30
Linux Build Service Account
a5df020eed Merge "mfd: pm8038: Add PMIC 8038 core driver" into msm-3.0 2011-12-10 15:31:48 -08:00
Trilok Soni
1714337153 genirq: percpu: allow interrupt type to be set at enable time
The commit 1e7c5fd breaks the build which gets fixed in the
next commit 32cffdd.

commit 1e7c5fd29487ee88cb3abac945bafa60ae026146
Author: Marc Zyngier <marc.zyngier@arm.com>
Date:   Fri Sep 30 10:48:47 2011 +0100

    genirq: percpu: allow interrupt type to be set at enable time

    As request_percpu_irq() doesn't allow for a percpu interrupt to have
    its type configured (it is generally impossible to configure it on all
    CPUs at once), add a 'type' argument to enable_percpu_irq().

    This allows some low-level, board specific init code to be switched to
    a generic API.

    [ tglx: Added WARN_ON argument ]

    Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
    Cc: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

commit 32cffdde4a3ee6c2d9e0f0a94edecf1a9ce7586b
Author: Thomas Gleixner <tglx@linutronix.de>
Date:   Tue Oct 4 18:43:57 2011 +0200

    genirq: Fix fatfinered fixup really

    Putting the argument inside the quote does not really help.

    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Change-Id: I1c9e58dd8788b5515f183ec169975d48a329b339
[tsoni@codeaurora.org: Fixup MSM build failure]
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
2011-12-10 16:34:15 +05:30
Marc Zyngier
2c4d6f229d genirq: Add support for per-cpu dev_id interrupts
The ARM GIC interrupt controller offers per CPU interrupts (PPIs),
which are usually used to connect local timers to each core. Each CPU
has its own private interface to the GIC, and only sees the PPIs that
are directly connect to it.

While these timers are separate devices and have a separate interrupt
line to a core, they all use the same IRQ number.

For these devices, request_irq() is not the right API as it assumes
that an IRQ number is visible by a number of CPUs (through the
affinity setting), but makes it very awkward to express that an IRQ
number can be handled by all CPUs, and yet be a different interrupt
line on each CPU, requiring a different dev_id cookie to be passed
back to the handler.

The *_percpu_irq() functions is designed to overcome these
limitations, by providing a per-cpu dev_id vector:

int request_percpu_irq(unsigned int irq, irq_handler_t handler,
		   const char *devname, void __percpu *percpu_dev_id);
void free_percpu_irq(unsigned int, void __percpu *);
int setup_percpu_irq(unsigned int irq, struct irqaction *new);
void remove_percpu_irq(unsigned int irq, struct irqaction *act);
void enable_percpu_irq(unsigned int irq);
void disable_percpu_irq(unsigned int irq);

The API has a number of limitations:
- no interrupt sharing
- no threading
- common handler across all the CPUs

Once the interrupt is requested using setup_percpu_irq() or
request_percpu_irq(), it must be enabled by each core that wishes its
local interrupt to be delivered.

Based on an initial patch by Thomas Gleixner.

Change-Id: I3e3d0f36e04added105753d30b2ef07e3d9d6a56
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1316793788-14500-2-git-send-email-marc.zyngier@arm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[kumarrav@codeaurora.org: fixup manage.c merge conflict]
Signed-off-by: Ravi Kumar <kumarrav@codeaurora.org>
2011-12-10 16:34:13 +05:30
Sebastian Andrzej Siewior
6f1c405828 irq: Track the owner of irq descriptor
Interrupt descriptors can be allocated from modules. The interrupts
are used by other modules, but we have no refcount on the module which
provides the interrupts and there is no way to establish one on the
device level as the interrupt using module is agnostic to the fact
that the interrupt is provided by a module rather than by some builtin
interrupt controller.

To prevent removal of the interrupt providing module, we can track the
owner of the interrupt descriptor, which also provides the relevant
irq chip functions in the irq descriptor.

request/setup_irq() can now acquire a refcount on the owner module to
prevent unloading. free_irq() drops the refcount.

Change-Id: I132df8e65d4e01db4f15dba0868607c7cdd33e14
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Link: http://lkml.kernel.org/r/20110711101731.GA13804@Chamillionaire.breakpoint.cc
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ravi Kumar <kumarrav@codeaurora.org>
2011-12-10 16:34:12 +05:30
Linux Build Service Account
5411d64555 Merge "msm_fb: display: enable border color fill on external display" into msm-3.0 2011-12-09 17:24:47 -08:00
Jay Chokshi
9d36a3d457 mfd: pm8038: Add PMIC 8038 core driver
Add support for the Qualcomm PM8038 PMIC chip. The core driver
will communicate with the PMIC chip via the MSM SSBI bus.

Initial support is provided for: IRQ, GPIO, MPP, RTC, Power Key,
Misc, and Debug.

Change-Id: I83f995cc238699100a05e82d04b45ea2a63eb667
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
2011-12-09 17:24:27 -08:00
Linux Build Service Account
76bb397d5a Merge "msm: audio: qds6v2: Add support for new hardware codecs" into msm-3.0 2011-12-09 13:32:33 -08:00
Linux Build Service Account
f077c70ec8 Merge "mm: Add total_unmovable_pages global variable" into msm-3.0 2011-12-09 02:43:11 -08:00
Linux Build Service Account
c1ab5d376f Merge "clk: provide prepare/unprepare functions" into msm-3.0 2011-12-08 23:47:51 -08:00
Russell King
ed6e321217 clk: provide prepare/unprepare functions
As discussed previously, there's the need on some platforms to run some
parts of clk_enable() in contexts which can schedule.  The solution
which was agreed upon was to provide clk_prepare() and clk_unprepare()
to contain this parts, while clk_enable() and clk_disable() perform
the atomic part.

This patch provides a common definition for clk_prepare() and
clk_unprepare() in linux/clk.h, and provides an upgrade path for
existing implementation and drivers: drivers can start using
clk_prepare() and clk_unprepare() once this patch is merged without
having to wait for platform support.  Platforms can then start to
provide these additional functions.

Eventually, HAVE_CLK_PREPARE will be removed from the kernel, and
everyone will have to provide these new APIs.

Change-Id: Ib9d24a7a0fdb571d392b970b1c159acabb07b365
Acked-by: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2011-12-08 18:19:09 -08:00
Adrian Salido-Moreno
fc6be921ee msm_fb: display: enable border color fill on external display
Enable border color fill feature on external display. This avoids usage
of RGB pipe for background border fill and can now be used as overlay
layer for UI display.

Change-Id: I652ab3ffe2c43260590e4e5a2ffc986340c4a8c0
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2011-12-08 17:19:01 -08:00
Anji jonnala
7da3f26984 usb: msm_otg: vote and unvote for TCXO through XO API
USB PHY takes TCXO clock as input and using the PHY internal PLL,
gets the 480MHz clock for USB operations. While USB PHY is suspended,
the TCXO clock can be turned off.
On 8960 target, mandating that TCXO clock users must need to vote for
TCXO and if all the users vote for TCXO clock-off, then MSM can switch to
lower power clock and can run.

Change-Id: Ia9a91bca52a1003439a3a38bbd8eb835dbf349e1
Signed-off-by: Anji jonnala <anjir@codeaurora.org>
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2011-12-08 16:04:18 -08:00
Deepa Madiregama
52a74c097e msm: audio: qds6v2: Add support for new hardware codecs
Add support for following codecs
	-MP3 decoder
	-AMRNB decoder
	-AMRWB decoder
	-EVRC decoder
	-QCELP(v13k) decoder
	-AMRWB encoder

Change-Id: I3d6fe52b206ab7a82d0d068d35769c3aa8c2b855
Signed-off-by: Deepa Madiregama <dmadireg@codeaurora.org>
2011-12-08 15:11:11 +05:30
Jay Chokshi
89489c3e48 power_supply: Add driver for LTC4088 Charger
LTC4088 is high efficiency USB powerpath controller
and Li-Ion/Polymer battery charger. This driver
enables the charger, allows to set current limits,
and detection.

Change-Id: I844431210cfd6e71d02fa7ffb730ee56d8417273
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
2011-12-07 19:00:30 -08:00
Willie Ruan
e6bee116fb power: core: add power supply APIs
Add two APIs, 1) set_current_limit API and 2) set_charging_by.
set_current_limit api is used for external control, such as for USB
driver to tell a charger driver the maximum current to draw.
set_charging_by is used to change the state of the charger.

Change-Id: I147eab37836b54627ca1458167eb117ba3eacd7a
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
2011-12-07 19:00:30 -08:00
Linux Build Service Account
0ac06e4925 Merge changes Id3e9fc8e,I61b85b48 into msm-3.0
* changes:
  perf: add raw event selection by reg/code/group for scorpion l2
  Perf: Add support for L2 cycle counter in default list
2011-12-06 19:03:13 -08:00
Jack Cheung
59f9f1c9ae mm: Add total_unmovable_pages global variable
Vmalloc will exit if the amount it needs to allocate is
greater than totalram_pages. Vmalloc cannot allocate
from the movable zone, so pages in the movable zone should
not be counted.

This change adds a new global variable: total_unmovable_pages.
It is calculated in init.c, based on totalram_pages minus
the pages in the movable zone. Vmalloc now looks at this new
global instead of totalram_pages.

total_unmovable_pages can be modified during memory_hotplug.
If the zone you are offlining/onlining is unmovable, then
you modify it similar to totalram_pages.  If the zone is
movable, then no change is needed.

Change-Id: Ie55c41051e9ad4b921eb04ecbb4798a8bd2344d6
Signed-off-by: Jack Cheung <jackc@codeaurora.org>
2011-12-06 15:00:36 -08:00
Linux Build Service Account
c3a5a8cb8a Merge "power: pm8921-charger: Allow disabling of input current limit" into msm-3.0 2011-12-06 14:52:29 -08:00
Linux Build Service Account
ed8dee710b Merge "input: pmic8xxx-pwrkey: Change algorithm on converting trigger delay" into msm-3.0 2011-12-06 12:47:37 -08:00
Linux Build Service Account
5c5bed0c36 Merge "msm: nl80211: Add WAPI support for cfg80211." into msm-3.0 2011-12-06 11:36:58 -08:00
Jing Lin
eecdc06dfe input: pmic8xxx-pwrkey: Change algorithm on converting trigger delay
The previous algorithm requires that kpd_trigger_delay_us be set to
1/32 of the preferred trigger delay. The new algorithm allows setting
kpd_trigger_delay_us to the preferred trigger delay directly.

The actual delay can only be one of the eight levels: 2 sec, 1 sec,
1/2 sec, 1/4 sec, 1/8 sec, 1/16 sec, 1/32 sec, and 1/64 sec. The valid
range of kpd_trigger_delay_us is 1/64 second to 2 seconds. A value
within the valid range will be rounded down to the closest level. Any
value outside the valid range will be rejected.

Update board files for targets that use this driver accordingly.

CRs-Fixed: 307203
Change-Id: If98b9cd32e03ab85cd078024b2adee02212cf030
Signed-off-by: Jing Lin <jinglin@codeaurora.org>
2011-12-06 10:29:19 -08:00
Ashwin Chaugule
389497b245 Perf: Add support for L2 cycle counter in default list
Adding the L2 cycle counter in the default list of events
has the advantage that the user can do a :

perf stat -e l2-cycles -e cycles ls

and see the outputs for the L2 cycle counter and L1 cycle
counter separately. Previously, it was only accessible via
the raw code "rsfe".

This method also allows us to program the L2 cycle counter
only from one CPU.

The changes in this patch are used by the userspace perf
tool.

Change-Id: I61b85b48f5474fe9f6ffb1a405b60b4332ab60c7
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
2011-12-06 12:30:24 -05:00
Linux Build Service Account
65a8aae7a0 Merge "ARM: cpu_pm: Fix compilation when CONFIG_PM disabled" into msm-3.0 2011-12-06 06:33:33 -08:00
David Keitel
012deefa0b power: pm8921-charger: Allow disabling of input current limit
Some use cases require higher input currents which are out of range
of USB specification.

Fix this by adding a call to disable the input current limit and
warn the user with an adequate message that input current limiting
is disabled when the function is called

CRs-Fixed: 318511
Change-Id: I7e2baa0378c94b0b9af22c00d8605b9df8d4f826
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2011-12-05 12:23:44 -08:00
Laura Abbott
8c0173668e gpu: ion: Add support for iommus
Add infrastructure to support mapping allocations
into iommus.

Change-Id: Ia5eafebee408e297013bf55284abf67d9eb8d78b
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-12-05 10:36:11 -08:00
Taniya Das
a75b3df26b ARM: cpu_pm: Fix compilation when CONFIG_PM disabled
When CONFIG_PM is disabled we see cpu_pm_register_notifier error at
link time.

in function init_hw_perf_events:perf_event.c(.init.text+0x14a8): error:
undefined reference to 'cpu_pm_register_notifier'

Change-Id: I97525a3f8938543b2d2c9cafeee83367b8ffe702
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2011-12-05 14:12:58 +05:30
Chintan Pandya
cba43d2faa rfkill: Fix compilation when PM is disabled
Add config macros for RFKILL_PM to fix compilation when
CONFIG_PM is disabled

Change-Id: I9fba48fb02d671885665354091101f3813426f57
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2011-12-05 12:38:11 +05:30
Chintan Pandya
94dd4f4b85 wakelock: Fix compilation when PM is disabled
If PM is disabled, WAKELOCK will also get disabled.
That gives compilation error at kgsl driver.

drivers/gpu/msm/kgsl_pwrctrl.c:755: error:
'struct wake_lock' has no member named 'name'

So, ifdef check whithin struct wake_lock will not give
more advantages but break builds. So, remove
CONFIG_HAS_WAKELOCK check in struct wake_lock.

Change-Id: I9f808f3b6ff14af6fa7f91dee7fe279ddab09add
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2011-12-05 12:38:11 +05:30
Linux Build Service Account
d32590c92a Merge "misc: pmic8058-xoadc: Fix #include guard" into msm-3.0 2011-12-03 19:45:06 -08:00
Linux Build Service Account
cc7c99e950 Merge "msm: audio: qdsp6v2: Add codec support in mvs driver" into msm-3.0 2011-12-03 18:19:43 -08:00
Linux Build Service Account
3f83653a6d Merge "USB: gadget: Add CCID function driver" into msm-3.0 2011-12-03 04:41:18 -08:00