Commit Graph

2375 Commits

Author SHA1 Message Date
Tony Lindgren 729f1f0b27 mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode
commit 8b8a84c54aff4256d592dc18346c65ecf6811b45 upstream.

Commit 16fa3dc75c ("mfd: omap-usb-tll: HOST TLL platform driver")
added support for USB TLL, but uses OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF
bit the wrong way. The comments in the code are correct, but the inverted
use of OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF causes the register to be
enabled instead of disabled unlike what the comments say.

Without this change the Wrigley 3G LTE modem on droid 4 EHCI bus can
be only pinged few times before it stops responding.

Fixes: 16fa3dc75c ("mfd: omap-usb-tll: HOST TLL platform driver")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2019-07-27 21:44:34 +02:00
Johan Hovold 1e306daf74 mfd: core: Fix device reference leak in mfd_clone_cell
commit 722f191080de641f023feaa7d5648caf377844f5 upstream.

Make sure to drop the reference taken by bus_find_device_by_name()
before returning from mfd_clone_cell().

Fixes: a9bbba9963 ("mfd: add platform_device sharing support for mfd")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2019-07-27 21:42:48 +02:00
LuK1337 b2213f5c42 Merge tag 'LA.BR.1.3.6-05010-8976.0' of https://source.codeaurora.org/quic/la/kernel/msm-3.10 into cm-14.1-merge
"LA.BR.1.3.6-05010-8976.0"
2017-11-22 00:26:48 +01:00
Karthikeyan Mani 9fd0c27ce2 ASoC: wcd9xxx: restrict debugfs permission
Remove read permission for debugfs reg dump node
for group and users to not allow reading of wcd9xxx
registers.

CRs-fixed: 2113240
Change-Id: I73a22e140446828e694fdc95fde7ac4e051c9548
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2017-11-08 05:27:07 -08:00
Luca Stefani ff1ebfd98d This is the 3.10.102 stable release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXXS5iAAoJEE44bZycYXAvDj8P/jbhmGAgW6tw2cnS90QIZDqG
 M/nclEId61jICNvbfP6zsioKeWyrmzr5G7NjqTThsSNhCo/DXs3ddMqLy3pOaFdq
 mytXtHIUpwZoplEib+ODinW40CMqnu11XSWEcee2nrsPuGNsnc7BY0wmFBa6UVCV
 rOZef9SN9lJcZSYY/auvgLDXOXdQ+NMxp5hau30aF5HBO8hTDXStjPRcUwCvz7aR
 govTQJHlS4HzLH3JOYS3Dt8IYFDOrKhQIby2nFdw7eiUxHCRy2F0asabTh3DzCw1
 iLvFroozjyVXwozfWMqLCvMa+514MXJy8Nkva6xiAHraC8UrgfPtcNsTdgtkdH9T
 V2Am9b0L7yiBdG6hsZLxkU3akk7vU/0dtppwzvudANT6i2tGcDSBeaZq3T2pAv7B
 7coY53GzHZdQnbdTZbYeS1fxebxyXw50D5OJkF8DyLhoL7Uj2Dvv0QdjKv+U/e5D
 VQ+ZyGcBdCLuOzflXysI10E01y0/M3FrkubgGBM4Oh0eYKCHJaHG/NCZy5JY/qxy
 S0phem8RbeZPbcL14z+5buWIi1lUkTiCIMG8c32ZEmDh84drnICqABA0RzKmqdkj
 ucQa+PzkMQ1DyhAMUl/CwpBfSqf1Zs3agLo78Kp5MTGfeAA90m0SeVqhmDgWhwqG
 HhSlsPFfMfmJl5S0uJpQ
 =UhFl
 -----END PGP SIGNATURE-----

Merge tag 'v3.10.102' into HEAD

This is the 3.10.102 stable release

Change-Id: Ic7d338fb190966b26aa151361fc37414f701d8b2
2017-04-18 17:22:08 +02:00
Luca Stefani 82b37d9f2f Merge remote-tracking branch 'f2fs/linux-3.10.y' into HEAD
Change-Id: Ic2fe24529f029909ddd96490bd6d885d60f88be2
2017-04-18 17:02:28 +02:00
LuK1337 4e71469c73 Merge tag 'LA.BR.1.3.6-03510-8976.0' into HEAD
Change-Id: Ie506850703bf9550ede802c13ba5f8c2ce723fa3
2017-04-18 12:11:50 +02:00
LuK1337 fc9499e55a Import latest Samsung release
* Package version: T713XXU2BQCO

Change-Id: I293d9e7f2df458c512d59b7a06f8ca6add610c99
2017-04-18 03:43:52 +02:00
Xiaoyu Ye 96230c3f66 mfd: wcd9xxx: Add range checking in function wcd9xxx_init_slimslave
Range checking is added to prevent buffer overflow.

CRs-Fixed: 1098363
Change-Id: I5871a3a11ec5f5106a386bf149d7ec22605f3db8
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2017-01-30 00:35:13 -08:00
Banajit Goswami b223868cbf mfd: wcd9xxx: avoid slimbus read/write during ADSP reset
During ADSP subsystem restart, all slimbus read/write would fail
as the bus is not available. Avoid codec read/write, until the
slimbus master in ADSP is up.

Change-Id: Iec1933d2625c1cd3dd700b2b3e2ffc7eae64880b
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-10-14 02:49:45 -07:00
Surendar karka e6b79f967a mfd: wcd9xxx-slimslave: Change slim driver to use %pK
Change slimslave driver to use %pK instead
of %p. %pK hides addresses when the users doesn't
have kernel permissions. If address information
is needed echo 0 > /proc/sys/kernel/kptr_restrict.

Change-Id: I319f7a4f71e779963c4d31eb5a0f91637cf805d2
Signed-off-by: Surendar karka <sukark@codeaurora.org>
2016-06-28 00:44:17 -07:00
Roger Quadros 0cf266167e mfd: omap-usb-tll: Fix scheduling while atomic BUG
commit b49b927f16acee626c56a1af4ab4cb062f75b5df upstream.

We shouldn't be calling clk_prepare_enable()/clk_prepare_disable()
in an atomic context.

Fixes the following issue:

[    5.830970] ehci-omap: OMAP-EHCI Host Controller driver
[    5.830974] driver_register 'ehci-omap'
[    5.895849] driver_register 'wl1271_sdio'
[    5.896870] BUG: scheduling while atomic: udevd/994/0x00000002
[    5.896876] 4 locks held by udevd/994:
[    5.896904]  #0:  (&dev->mutex){......}, at: [<c049597c>] __driver_attach+0x60/0xac
[    5.896923]  #1:  (&dev->mutex){......}, at: [<c049598c>] __driver_attach+0x70/0xac
[    5.896946]  #2:  (tll_lock){+.+...}, at: [<c04c2630>] omap_tll_enable+0x2c/0xd0
[    5.896966]  #3:  (prepare_lock){+.+...}, at: [<c05ce9c8>] clk_prepare_lock+0x48/0xe0
[    5.897042] Modules linked in: wlcore_sdio(+) ehci_omap(+) dwc3_omap snd_soc_ts3a225e leds_is31fl319x bq27xxx_battery_i2c tsc2007 bq27xxx_battery bq2429x_charger ina2xx tca8418_keypad as5013 leds_tca6507 twl6040_vibra gpio_twl6040 bmp085_i2c(+) palmas_gpadc usb3503 palmas_pwrbutton bmg160_i2c(+) bmp085 bma150(+) bmg160_core bmp280 input_polldev snd_soc_omap_mcbsp snd_soc_omap_mcpdm snd_soc_omap snd_pcm_dmaengine
[    5.897048] Preemption disabled at:[<  (null)>]   (null)
[    5.897051]
[    5.897059] CPU: 0 PID: 994 Comm: udevd Not tainted 4.6.0-rc5-letux+ #233
[    5.897062] Hardware name: Generic OMAP5 (Flattened Device Tree)
[    5.897076] [<c010e714>] (unwind_backtrace) from [<c010af34>] (show_stack+0x10/0x14)
[    5.897087] [<c010af34>] (show_stack) from [<c040aa7c>] (dump_stack+0x88/0xc0)
[    5.897099] [<c040aa7c>] (dump_stack) from [<c020c558>] (__schedule_bug+0xac/0xd0)
[    5.897111] [<c020c558>] (__schedule_bug) from [<c06f3d44>] (__schedule+0x88/0x7e4)
[    5.897120] [<c06f3d44>] (__schedule) from [<c06f46d8>] (schedule+0x9c/0xc0)
[    5.897129] [<c06f46d8>] (schedule) from [<c06f4904>] (schedule_preempt_disabled+0x14/0x20)
[    5.897140] [<c06f4904>] (schedule_preempt_disabled) from [<c06f64e4>] (mutex_lock_nested+0x258/0x43c)
[    5.897150] [<c06f64e4>] (mutex_lock_nested) from [<c05ce9c8>] (clk_prepare_lock+0x48/0xe0)
[    5.897160] [<c05ce9c8>] (clk_prepare_lock) from [<c05d0e7c>] (clk_prepare+0x10/0x28)
[    5.897169] [<c05d0e7c>] (clk_prepare) from [<c04c2668>] (omap_tll_enable+0x64/0xd0)
[    5.897180] [<c04c2668>] (omap_tll_enable) from [<c04c1728>] (usbhs_runtime_resume+0x18/0x17c)
[    5.897192] [<c04c1728>] (usbhs_runtime_resume) from [<c049d404>] (pm_generic_runtime_resume+0x2c/0x40)
[    5.897202] [<c049d404>] (pm_generic_runtime_resume) from [<c049f180>] (__rpm_callback+0x38/0x68)
[    5.897210] [<c049f180>] (__rpm_callback) from [<c049f220>] (rpm_callback+0x70/0x88)
[    5.897218] [<c049f220>] (rpm_callback) from [<c04a0a00>] (rpm_resume+0x4ec/0x7ec)
[    5.897227] [<c04a0a00>] (rpm_resume) from [<c04a0f48>] (__pm_runtime_resume+0x4c/0x64)
[    5.897236] [<c04a0f48>] (__pm_runtime_resume) from [<c04958dc>] (driver_probe_device+0x30/0x70)
[    5.897246] [<c04958dc>] (driver_probe_device) from [<c04959a4>] (__driver_attach+0x88/0xac)
[    5.897256] [<c04959a4>] (__driver_attach) from [<c04940f8>] (bus_for_each_dev+0x50/0x84)
[    5.897267] [<c04940f8>] (bus_for_each_dev) from [<c0494e40>] (bus_add_driver+0xcc/0x1e4)
[    5.897276] [<c0494e40>] (bus_add_driver) from [<c0496914>] (driver_register+0xac/0xf4)
[    5.897286] [<c0496914>] (driver_register) from [<c01018e0>] (do_one_initcall+0x100/0x1b8)
[    5.897296] [<c01018e0>] (do_one_initcall) from [<c01c7a54>] (do_init_module+0x58/0x1c0)
[    5.897304] [<c01c7a54>] (do_init_module) from [<c01c8a3c>] (SyS_finit_module+0x88/0x90)
[    5.897313] [<c01c8a3c>] (SyS_finit_module) from [<c0107120>] (ret_fast_syscall+0x0/0x1c)
[    5.912697] ------------[ cut here ]------------
[    5.912711] WARNING: CPU: 0 PID: 994 at kernel/sched/core.c:2996 _raw_spin_unlock+0x28/0x58
[    5.912717] DEBUG_LOCKS_WARN_ON(val > preempt_count())

Reported-by: H. Nikolaus Schaller <hns@goldelico.com>
Tested-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2016-06-07 10:42:55 +02:00
Santosh Mardi 4c52b181b8 drivers: mfd: Return EPROBE_DEFER during codec failure
In case of any codec access failure, return -EPROBE_DEFER
so that slimbus driver can probe the codec again
to toggle codec reset and retry codec access.

CRs-fixed: 969497
Change-Id: I570e7357a6d7810c495f56bbb626b8e823892837
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2016-02-22 14:13:23 +05:30
Santosh Mardi 19d781ac88 drivers: mfd: Move codec reset gpio config to early boot
Codec reset gpio configuration needs to be updated
before slimbus master component is initialized otherwise
codec cannot be enumerated on the bus. Add a new platform
device driver to update the codec reset gpio configuration
to valid state (output, drive-strength) before slimbus
is initialized.

CRs-Fixed: 968161
Change-Id: I7227212e6b846d58196718255aa4b0923352d120
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2016-02-18 16:54:01 +05:30
Sudheer Papothi 342c9009e5 drivers: mfd: Add support for multi register writes of each page
wcd9335 has multiple pages with each page has set of registers.
slimbus supports writing multiple registers in one transaction.
Change enables writing set of registers of each page of wcd9335
codec in one slimbus transaction. This will help reduce the latency
during codec register writes.

Change-Id: I4282ca9787d23c097f6ec031d4986898376c6b25
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2015-10-19 17:09:25 +05:30
Sudheer Papothi 392c18699e drivers: mfd: Add support for slimbus multi register write
slimbus driver supports writing multiple registers with a single
header. Add an API in core driver to support slimbus multi
register write. This will help in reducing the cold start
latency.

Change-Id: I158ef10e5a148408d9f4268da388eac515e46433
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2015-10-19 17:09:02 +05:30
Linux Build Service Account c89d5bbabc Merge "mfd: wcd9xxx: mark wcd9335 RCO control register as volatile" 2015-10-16 04:42:40 -07:00
Banajit Goswami 376f711bbb mfd: wcd9xxx: mark wcd9335 RCO control register as volatile
The Analog RCO control register in WCD9335 codec should
be a volatile register and should bypass cache. Mark this
register as volatile.

Change-Id: I101e632acc2e2e42e0469bd2602dd684be86ac26
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2015-10-14 10:27:52 -07:00
Simmi Pateriya 06840ab0ed drivers: mfd: use multi reg write mode
Use new cabability to write multiple
registers using api provided by regmap.

Change-Id: I540aafb7d1ea62cee959d85713f5b5d2c21ff532
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
2015-10-14 16:07:26 +05:30
Yeleswarapu Nagaradhesh 07c2b1c579 ASoC: changes to fix codec nack issue
This change fixes codec HW issues, Slimbus master capability issue
and codec NACK issues caused due to SIDO buck going down abruptly.

Change-Id: I74e94630b2ba4c132d66315ceee5127e05f284c6
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
2015-10-01 09:34:50 -07:00
Phani Kumar Uppalapati afce2756dd drivers: mfd: Mark ANC coefficients registers as volatile
Mark ANC (Active Noise Cancellation) filter coefficients
as volatile because codec hardware can auto update the
registers based on coefficient pointer register update.

Change-Id: I65aef7d7322db0ab3815d69e19cb97c7a2e044b2
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-09-12 20:46:37 -07:00
Phani Kumar Uppalapati 4fd6901dc6 drivers: mfd: Update SIDO Buck configuration
Update SIDO (single input dual output) buck configuration
for wcd9335 codec version 2.0 to avoid audio playback mute
over HPH/EAR.

Change-Id: Id09328930ddff6a519c929131930f7b93ca6c178
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-09-04 09:27:52 -07:00
Phani Kumar Uppalapati e09ec6964c drivers: mfd: Add support for wcd9335 version 2.0
Add support for wcd9335 version 2.0 and update the
register defaults accordingly based on the version.

Change-Id: I33038c1643b83ecd593891688c0ddf4a556b92ee
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-09-04 09:23:48 -07:00
Yeleswarapu Nagaradhesh df029f9d8a ASoC: wcd9335: move regulator optimum calls to codec driver
There are few use cases where apps goes down to suspend
but codec should be in active state. Core driver will not
have knowledge of these usescases and hence move suspend and
resume hooks to codec driver.

Change-Id: If5614dd13f24a80d18f53f194c7be1c5b967a003
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
2015-08-19 03:05:55 -07:00
Phani Kumar Uppalapati bceaabd715 drivers: mfd: Increase the SIDO buck inductor current
Increase the SIDO (single input dual output) buck inductor
current to avoid the output voltage drop to zero during
audio use-cases in which case codec communication over
slimbus will fail.

Change-Id: I0189bd8fd4952b3d7df411e64fd50e59645290b1
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-08-17 07:23:49 -07:00
Guenter Roeck 14c99cd5cd mfd: sm501: dbg_regs attribute must be read-only
commit 8a8320c2e78d1b619a8fa8eb5ae946b8691de604 upstream.

Fix:

sm501 sm501: SM501 At b3e00000: Version 050100a0, 8 Mb, IRQ 100
Attribute dbg_regs: write permission without 'store'
------------[ cut here ]------------
WARNING: at drivers/base/core.c:620

dbg_regs does not have a write function and must therefore be marked
as read-only.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-16 20:51:37 -07:00
Venkata Narendra Kumar Gutta 76c17eefd7 mfd: wcd9335-regmap: Mark Vbat registers as volatile
Vbat adc, gain related registers are not updated by the driver and
are read only. Mark these registers as volatile, to get proper
values when the registers are read.

Change-Id: Icef27deb9459a3193110007a78ad1a84283f4965
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
2015-08-14 06:23:24 -07:00
Phani Kumar Uppalapati 07ebb66d60 drivers: mfd: Correct codec page-2 register entries
Some of the wcd9335 codec page-2 registers are missing
in the readable tables. Correct the missing page-2
registers.

Change-Id: If61b5a139d98eb942d01f4485c8e61aa733cc7e2
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-08-10 02:44:23 -07:00
Yeleswarapu Nagaradhesh 8f7738bdb5 ASoC: wcd: modify codec power down sequence
Modify the codec power down sequence as below
1. Disable regulators.
2. Pull down codec reset GPIO.
3. Wait for 60 msec for codec to stabilise.

Change-Id: I410482561d99365395eea6ec94347e91507fe03a
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
2015-08-06 07:07:00 -07:00
Yeleswarapu Nagaradhesh b9891e31c6 ASoC: wcd: add support for wcd9326 codec
Use efuse register values, to differentiate between
wcd9326 and wcd9335 codecs.

Change-Id: I68e7ae5eb1717dccd0af975670ac3644304996b9
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
2015-07-24 06:12:49 -07:00
Yeleswarapu Nagaradhesh 4ff9349c8b ASoC: wcd: update codec driver to maintain the power states
Modify codec, wsa and core drivers to maintain the power states
and configure the tasha codec and wsa hardware to low power mode
to reduce the power consumption during suspend.

Change-Id: I245c7ee154d0840b8036a99df374fc9392000585
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
2015-07-22 23:07:02 +05:30
Linux Build Service Account 16d6f6291d Merge "drivers: mfd: Update sido buck register settings" 2015-07-20 21:50:09 -07:00
Phani Kumar Uppalapati 83e2931130 ASoC: wcd9335: Add support for digital core power collapse.
When no audio use-cases are active, codec digital core
can be put into power collapse to reduce the power consumption
during codec stand-by. Add support to put core into power
collapse and remove out of the collapse when audio use-cases
are triggered.

Change-Id: Ib72b72239712d1b20542950f05b698647edcb9fa
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
2015-07-17 13:51:24 +05:30
Phani Kumar Uppalapati c4567c7586 drivers: mfd: Update sido buck register settings
Update wcd9335 codec sido buck register settings
to prevent register access failures.

Change-Id: I546102b3c2e863c6bc1c4e0d5d1db94b3b3232f9
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-07-13 08:39:31 -07:00
Linux Build Service Account 1b585be100 Merge "ASoC: wcd9xxx: changes to set ldo5 in optimum mode." 2015-07-12 04:11:32 -07:00
Santosh Mardi 4ea1d2bd25 ASoC: wcd9xxx: changes to set ldo5 in optimum mode.
During suspend, set regulator to optimum mode to
reduce power consumption.

Change-Id: Ia3bcd163526b8ecfc9a4a023c652d88093a6d683
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2015-07-11 10:14:50 -07:00
Bhalchandra Gajare e7a3aac14a mfd: wcd9335-regmap: Mark shared registers as volatile
Some of the codec registers can be shared with other processors and
hence can get updated without the knowledge of the driver. In such cases
the regmap cache is not in sync with the hardware register setting. Mark
these registers as volatile so that reads and writes bypass the cache.

Change-Id: I3c8e8e31e36f9f9a1aba0193d696d019437dfed2
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2015-07-11 03:24:40 -07:00
Linux Build Service Account 99574b73de Merge "ASoC: wcd9xxx: Changes for flyback sequence to work on wcd9335" 2015-07-07 07:20:57 -07:00
Sudheer Papothi d5e6307932 drivers: mfd: Fix sido-buck voltage output on wcd9335
vdd-cx supply is derived from sido-buck and is connected
to wcd9335 codec. vdd-cx supply is suddenly dropping to zero
during playback usecase that is causing no response from
codec for slimbus read/writes. Add changes to avoid sudden
drop of vdd-cx supply to wcd9335 codec.

Change-Id: I72c85bc46c41771eb969de452cf3f241ed6577f2
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2015-07-06 15:42:42 +05:30
Sudheer Papothi 8d290518e6 ASoC: wcd9xxx: Changes for flyback sequence to work on wcd9335
Change sequence of enabling flyback on wcd9335 as per hardware
requirement for flyback to work properly in audio usecase.

Change-Id: I48c24665afc4cb6527cc225ec3fecbc5f883a17d
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2015-07-06 11:30:16 +05:30
Sudheer Papothi e025708f8c drivers: mfd: API to support slimbus bulk register write
Add changes in wcd core driver to support slimbus bulk register
writes API that sends multiple register writes with
one descriptor.

Change-Id: I27fd179f14e03e955f2847e3d2c4249852c14af2
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2015-07-06 11:30:10 +05:30
Phani Kumar Uppalapati d99df6a178 drivers: mfd: Detect and update the wcd9335 version
Add support to detect the wcd9335 codec version and
define macros for wcd9335 1.0 and 1.1 so that codec
driver can use these macros to update the register
configuration.

Change-Id: Ibb497bfb857addb9c7e8db37828c0096979d2c3c
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-06-24 18:17:01 +05:30
Bhalchandra Gajare 74a714deba mfd: wcd9xxx: Update slimbus repeat write for WCD9335
WCD9335 codec has paging scheme to write codec registers where the page
number for the register needs to be written first before accessing the
register itself. Update the slimbus repeat write functionality to use
paging scheme for WCD9335 codec.

Change-Id: I502ceb8ac59a20c990a70c0cbe16b89559de529f
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2015-06-23 18:27:57 +05:30
Bhalchandra Gajare 2f958717c4 mfd: wcd9335-regmap: Mark necessary CPE registers volatile
Some of the CPE registers can be updated by the codec hardware to
indicate the CPE status. Mark these registers as volatile so that read
or write for these registers always goes to the codec hardware bypassing
the register cache.

Change-Id: I2c1e15b84b19136649f83072a6b0ca35f93c73a3
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2015-06-23 18:27:57 +05:30
Bhalchandra Gajare 744ac4d0d5 mfd: wcd9xxx: Clear sva outbox interrupts before dispatch
It is possible that the SVA_OUTBOX1 and SVA_OUTBOX2 interrupts from
codec can be triggered when previous interrupt is still under processing
in threaded context. In order to not lose the interrupts in such case,
clear the SVA_OUTBOX1 and SVA_OUTBOX2 interrupts before they are
dispatched to the threaded interrupt handler.

Change-Id: I9ea0f794a2fcb6a9ee26e685622b3228f7349462
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2015-06-23 18:27:56 +05:30
Phani Kumar Uppalapati a1609b932e drivers: mfd: Avoid wcd9335 invalid register access
wcd9335 codec does not have registers from address
0xE00, but due to erroneous condition check, even
registers above 0xE00 are accessed in the driver.
Update condition so as to prevent the invalid register
access.

Change-Id: Iad3d1e72543c018ae102165f54b8a58f35994923
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-06-20 03:28:11 -07:00
Phani Kumar Uppalapati 21ceb71ae3 drivers: mfd: Update codec reset sequence for wcd9335 v1.1
WCD9335 Codec reset sequence is different for versions 1.0
and 1.1. Update the reset sequence if wcd9335 version 1.1
is detected.

Change-Id: I7c0061f8d0218ed67adaa4a1d4f54a60dc925d55
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-06-16 00:47:09 -07:00
Phani Kumar Uppalapati c96a6bdab0 ASoC: wcd9335: Add support for wcd9335 MBHC
Add support for wcd9335 MBHC for accessory
detection that gets inserted into headset jack
on the device. Also cleanup MBHC driver.

Change-Id: I50d24d81b083f7d31e2e2f9853a8a44c574e99c5
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-05-29 13:08:01 +05:30
Phani Kumar Uppalapati 3df794acec mfd: wcd9335: Update wcd9335 codec readable registers
Some of the codec registers though readable, are
not currently added in the readable register table.
This will prevent reading those registers from driver.
Add the registers to the table as readable.

Change-Id: Ieae7ef4150396907278631cc5a9b6bc8ad178362
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-05-20 11:22:11 -07:00
Phani Kumar Uppalapati 42d9982678 mfd: wcd9335: Prevent excessive driver logging
Prevent excessive logging when non-existent wcd9335
codec hw registers are accessed from regmap debugfs
registers file.

Change-Id: I741499e142e62430869cfacc91d981f0bb3329d6
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-05-14 00:56:30 +05:30