fs: fat: rate limit the kernel messages

If FAT formatted SD card gets removed without unmounting,
FAT file system may throw many kernel error messages which
could too much traffic for console driver and can sometimes
even cause the system to trigger watchdog timeout.

This patch converts the printk to printk_ratelimited to rate
limit the error messages from FAT fs.

CRs-fixed: 368446
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
(cherry picked from commit a872b71069d717ced1a2de642afa0693d1bb9448)

Change-Id: I3ace0ffc5a0119641dff8084adccf7ed780c7900
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
Signed-off-by: Darescu Ionut <johnny@esi.ro>
ASoC: core: avoid scheduling delay work

ASoC framework prevents undesirable audio artifact
due to quick shutdown and startup of CODEC Rx path by
schedule delayed work. When timer expires, delayed work
callback function calls DAPM to tear down CODEC Rx path
This mechanism is undesirable when user-space application
manages shutdown of CODEC Rx path in similar fashion.
It causes false turning off of active CODEC path when
there is use case requiring co-processor manages audio use
cases while host processor goes to suspend mode. Change
power down time to 0 instead of 5 second by default.

CRs-fixed: 351956
Signed-off-by: Patrick Lai <plai@codeaurora.org>
(cherry picked from commit 95c1e67867befcbd81c7d507f31f478f7a795377)

Change-Id: I75f4a019a381dffc93807c50108dcfecb7aad50e
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
Signed-off-by: Darescu Ionut <johnny@esi.ro>
msm: pil: Synchronize request_firmware() with suspend

Calling request_firmware() during suspend/resume operations is
buggy and error prone. Therefore a check exists in
request_firmware() to see if a suspend/resume operation is in
progress. In testing we've seen that a wakeup interrupt can come
in during suspend and trigger subsystem restart to call
pil_force_boot() before userspace has fully thawed. Since this is
not allowed the request_firmware() call from pil_force_boot()
fails with -EBUSY and the processor is never rebooted.

Register for PM notifiers to avoid calling request_firmware()
when suspend/resume is in progress. Within the notifier
synchronize any request firmware calls with suspend using a
rwsem. In the case where pil is called before suspend, the
suspend notifier should block on the down_write() during
PM_SUSPEND_PREPARE. When suspend is initiated before pil any pil
operations should block on the down_read() until suspend
finishes. Doing this should fix races between suspend/resume and
request_firmware() within PIL.

Change-Id: Id12d128a3729680b36845de7228bf3919c32a672
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Darescu Ionut <johnny@esi.ro>
arm: Allow saving of stacktraces from other processes

Currently, a process is only able to save its own stacktrace
due to concerns about other processes going away while the
saving is occuring. Realistaically though, hititng this
case is very unlikely and the debugging benefit outweighs
the risk. Enable saving of other stacktraces for access
through systems such as procfs.

Change-Id: I584388f6edb48431bfec8d11d217f0fdc116f73e
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Darescu Ionut <johnny@esi.ro>
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.

CRs-Fixed: 336620
Signed-off-by: David Collins <collinsd@codeaurora.org>
(cherry picked from commit c06e0d6283ece540e7a21618f3585e71a5d4dda0)

Change-Id: I7eae8a781a9651778ada48f82f939dd40a7e196f
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>