Update MPU3050 kernel driver

1. Update MPU3050 drivers to Invensense MPU code update v3.3.4 ported from:
   https://android.googlesource.com/kernel/msm.git/+/android-msm-sony-cm-jb-3.0
2. Enable LSM303DLHA and LSM303DLHM as MPU3050 slaves instead of fake BMA150 and AK8975
3. Proper LSM303DLHA and LSM303DLHM power management when acting as MPU3050 slaves
4. Gyro axis configuration changed
5. Updates to sensor setup by John Newby
clock-8x60: implement config flag REMOVE_SMI_2X_CLK, that disable the 2x_axi_clk. Causes problems on some 8x60 (without iommu)
tenderloin: set REMOVE_SMI_2X_CLK flag directly in Kconfig
tenderloin:  add in specific restart commands

ported from Jcsullins
commit 45148614942d827ac9afed212dddf8a3a3853ab3

Change-Id: Ib2e246a276be0263da7870974fc099dcb2cbb01b
tenderloin: add in device specific shutdown/reboot commands

Change-Id: I8f605cf851cd33d71318a66a5263a109454e6e49
tenderloin: use built-in ath6kl
fix a couple warnings
tenderloin: use row ioscheduler by default
tenderloin: add LM8502 (leds/vib)

* also includes: fix lm8502 ioctl (for notif pattern) via jcsullins
ath6kl: Fix the byte alignment rule to avoid loss of bytes in a TCP segment

Either first 3 bytes of the first received tcp segment or last one
over MTU size file can be loss due to the byte alignment problem.
Although ATH6KL_HTC_ALIGN_BYTES was defined for 'extra bytes for htc header
alignment' in the patch "Fix buffer alignment for scatter-gather
I/O"(1df94a857), there exists the bytes loss issue which means that it will be
truncated 3 bytes in the transmitted file contents if a file which has over MTU
size is transferred through TCP/IP stack.  It doesn't look like TCP/IP stack
bug of 3.5 or the latest version of kernel but the byte alignment issue.  This
patch is to use the roundup() function for the byte alignment rather than the
predefined ATH6KL_HTC_ALIGN_BYTES.

kvalo: fixed indentation

Signed-off-by: Myoungje Kim <mjei78@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath6kl: remove false check from ath6kl_rx()

Dan found a check from ath6kl_rx() which doesn't make any sense at all:

"  1327          if (status || !(skb->data + HTC_HDR_LENGTH)) {
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^
skb->data is a pointer.  This pointer math is always going to be false.
Should it be testing "packet->act_len < HTC_HDR_LENGTH" or something?"

I don't know what the check really was supposed to do, but I think Dan's guess
is right. Fix it accordingly.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath6kl: Don't advertise HT40 support in 2.4 Ghz

HT40 is not supported in 2.4Ghz.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath6kl: Add AR6004 1.2 support for USB and SDIO

Add the necessary change for AR6004 1.2 chip support

Signed-off-by: Ray Chen <raychen@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath6kl: Normalize use of FW_DIR

kvalo: do the same changes for ar6004 hw1.2 as well

Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath6kl: change || to &&

The original conditions are always true.  I think && was intended here,
but I don't have the hardware to test.  Could you take a look?

kvalo: Chilam confirmed that the fix is valid

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath6kl: fix an indenting issue

This is supposed to be pushed in one indent level.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath6kl: unblock fwlog_block_read() on exit

Complete the waiting fwlog_block_read on debugfs cleanup, otherwise
userspace and module unload might softlock.

Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath6kl: include in.h explicitly

Do not assume anyone before us includes it for us.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath6kl: check for sband existence when creating scan cmd

The patch "ath6kl: support fw reporting phy capabilities" gave the
firmware the ability to disable certain wiphy supported bands. Check if
this is the case in ath6kl_wmi_beginscan_cmd to avoid dereferencing a
NULL pointer.

kvalo: change the patch so that there's no code between declarations

Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath6kl: Multicast filter support in wow suspend and non-suspend

This patch enables all multicast packets in non suspend mode
and enable multicast filtering in wow suspend mode. This also
fixes a bug in multicast where the driver assumed disable
multicast-all command disabled/filtered all multicast
packets, which was wrong assumption, because firmware will
apply the programmed filter.

Multicast requirements
 - Enable forward all multicast packets(no filtering) in
      non suspend mode.
 - Enable multicast filtering in wow suspend mode for both
      AP and CLIENT.

kvalo: fix a checkpatch warning and drop unrelated newline removal

Signed-off-by: Naveen Gangadharan <ngangadh@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>