fat: limit the number of error prints

Use fat_fs_error_ratelimit instead of fat_fs_error so as to
avoid large number of prints.

CRs-Fixed: 619824
Change-Id: I458df6c2c7a53c0902f2b388b5992007b719cb86
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
msm: kgsl: allow creation of events from the future

For contexts created with the KGSL_CONTEXT_USER_GENERATED_TS,
allow events to be created for timestamps that have not
been issued yet. Presumably these contexts know what they
are doing.

Change-Id: Iccf2e549b38e1a11850d26ee64b7279ab0b8a1ae
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
power: core: add set_voltage_limit API

Add the power_supply_set_voltage_limit API which
allows the POWER_SUPPLY_PROP_VOLTAGE_MAX property
to be configured for a given power supply.

CRs-Fixed: 637169
Change-Id: Ib525366ff742ad31d81ffee75920c19a6f9e8de8
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
power: qpnp-charger: take into account charge path priority

On the SMBB peripheral there is a possibility of having
both the USB and DC input being connected at the same time.
In this situation there is a requirement to be able to communicate
to userspace services that the higher priority input was
inserted so appropriate action can be taken.

This is achieved as follows:

1. If DC has the higher priority, the USB input
current limit will be reduced to 100 mA to avoid
charging from the USB path.

2. If USB has priority the DC input current
limit will be reduced to 100 mA to avoid charging
from the DC path.

3. Upon the removal of the priority charge path
the secondary charge path input current limit
will be restored to allow charging.

CRs-Fixed: 637169
Change-Id: Id5b61103b9f1d8f32ffd707d2512972c1a310108
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
mdss: dsi: Handle gpio configuration properly

Dsi related GPIOs are freed even when gpio request fails.
Fix this by removing the gpio_free() calls when the gpio request
fails. Add the gpio_request() and gpio_free()
calls to panel reset sequence so that gpio pins would
go to suspend state when not in use.

Change-Id: Id5ef45c5cc106d2a3ced3359739037f488e1919f
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm: mdss: Avoid GPIO warnings during boot up

During continuous splash screen handoff, we see GPIO
warnings since we try to free the GPIOs without
requesting them before. This change takes care of avoiding
these warnings.

Change-Id: I574bcf0bd28e3c33dca618103cf0285675917189
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm: mdss: fix clearing interrupts of DSI0 during isr for DSI1

Currently we need to handle DSI-1 interrupts only for panel/DCS
commands in the software during broadcast mode. When we handle
isr for DSI-1 interrupt, we clear all the interrupts for DSI-0
also. This might cause timeout issues for waits on DSI-0
interrupts like CMD_MDP_DONE since the interrupt is cleared
and we do not handle the interrupt for DSI-0. Fix this issue
by clearing only the DMA_DONE interrupt for DSI-0 during the
isr handling for DSI-1.

Change-Id: Id1735673f94066ff6c7250eaef7d9394b0525c2f
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm: mdss: dsi: remove unused memory mapped resource

There are more than one instances where the DSI registers
are memory mapped in the driver whereas only one instance is
being used. Remove the reference to the unused resource.

Change-Id: Ia213e94b43bf58446eead47b18cadeb36d6795a7
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
cfg80211: change regulatory rules for Indonesia

Change regulatory rules for Indonesia as per the
directive from regulatory compliance team.

Change-Id: If25a3100a94492191b322310406ae9047bd6f4a2
CRs-Fixed: 637303
Signed-off-by: Mihir Shete <smihir@codeaurora.org>
msm: krait-regulator-pmic: account for PWM_CL register security

The PWM_CL register is secure i.e. driver has to write 0xA5 to 0XD0
register to allow updates to PWM_CL register.

Fix it.

Change-Id: I3f273627bdc137d8c10768c7d5824abe96ee8707
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
mmc: core: Fix clock frequency transitions during invalid states

eMMC and SD card specifications restrict the usage of a class of
commands while commands in other class are in progress. For example,
during erase operations the SD/eMMC spec. allows only CMD35, CMD36,
CMD38. If clock scaling is enabled and decide to scale up the clocks
it may be possible that CMD19/21 tuning commands are sent in between
erase commands, which is illegal as per specification.

Fix such illegal transactions to the card and also make clock scaling
statistics accountable only for read/write commands instead of time
consuming commands, like CMD38 erase, where transactions are independent
of bus frequency.

Change-Id: Iffba175787837e7f95bde8970f19d0f0f9d7d67d
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
msm: camera: sensor: Update to use wait_for_completion.

Use wait_for_completion in place of wait_for_completion_interruptible

Change-Id: I960b334128e2b811b27c64721a65f7c7e773b085
Signed-off-by: Rajesh Bondugula <rajeshb@codeaurora.org>
Revert "msm: mdss: Fix mdss iommu detach-attach issue"

This reverts commit 82a181a8c819c0b0b2cdf1adfe5fadcd0fdb5151.

Change-Id: Id2ff6f02945e763835ce1783461325df13b32daa
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
mdss: Add newline to VSYNC timestamp for mdp3 driver

This makes sure that the userspace correctly interprets the end
of the vsync timestamp.

CRs-Fixed: 639039
Change-Id: I8a0810283a42a9c39a3c8fe36b862bbfd3ecdbea
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
rtc:alarm: remove alarm_shutdown hook in alarm driver

Putting alarm_shutdown into set_power_on_alarm is to set rtc alarm
time immediately after an alarm being set. It can avoid shutting
down unexpectedly before calling alarm_shutdown hook like removing
battery.Then power_on_alarm will be set to rtc twice when an alarm
is created and the device performs shutdown for a power off alarm.
The set process during shutting down is duplicated to the set
process when an alarm is created. So the alarm_shutdown hook become
unnecessary.

CRs-Fixed: 639119
Change-Id: Ie46bcf6f568f04650d94ba40ad6d4521d31a2f96
Signed-off-by: Xiaocheng Li <lix@codeaurora.org>
alarm : Fix the race conditions in alarm-dev.c

There will be race conditions between alarm set and alarm clear if
set_power_on_alarm is out of the lock.But set_power_on_alarm can't
be put into spin_lock. So add it into mutex_lock.

CRs-Fixed: 639115
Change-Id: I1db4836f67174b756c7f9d231f7a39cf0377d2c2
Signed-off-by: Xiaocheng Li <lix@codeaurora.org>
Merge "power: core: add set_voltage_limit API"
Merge "power: qpnp-charger: take into account charge path priority"
Merge "rtc:alarm: remove alarm_shutdown hook in alarm driver"
Merge "alarm : Fix the race conditions in alarm-dev.c"