Fix light sensors for GT-N5100

Change-Id: Ifd1bd76ec2ebf8014107747474145d0bfc9a3281
(cherry picked from commit fc2c3ebcd40150a0a9ae81a40ca14c8709bea943)
Fix proximity sensor for GT-N5100

Change-Id: Ic5542259e9ff91ba20216844cf8a65f4a252c111
(cherry picked from commit bdb64beb2b3182ded6b4df3c700b2fae2c5650ef)
smdk4412: initial support for n5120

Change-Id: I21144c9f3146c9043b137f180c064627ebeed71e
(cherry picked from commit 219edf3a61a7f71809d837033735d2bfa7f0d6da)
smdk4412: update fimc_capture and sr130pc20 cam driver

-updates are from i605 4.3 kernel source
-updates + small hack fixes front cam on kona

Change-Id: If8348be6dbef50bb322a60d554d177e046eec429
(cherry picked from commit b1c5069196635586f0cc98cf3eca277c08b282f6)
dm: suppress endian warnings

Suppress sparse warnings about cpu_to_le32() by using __le32 types for
on-disk data etc.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
(cherry picked from commit db79d5e31204bf77067462ce881b1af30d20bd01)
dm: ignore merge_bvec for snapshots when safe

Add a new flag DMF_MERGE_IS_OPTIONAL to struct mapped_device to indicate
whether the device can accept bios larger than the size its merge
function returns.  When set, use this to send large bios to snapshots
which can split them if necessary.  Snapshot I/O may be significantly
fragmented and this approach seems to improve peformance.

Before the patch, dm_set_device_limits restricted bio size to page size
if the underlying device had a merge function and the target didn't
provide a merge function.  After the patch, dm_set_device_limits
restricts bio size to page size if the underlying device has a merge
function, doesn't have DMF_MERGE_IS_OPTIONAL flag and the target doesn't
provide a merge function.

The snapshot target can't provide a merge function because when the merge
function is called, it is impossible to determine where the bio will be
remapped.  Previously this led us to impose a 4k limit, which we can
now remove if the snapshot store is located on a device without a merge
function.  Together with another patch for optimizing full chunk writes,
it improves performance from 29MB/s to 40MB/s when writing to the
filesystem on snapshot store.

If the snapshot store is placed on a non-dm device with a merge function
(such as md-raid), device mapper still limits all bios to page size.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
(cherry picked from commit 104acdc96c2a5276ac8e1604f9c6cedef7552b42)
dm table: share target argument parsing functions

Move multipath target argument parsing code into dm-table so other
targets can share it.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
(cherry picked from commit fc90060e9e62815bec64cb9dc1a3221ab70737a3)
dm crypt: optionally support discard requests

Add optional parameter field to dmcrypt table and support
"allow_discards" option.

Discard requests bypass crypt queue processing. Bio is simple remapped
to underlying device.

Note that discard will be never enabled by default because of security
consequences.  It is up to the administrator to enable it for encrypted
devices.

(Note that userspace cryptsetup does not understand new optional
parameters yet.  Support for this will come later.  Until then, you
should use 'dmsetup' to enable and disable this.)

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
(cherry picked from commit c538f742a9e67eca1ccdc801e8173a7e4ce30644)