Commit Graph

1020 Commits

Author SHA1 Message Date
Linux Build Service Account
fcda1ca507 Merge changes I124a4ba1,Idf7c4e53,I09411d46,I4f270a41,Icd7e6002,I56a14e86,Id91ac5e6,Ia1abd831 into msm-3.0
* changes:
  regulator: map consumer regulator based on device tree
  regulator: pass additional of_node to regulator_register()
  regulator: adapt fixed regulator driver to dt
  regulator: helper routine to extract regulator_init_data
  regulator: Constify constraints name
  regulator: Properly register dummy regulator driver
  dt: add empty dt helpers for non-dt build
  copper: regulator-stub: Add devices for Krait Power Control
2012-03-31 01:14:46 -07:00
Rohit Vaswani
a76e99abc5 Merge branch 'Linux 3.0.21' into msm-3.0
Merge Upstream's stable 3.0.21 branch into msm-3.0
This consists 814 commits and some merge conflicts.

The merge conflicts are because of some local changes to
msm-3.0 as well as some conflicts between google's tree and
the upstream tree.

Conflicts:
	arch/arm/kernel/head.S
	drivers/bluetooth/ath3k.c
	drivers/bluetooth/btusb.c
	drivers/mmc/core/core.c
	drivers/tty/serial/serial_core.c
	drivers/usb/host/ehci-hub.c
	drivers/usb/serial/qcserial.c
	fs/namespace.c
	fs/proc/base.c

Change-Id: I62e2edbe213f84915e27f8cd6e4f6ce23db22a21
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2012-03-30 00:09:34 -07:00
Linux Build Service Account
3321da6833 Merge changes I2cabb2d6,Idffba143 into msm-3.0
* changes:
  ASoC: msm8960: properly protect external mclk control function
  ASoC: wcd9310: Add plug detection through mechanical switch
2012-03-29 14:17:01 -07:00
Mark Brown
5d028cd394 regulator: Constify constraints name
There's no need for the API to modify it and having it const makes it
easier to use with random strings the board code has.

Change-Id: Icd7e600291f281e80f60ef857c22f22cba08bfc1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
[mbohan: port MSM regulator drivers to new const type]
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
2012-03-28 10:39:57 -07:00
Joonwoo Park
d7cf2e931c ASoC: wcd9310: Add plug detection through mechanical switch
Use mechanical switch on the phone jack to detect headset/headphone
insertion and removal.  Mechanical switch is beneficial to avoid fake
button press and high impedance microphone headset detection.

CRs-fixed: 341402
Change-Id: Idffba14316ab25e07736d1b7385f0edb16216089
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2012-03-27 18:21:44 -07:00
David Collins
83e8f9fa43 mfd: pm8921-core: Add support for a newly defined PMIC PM8917 regulator
Add support for the new LDO regulator which was recently added to
the design of the PMIC PM8917.  LDO 36 is a 50 mA PMOS LDO.

Overall regulator changes between PMIC PM8921 and PMIC PM8917:
PM8917 adds:    7 PMOS LDOs (L30-L36) and 1 boost regulator
PM8917 removes: negative charge pump (NCP), HDMI medium voltage
		switch (MVS), and low voltage switch (LVS) 2

Support for other PM8917 regulators differences was been added in
a previous change.

Change-Id: I634c366d418d682f0cf3a3d8bc270063f7aee3cd
Signed-off-by: David Collins <collinsd@codeaurora.org>
2012-03-26 11:19:29 -07:00
Linux Build Service Account
f241e16031 Merge changes Ibfd4ba25,Ifc6054cd into msm-3.0
* changes:
  ASoC: wcd9310: Add high impedance headphone detection support
  ASoC: jack: Add API report sock jack without DAPM sync
2012-03-22 15:52:14 -07:00
Joonwoo Park
0332483368 ASoC: wcd9310: Add high impedance headphone detection support
If HPHL and HPHR have relatively high impedance, internal MBHC HPHL
trigger cannot trigger so results in headphone/headset detection
failure.
Utilize MIC trigger as well as HPHL trigger in order to detect headphone
and headset which have high impedance on headphone line.

CRs-fixed: 339390, 337590, 336847, 334339
Change-Id: Ibfd4ba254197233f2b5e253f5d1fa2a98c848c97
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2012-03-21 19:33:02 -07:00
David Collins
39914be208 mfd: pm8018-core: Add PMIC thermal alarm device
Register a PMIC pm8xxx thermal alarm device in the pm8018-core
driver.  This device will allow userspace to monitor the
temperature of the PMIC die.

Change-Id: I888c0737dd991da9eaec039b20b381a2bfd7923c
Signed-off-by: David Collins <collinsd@codeaurora.org>
2012-03-20 10:07:04 -07:00
Linux Build Service Account
a6d07e70fb Merge "mfd: pmic8901: Fix section mismatches" into msm-3.0 2012-03-12 15:21:52 -07:00
Stephen Boyd
7a05bd7484 pm8xxx: Remove __exit marking on pm8xxx_irq_exit()
This function is called from more places than just exit
functions. Also remove the _init/__exit markings from the header
file as they're not necessary in function prototypes.

WARNING: vmlinux.o(.devinit.text+0x7840): Section mismatch in
reference from the function pm8038_add_subdevices() to the
function .devexit.text:pm8xxx_irq_exit()
The function __devinit pm8038_add_subdevices() references
a function __devexit pm8xxx_irq_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
pm8xxx_irq_exit() so it may be used outside an exit section.

Change-Id: I0d2e285a03958e0fe68af48df94523aa1d0476c0
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2012-03-08 12:04:23 -08:00
Jay Chokshi
d9e4bc2f22 mfd: pm8xxx-pwm: Check for the NULL pointer
In some targets there might not be any platform data
for PWM driver, and its a valid case. On such target
check for the NULL pointer for the platform data.

Change-Id: If534b172f916e639491256a2346dd7bdd9a7cbcd
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
2012-03-02 15:28:23 -08:00
Linux Build Service Account
bbbc99ac4d Merge changes I810ffac4,If881eb08 into msm-3.0
* changes:
  msm: board-8960-pmic: Add platform data for PWM driver
  mfd: pm8xxx-pwm: Add feature to configure LPG DTEST mode
2012-03-02 12:21:32 -08:00
Jay Chokshi
b0a0fa5b4f mfd: pm8xxx-pwm: Add feature to configure LPG DTEST mode
PM8921 LPG banks can be configured to connect to DTESTx.
These DTEST lines can be used to observe LPG output.
Provide a feature that allows to enable DTEST modes for
a given LPG channel.

CRs-fixed: 337902
Change-Id: If881eb089aea2a66f7324af8ac906405eef4f81a
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
2012-02-29 16:39:25 -08:00
Asish Bhattacharya
b86c3477a8 ASoC: wcd9304: Add driver for Sitar codec.
Add support for 5 RX and 4 TX Slimbus channel support.
Headphone/Earphone/4 DMIX/2 AMIC and IIR1 support

Change-Id: I1b7ad5e5fd9d87aab80d6533503371e63df8cc0a
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2012-02-29 15:31:34 -08:00
Asish Bhattacharya
b1aeae22ff ASoC: wcd9xxx: Move to a generic framework for codec core driver.
The current core assumes TABLA as the only codec driver registering.
To support single binary for multiple targets its essential that
we remove this restriction and move to a generic framework
to support multiple codec. This can be done by moving all codec
specific code to dedicated codec driver and use core driver to probe
the codec based on slimbus device id and do generic setup for the
codec. This also helps to have same boards with different flavours
of codec variants.

The WCD9XXX family of codecs share the initial codec register
mapping which holds the Slimbus device id to identify the
codec existing on the target.Core driver now registers the
codec device based on this check.

Change-Id: I4c43d5f04c20696f4f5138411460681ec7879d34
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2012-02-29 15:31:15 -08:00
Shiv Maliyappanahalli
8c2ff8d99f mfd: wcd9310: remove GPIO reset configuration from CODEC driver
Remove TABLA reset GPIO configuration from CODEC Driver since it is
now added to the board-8960-pmic table & board-8064-pmic table.

Change-Id: I1d2839baa9270c6343b5ad8ffb6013be1e53cfc3
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
2012-02-26 11:06:17 -08:00
Linux Build Service Account
16249676c6 Merge "ASoc: msm: Correct the slave port range check" into msm-3.0 2012-02-25 16:41:31 -08:00
Linux Build Service Account
1b51974f62 Merge "mfd: pm8xxx-irq: fix rogue interrupt warnings" into msm-3.0 2012-02-25 16:41:31 -08:00
Linux Build Service Account
ecd91490ec Merge "mfd: pm8921-core: Add support for additional PMIC PM8917 regulators" into msm-3.0 2012-02-25 12:46:51 -08:00
Linux Build Service Account
8b33378ef1 Merge changes I5016e03f,Ic9272330,I4ad10f5e into msm-3.0
* changes:
  ASoc: msm: Fix array index out of bound issue
  ASoc: msm: Fix Null dereferencing and variable initialization
  ASoC: wcd9310: Fix memory leak and NULL dereferencing
2012-02-24 04:46:30 -08:00
Stephen Boyd
9a8f4eb280 mfd: pmic8901: Fix section mismatches
WARNING: drivers/mfd/built-in.o(.text+0x3750): Section mismatch
in reference from the function pm8901_probe() to the function
.devinit.text:pm8xxx_irq_init()
The function pm8901_probe() references
the function __devinit pm8xxx_irq_init().
This is often because pm8901_probe lacks a __devinit
annotation or the annotation of pm8xxx_irq_init is wrong.

Change-Id: I4d6ea52fdacad73bed80e3f5be3e9e08cc49be65
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2012-02-23 17:37:35 -08:00
David Collins
00f29e5fe0 mfd: pm8921-core: Add support for additional PMIC PM8917 regulators
Add support for the new regulators available on PMIC PM8917
beyond those present on PMIC PM8921.

Regulator changes between PMIC PM8921 and PMIC PM8917:
PM8917 adds:    6 PMOS LDOs (L30-L35), 1 boost regulator
PM8917 removes: negative charge pump (NCP)

Change-Id: I663c61277fb42301724230b73e93f819e55b08c4
Signed-off-by: David Collins <collinsd@codeaurora.org>
2012-02-23 11:46:21 -08:00
Helen Zeng
4a7abdb2ae ASoc: msm: Correct the slave port range check
Rx share channel can be configured if slave port reaches the max value
(SB_PGD_RX_PORT_MULTI_CHANNEL_0_END_PORT_ID).

Change-Id: Iaf227e6c36e505b68823d1b4a822c3d9ca719573
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
2012-02-22 18:54:58 -08:00
Abhijeet Dharmapurikar
442ec046ab mfd: pm8xxx-irq: fix rogue interrupt warnings
The current mask and mask_ack callbacks assume that if config entry
for an interrupt is 0, then it must be a rogue interrupt.
This is not true because an interrupt number that is a multiple of 8
and is a RISING and FALLING edge triggered, will have a config entry
of 0. The driver incorrectly identifies such an interrupt as a rogue
interrupt and prints a warning.

Fix this by using the PM_IRQF_WRITE flag to indicate a requested
interrupt.

Change-Id: I187276a19a4f74712498a7c799dba27858ca784b
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2012-02-22 12:56:23 -08:00
Amy Maloche
4c994c91e7 mfd: pm8xxx-misc: Add function to write aux clock register
This call configures the XO to the MP3 clocks. These
clocks route over PMIC gpios and are used as an independent
clock source for MP3, haptics.

Change-Id: Ib95f277eae8bcb9a7e9da12fc5fe2baec4e72493
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2012-02-20 12:14:48 +05:30
Shiv Maliyappanahalli
ffc265213c ASoC: wcd9310: Fix memory leak and NULL dereferencing
Dereference of tabla structure's content without checking if tabla
is NULL will cause a crash.
Jumping to label fail will cause tabla to be not freed and hence
a memory leak.

Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
Change-Id: I4ad10f5ef4d051dc2f881dc385ae2690c590d042
2012-02-17 10:42:35 -08:00
Linux Build Service Account
07707d53d2 Merge "ASoC: wcd9310: Add the support to instantiate codec driver." into msm-3.0 2012-02-16 11:51:22 -08:00
Linux Build Service Account
759282fbd4 Merge "mfd: pm8921-core: Correct PMIC PM8917 revision register value" into msm-3.0 2012-02-16 04:54:57 -08:00
Kuirong Wang
cd4b6daee3 ASoC: wcd9310: Add the support to instantiate codec driver.
Add the support to instantiate the Codec driver for a given
version of WCD9310 Codec device.

CRs-fixed: 329058
Change-Id: Id1389fba46578ed290105752e16becd5fc731201
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
2012-02-15 10:22:45 -08:00
David Collins
2da4f9b57c mfd: pm8921-core: Correct PMIC PM8917 revision register value
For PMIC PM8917, the PMIC_REV_2 register will read back 0x0C, not
0x12.  Correct this in the pm8921-core driver so that PM8917
chips are detected properly.

Change-Id: I3c6a52097488b20bbd7a90286fa230bc4cb4d1b2
Signed-off-by: David Collins <collinsd@codeaurora.org>
2012-02-14 11:34:11 -08:00
David Collins
c06e0d6283 mfd: pm8xxx-misc: Fix pm8xxx_smpl_control so that reset on SMPL works
pm8xxx_smpl_control currently sets power-off register values in
both the power-off and reset code paths for PM8018 and PM8921.
Correct this so that reset on sudden momentary power loss
(SMPL) works properly.

Change-Id: I1560a0f2d143c47056c14f6bc5fba21158d7fe39
CRs-Fixed: 336620
Signed-off-by: David Collins <collinsd@codeaurora.org>
2012-02-13 14:50:09 -08:00
Bharath Ramachandramurthy
9c79f13b0e ASoc: msm: Add support for slimbus shared channel.
Previously, DSP used to setup the data path towards the
codec via slimbus. Now, the data path setup is broken into
two parts - one half of the path setup between apps to slimbus
and the other half from DSP. This configuration mode is
required to reduce overflow or underflow errors. Also this is
required to handle a configuration where mdm can talk
directly to codec.

Change-Id: Ic9f20b8a2f8a8eb355c07565ec80ec947a7a7337
Signed-off-by: Bharath Ramachandramurthy <bramacha@codeaurora.org>
2012-02-12 13:48:19 -08:00
Joonwoo Park
816b8e6e04 ASoC: wcd9310: Prevent from going suspend while accessing codec registers
The wcd9310 codec driver which is slimbus slave can access codec
registers when slimbus is suspended.
This can cause register read/write failure.
Fix to make sure slimbus is awake before accessing wcd9310 codec's
registers through slimbus.

CRs-fixed: 331338
Change-Id: Iddbdb1614c18dab4bee4f0cc7951884f34cb7173
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2012-02-09 16:14:20 -08:00
Amy Maloche
8950101583 mfd: pm8038-core: Add support for LEDs on pmic 8038
Add leds as a sub device to pmic 8038. This will also
take care of filling platform data for leds driver
which comes as part of pmic pdata.

Change-Id: I3814a0f36f79612684e4a2305e3c5c19dc64cb00
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2012-02-08 10:46:50 -08:00
Jay Chokshi
3f8463cec2 mfd: 8821: Amend the value of a macro
Update PMIC version macro with the right value.

Change-Id: I48391ca0a3745d5b04d5d4c7dd6e7ccad250fafb
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
2012-02-06 21:16:38 -08:00
Joonwoo Park
6c1ebb6226 ASoC: wcd9310: Use correct address of MICB4 registers
Unlike Tabla 1.x, Tabla 2.0 codec has different address of micbias 4
registers.
Check hardware version and access proper address when accessing
micbias 4 registers.

CRs-fixed: 330357
Change-Id: I5e12a6b15e82b00d2e238c21d795fdc189ead6a5
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2012-02-04 23:12:35 -08:00
David Collins
1b570d26b8 mfd: pmic: Add voltage switch test registers to PMIC core drivers
Specify the SSBI test register address for each of the voltage
switches in PMIC 8018, 8038, and 8921 core drivers.  This will
allow for future handling of over current protection (OCP) in
the pm8xxx-regulator driver.

Also define the OCP IRQs associated with each of the switches
on these PMICs.

Change-Id: Icfc51c01680e6e95b4348051c764f16cb91b4916
Signed-off-by: David Collins <collinsd@codeaurora.org>
2012-02-03 11:07:23 -08:00
Linux Build Service Account
98009d81e1 Merge "mfd: pm8xxx-misc: add pm8xxx_usb_id_pullup API" into msm-3.0 2012-02-01 10:37:20 -08:00
Willie Ruan
5db1f24037 mfd: pm8xxx-misc: add pm8xxx_usb_id_pullup API
PM8921 family provides a pullup enable bit to support USB ID.
Add the API for such support.

Change-Id: Id3056af070080c1c12f27720020ae718fc6f34f6
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
2012-02-01 14:11:04 +05:30
Jay Chokshi
0c220cd9bc mfd: pm8xxx-pwm: Add support for PM8038
Adapt the driver to take into consideration LPG
architecture of pmic 8038 and 8922. It does not
support 7-bit mode yet.

Change-Id: Ibfca90aae6fd9c90025af5364e1dcaf4a8bb3033
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
2012-01-30 11:23:49 -08:00
Willie Ruan
b10be97df4 mfd: pm8xxx-pwm: add pre-divide=6 and update macros
Add pre-divide=6 and update the max period based on new pre-divide.
Also update pre-divide related macros for better readability.

Change-Id: I5298c373c78f8723dab9a735e4d94f89798800d5
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
2012-01-30 11:23:49 -08:00
Linux Build Service Account
25774b80e5 Merge "mfd: pm8xxx-irq: mask non requested interrupt" into msm-3.0 2012-01-29 09:27:41 -08:00
Abhijeet Dharmapurikar
9d10de3ef3 mfd: pm8xxx-irq: mask non requested interrupt
When a non requested interrupt triggers, the genirq ends up calling
mask or mask_ack callback. This callback is expected to mask that
interrupt so it doesn't trigger us further.

There is a bug in the pm8xxx-irq driver where config[] entry for an
unrequested irq remains empty. So the mask or the mask_ack callback
ends up masking 0th interrupt.

Fix the mask and mask_ack callback to check if config[] is empty, if
so fill it in right then and mask the irq.

Change-Id: I85d3bfff92c52a1c3eb8123a9c3757660e20fac6
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2012-01-26 21:22:00 -08:00
Willie Ruan
5106035d9a mfd: pm8921-core: Add support for PMIC PM8917 chip
The PMIC PM8917 chip is very similar to the PM8921 chip. Modify
the pm8921-core driver so that it can also handle PM8917 chip
which has different number of gpios and mpps, and no LPG/PWM,
no LEDs and no vibrator.

Change-Id: I252adc2ddc4bcd9bb8b8fb5113444356ba7c969e
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
2012-01-25 14:21:54 -08:00
David Collins
4724272b4b mfd: pm8xxx-misc: add an API to preload the dVdd regulator
Add a new API, pm8xxx_preload_dVdd, which will preload the dVdd
regulator on PMIC PM8901 chips during off state. This can help
to reduce fluctuations in the dVdd voltage during startup at the
cost of additional off state current draw.

This API should only be called if dVdd startup issues are
suspected.

Change-Id: Ic7ee60539de37a761bb9ca6c5200327a7b99da89
CRs-Fixed: 326086
Signed-off-by: David Collins <collinsd@codeaurora.org>
2012-01-20 11:34:58 -08:00
Linux Build Service Account
600490f99e Merge "msm: qdsp6v2: Invalid memory access of timpani regset array" into msm-3.0 2012-01-19 22:42:18 -08:00
Santosh Mardi
efd780d21a msm: qdsp6v2: Invalid memory access of timpani regset array
Adie codec write is accessing out of memory bound for
timpani regset array.

CRs-Fixed: 330562
Change-Id: I98f46d3b59c76ccfaf5edd6c04d1df01d431ef01
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2012-01-18 17:08:53 +05:30
David Keitel
b0f4036c4a mfd: pm8038-core: enable bms and charger devices
Enable charger and bms devices to make sure they are probed
on 8930.

Change-Id: I4917de40a672628bab868260b280cfb580668e4e
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2012-01-17 14:55:23 -08:00
Willie Ruan
4a0a700e51 mfd: pm8xxx-pwm: simplify period search algorithm
Compare each search result (cur_err) directly with the best
result (best_err) without using local result in the loop for m.
This simplifies the code and makes it cleaner.

Change-Id: Icb6d19e1a14662b00bf7172ca6a7413fbe969cbc
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
2012-01-12 15:40:18 -08:00