msm: camera: Limit print in default case of JPEG

Change JPEG_PR_ERR to pr_err_ratelimited in default
case in JPEG ioctl. JPEG_PR_ERR would keep prinitng
when passing invalid parameters in ioctl which will
cause watchdog reset.

Change-Id: Ia8871fda4f10e44e3d2c1216765e26c2e9823038
CRs-fixed: 588260
Signed-off-by: Yiduo Wang <yiduow@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
camera_v2: jpeg_10: Set state before hw start

The setting of driver state is now done before the JPEG
engine is started.

Signed-off-by: Kamen Kirov <kkirov@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
camera_v2: jpeg_10: Fix return value of MSM_JPEG_IOCTL_HW_CMD

The ioctl MSM_JPEG_IOCTL_HW_CMD was returning -1,
when using MSM_JPEG_HW_CMD_TYPE_WRITE due to incorrect input
validation logic.

Signed-off-by: Kamen Kirov <kkirov@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
camera_v2: Add IOCTL to set jpeg core clock rate

Adds a new IOCTL that provides ability to set the JPEG clock rate
dynamically.

Signed-off-by: Kamen Kirov <kkirov@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
camera_v2: jpeg_10: Don't enable clock when changing rate

Only change rate, avoid two clock enables.

Signed-off-by: Kamen Kirov <kkirov@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Linux 3.4.82

Signed-off-by: LaboDJ <jacopolabardi@gmail.com>
leds: leds-gpio-flash: add led gpio flash driver

the flash led pins flash_en and flash_now are connected with msm gpios.
add led gpio flash driver for qrd board.

Signed-off-by: Tingting Yang <tingting@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: leds-qpnp: Support vin control for MPP LEDs

MPP can support input voltages from vin0 to vin3. Parse
this data from Device Tree and program appropriate MPP
registers. Also add support for minimum brightness that
MPP LED can support.

Signed-off-by: Chun Zhang <chunz@codeaurora.org>
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: leds-qpnp: Add LUT support for KPDBL

Keypad Backlight module supports LUT mode. Add
support for LUT mode and parse the parameters
from DTS file.

Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: leds-qpnp: Add brightness control for mpp leds

Add brightness control by changing the current supplied
to leds in manual mode.

Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: leds-qpnp: fix WLED max current mask

Change WLED_MAX_CURR_MASK to 0x1F as max current value in
LED1_FULL_SCALE_CURRENT register occupies 5 bits

Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: leds-qpnp: Set proper flash duration

Flash duration is between 0ms and 1280ms in increments of 10ms and can
be stored in an 8-bit value. The current conversion formula to u8
results in shrinking of this value, which leads to a loss of
most-significant bit in flash duration. This erroneous calcuation
is corrected in the driver.

Signed-off-by: Abinaya P <abinayap@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Add /dev/frandom

Change-Id: I19fdb9b47cf618648b9e5c7446adedbffce13288
Update defconfig

Change-Id: I335a264f378c5b58e430f2a38a1759a77cc1e020