ASoC: msm: qdsp6v2: Add meaningful labels

Add meaningful labels to goto on error
conditions in config_debug_fs_init(). Also
added more robust error handling in same
function.

Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Revert "msm: lpm_levels: remove rpm handshake in l2_gdhs mode."

This reverts commit 3577406fe31abcf2dad6555731453f888457610b.
gpiomux-8974: Modify direction of suspended GPIO

changed the direction and strength for some below mentioned GPIOs
as per 8974 suggested GPIO settings in Rockbottom.
With new config 0.400-0.500mA been saved on floor in Audio
use case.
Settings are applicable when there is no user to GPIOs
Following are the changes made:
	GPIO# Changed       What Changed
	24                  IN->OUT 8mA->2mA
	46                  IN->OUT 8mA->2mA
	80                  8mA->2mA
	82                  IN->OUT 8mA->2mA
	104                 IN->OUT 8mA->2mA PD->NO PULL
	105                 IN->OUT 8mA->2mA
	106                 IN->OUT 8mA->2mA

Signed-off-by: Tirtha Kanti Ghosh <tirtha@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: clock-8974: Update SDCC1 Apps clock frequency for MSM8974Pro

Update SDCC1 Apps clock frequency for MSM8974Pro to match latest software
frequency plan.

Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
selinux: add a ugly workaround to bail early when selinux tries to free a socket that is still in use and it ends in a Kernel panic. These lines are from opensource.samsung.com. While this will most likely put a bandaid over this Kernel panic it does not fix the bug so it might occur somewhere else if the same conditions are met but since I have only seen panics from this hook then we may as well sleep in peace.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
pwm: qpnp: modify to use pwm_config_us() for some qcom
 drivers

Kernel 3.10 defines pwm_config() to use nanosecond parameters, but
now some qcom drivers still use pwm_config() to pass microsecond
parameters. pwm-qpnp driver has already provided a new API called
pwm_config_us() to support microsecond parameters, so we should
modify to use pwm_config_us() instead of pwm_config() for these
drivers.

[neo: Even 3.4 kernel defines nanoseconds pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns) ]

Signed-off-by: Xu Kai <kaixu@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: leds-qpnp: Set the strobe bit correctly for flash led

The strobe bit is set to 1 when the flash led uses HW strobe and it is
set to 0 when the flash led uses SW strobe.

Signed-off-by: Abinaya P <abinayap@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
qpnp: pwm: Select proper pwm sizes

Here are different Qualcomm pmic chipsets and supported pwm resolutions.
PM8941:-
	LPG1 to LPG8 channels support 6, 7 and 9 bit PWM resolutions.
	LPG9 to LPG12 channels support 7 and 8 bit PWM resolutions.
PM8026:-
	LPG1 to LPG6 channels support 6, 7 and 9 bit PWM resolutions.
PM8110:-
	PWM supports 6 and 9 bit PWM resolutions. There is no support
for LPG mode and pwm mode only supported.

Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
qpnp: pwm: Force the pwm size selection

For certain use cases pwm size need to restricted
to avoid dynamic pwm size selection based on the
pwm period value. Currently pwm freqency and pwm
sizes are selected for a given pwm period. Restrict
pwm size to a specific value and select pwm frequency
closest to pwm period requested.

Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
pwm: qpnp: provide both nsec/usec-supported pwm config() functions

Now implement pwm_config() to support nanosecond parameters, which
has better granularity in some situation, for example, if the number
of backlight brightness levels is 256, using microseond parameters
will only get nearly 50 levels.

But Qualcomm platform should support 384 seconds pwm-period at most,
the above standard API couldn't satisfy the requirement of the bigger
period, so we also provide pwm_config_us() this such platform related
API.

Signed-off-by: Xu Kai <kaixu@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
qpnp: pwm: PM8110 pwm changes for backlight

Qualcomm PMIC chipset PM8110's ENABLE_CONTROL register
definition is different from other pmic chipset. So avoid
modifying the other bits in ENABLE_CONTROL register when
pwm_config is called.

Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>