usb: gadget: mass_storage: added sysfs entry for cdrom to LUNs

This patch adds a "cdrom" sysfs entry for each mass_storage LUN, just
like "ro" sysfs entry. This allows switching between USB and CD-ROM
emulation without reinserting the module or recompiling the kernel.

Change-Id: I115e3c8b5cf6e473cb081ef84f7be451ecdc1f0f
ARM: 7583/1: decompressor: Enable unaligned memory access for v6 and above

Modern GCC can generate code which makes use of the CPU's native
unaligned memory access capabilities.  This is useful for the C
decompressor implementations used for unpacking compressed kernels.

This patch disables alignment faults and enables the v6 unaligned
access model on CPUs which support these features (i.e., v6 and
later), allowing full unaligned access support for C code in the
decompressor.

The decompressor C code must not be built to assume that unaligned
access works if support for v5 or older platforms is included in
the kernel.

For correct code generation, C decompressor code must always use
the get_unaligned and put_unaligned accessors when dealing with
unaligned pointers, regardless of this patch.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Revert "msm: bam_dmux: Fixup merge"

This reverts commit d9038eaee7e65252e642c5133e2e80c081467a2d.
Misc source updates

Change-Id: Ie17c7a2244a4d6693041e582e280dc7740f3f6cb
msm: Fixup Kconfig

Change-Id: If53b03fcb167c8fadeaa5f7e1172e7a146c9afd0
Update defconfigs

Change-Id: I52a4430bc93917d2515bac3ca5d212480b6142ab
power: Avoids bogus error messages for the suspend aborts.

Avoids printing bogus error message "tasks refusing to freeze", in cases
where pending wakeup source caused the suspend abort.

Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
Change-Id: I913ad290f501b31cd536d039834c8d24c6f16928
mmc: Put back in some Samsung specific changes

 * Should resolve boot issues on 16GB variants

Change-Id: I4ae1b3e50c0f2c7c570a6ec1a942083528aac740
msm: wlan: Squashed update of wifi regulatory database

msm: wlan: update db.txt for Taiwan

After pulling in regulatory information for Taiwan
from the compliance team the data for Taiwan was
inconsistent as it allowed 80MHz bandwidth for
frequency range which was less than 80MHz which was
resulting in failure to parse the regulatory rules
for Taiwan.

Change-Id: Ibfabf26c1481b37d163b755734491ba27b1a4195
CRs-Fixed: 582871
Signed-off-by: Mihir Shete <smihir@codeaurora.org>

msm: wlan: update db.txt

Update the db.txt with new information from regulatory compliance team.
This considers changes posted as on Nov 15th, 2013: Various country updates
and corrections

CRs-Fixed: 579446
Change-Id: Ief60fc89c7d7ef67744bf20ced9eb5e6ed060ea9
Signed-off-by: Manjunathappa Prakash <prakashpm@codeaurora.org>
Signed-off-by: Arif Hussain <arifhussain@codeaurora.org>

msm: wlan: update db.txt

Update the db.txt with support for channel 144 for US country code

CRs-Fixed: 599829
Change-Id: Ief1b534be297eb05bd28b0c93a8cc2df11a6722b
Signed-off-by: Tushnim Bhattacharyya <tushnimb@codeaurora.org>

msm: wlan: update db.txt

Update db.txt by removing AD & BL from the list as recomened by
QCA regulatory compliance team

CRs-Fixed: 608532
Change-Id: I7b32feb32235e84e94100ee3a0986de1faaef88f
Signed-off-by: Tushnim Bhattacharyya <tushnimb@codeaurora.org>

msm: wlan: db.txt: add channel144 entry for supporting
countries

Ch 144 can be enabled in many countries. Enable it all countries that
are mapped to FCC3, FCC6 and APL7 (5GHz) RDs.

Change-Id: I1e11883a8085a900684eadd8f7a6f8f442cae3fb
CRs-Fixed: 614319
Signed-off-by: Manjunathappa Prakash <prakashpm@codeaurora.org>

msm: wlan: db.txt: enable mid 5GHz channels of WORLD reg domain

Patch enables the mid 5GHz channels for passive scanning on
WORLD regulatory domain.

Change-Id: I0e5b2a04afaa39b94a05e072ec1979e7d9ca0d14
CRs-Fixed: 614247
Signed-off-by: Manjunathappa Prakash <prakashpm@codeaurora.org>

msm: wlan: db.txt: Set min of Tx power of AP/STA mode

Update US reg domain to pick the min of Tx power limit for db.txt
in case the entries are different for STA and SAP. So picking
23(AP) over 24(STA).

Change-Id: Id3be427e69b6e20a6a84f4f8291e4dbf53dea045
CRs-Fixed: 630538
Signed-off-by: Manjunathappa Prakash <prakashpm@codeaurora.org>

msm: wlan: update db.txt with new compliance information

Update the db.txt with new compliance information.

Change-Id: I9aacf72dba51b746546777808e5abbe808e98746
CRs-Fixed: 625165
Signed-off-by: Santhosh Kumar Padma <skpadma@codeaurora.org>

wlan: Correct db.txt for a set of countries.

Correct the channel list and tx power values for countries
with alpha2 IL, MX, ZA and TW.

Change-Id: I735a153ef1e87c1022f175ac360d675071d1ec2a
CRs-Fixed: 640859
Signed-off-by: Amar Singhal <asinghal@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: wlan: update db.txt

Update db.txt to correct below:
1) CC=AU, AR, CA, SAP should not be operational in channels 120/124/128
2) Set 23dBm as the Tx power for FCC6 regulatory domains.
3) SAP Regulatory - Saudi Arabia country code should map to ETSI1,
upper 5 GHz channels 149 to 165 are not supported
4) Remove entry for KP. Update KR to map to APL9_WORLD
5) for JP, make it compliant to MKK5_MKKA2

Change-Id: Ib17685afa42a0892ff0576f64e68b6725df14b2f
CRs-Fixed: 639177
Signed-off-by: Manjunathappa Prakash <prakashpm@codeaurora.org>

msm: wlan: update db.txt for SA

Update regulatory database for country Saudi Arabia. Correct the
tx-power for a set of 5 GHz channels

Change-Id: I793d9acdb04d003212876df0fc439927d8d870ca
CRs-Fixed: 656369
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>

net: wlan: correct db.txt for KR

Correct the regulatory database entry for KR.

Change-Id: I6186d483a8d66369abb7a2970b94cdcc84fa8468
CRs-Fixed: 663320
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>

msm: wlan: update db.txt

FCC3 & FCC6 RDs increase UNII-1 Tx Powers  per 2014-5-31 R&O
Change FCC6 to match FCC3 Power

Change-Id: I88da603d1bb4a967d3289c29df1a2f35e4dc0cf3
CRs-Fixed: 661799
Signed-off-by: Tushnim Bhattacharyya <tushnimb@codeaurora.org>

msm: wlan: update db.txt

Add Chad = ETSI1_World
Add Guyana = APL1_ETSIC
Add Cte d'Ivoire = FCC3_World

Change-Id: I5958f71d31aff370efa65fe80653349b3f02c281
CRs-Fixed: 661799
Signed-off-by: Tushnim Bhattacharyya <tushnimb@codeaurora.org>

msm: wlan: update db.txt

Change Egypt HT/VHT40 Flag = Y
Change Haiti =  FCC3_FCCA
Change S. Africa = FCC3_World
Change Tunisia VHT80 & HT/VHT40 Flags = Y
Change Venezuela = FCC2_ETSIC and CTL group = FCC
Change Indonesia = APL2_ETSIC and CTL group = FCC
Change APL2 RD to increase Tx Power = 30dBm (for Indonesia)

Change-Id: I89c28881edd9e454be562ea059d499b494eb21d0
CRs-Fixed: 661799
Signed-off-by: Tushnim Bhattacharyya <tushnimb@codeaurora.org>

msm: wlan: correct db.txt for TW

Enable channel 165 for TW

Change-Id: I4e6a2c3d6506d1cb14f2f756f1310410f6f7d790
CRs-Fixed: 691872
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>

msm: wlan: correct db.txt for country code RU

Current usable band is 5725-5825. But for
channel 165 (freq 5825), when desired
bandwidth is 20MHz, the band fit in check
fails. This fix updates the start and end
frequency of this country based on the valid
channel list.

Change-Id: I8e09bb32676f94023a14c4b3a5c26dd3ae495af7
CRs-Fixed: 699088
Signed-off-by: Manishekar Chandrasekaran <cmshekar@codeaurora.org>

msm: wlan: Update US wifi database for TDWR channels

Update the US regulatory database for TDWR channels.
Also update the tx power of US DFS channels.

CRs-Fixed: 725496
Change-Id: Iceb30a61579dad0ea9325853b5aabc9ab23caa62
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>

msm: wlan: Update/Add countries to wifi database  db.txt.

Add countries AF, BT, BF, CF, CX, GH, MV, MR, FM, ME, PW, SN,
TZ, TG and VU to the wifi database. Correct entries for AS, BM,
BS, LB, MP, MN, MU, NI, PG and PY that conform to 5G domain FCC3.
Also correct entries for CZ, DE, ES, GF, GP, MC, MQ, MW, OM, PF
that conform to 5G domain ETSI1.

CRs-Fixed: 725522
Change-Id: I382de6927f6e52a350c2b69ab238941450daa7b9
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>

msm: wlan: Add a set of countries to wifi database db.txt.

Add countries DM, MD, KN, LC, TC, LS, BL, AI, MF, PM, VC
and WF. to wifi database db.txt. Also correct the entry for
KR.

Change-Id: Ia48ae98733edca1314be692dd77c9cc9b7ca4935
CRs-Fixed: 725522
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>

msm: wlan: Update db.txt for 2 countries

Update db.txt for Bolivia and Marshall Islands. Also update
tx power for FCCA countries. Also correct the entry for JP
to not use 160 MHz.

CRs-Fixed: 725522
Change-Id: I9c1bdddfa13f84239b94ac2329f5fdf0bbf64972
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>

msm: wlan: Correct wifi database for a set of countries.

Correct wifi database for AE, AL, AR, AT, AU, AW, BD, BG, BN,
BR, CA, CF, CI, CO, CR and CX.

Change-Id: I76d739ce6501c06772f64e484f5e4dd30b00a2ba
CRs-Fixed: 725522
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>

msm: wlan: Correct db.txt entries

Update db.txt for countries PR, PW, RE, RS, RU, RW, SA,
SN, SR, TW, TD, TH, TT, UA, UG, PS, UY, UZ, VE, VN, VI,
VU, WS, YT, ZW

Change-Id: If92fcc4b27f944cd4b1338df1199c38340607d5f
CRs-Fixed: 725522
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
cpufreq: Persist cpufreq time in state data across hotplug

Cpufreq time_in_state data for all CPUs is made persistent across
hotplug and exposed to userspace via sysfs file
/sys/devices/system/cpu/cpufreq/all_time_in_state

Change-Id: I97cb5de24b6de16189bf8b5df9592d0a6e6ddf32
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
cpufreq: fix sleeping in atomic context when realloc freq_table for all_time_in_state

Commit 40cf2f8 (cpufreq: Persist cpufreq time in state data across hotplug)
causes the following call trace to be spit on boot:

BUG: sleeping function called from invalid context at mm/slub.c:936
in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: swapper/0
CPU: 6 PID: 1 Comm: swapper/0 Not tainted 3.10.9-20140624.172707-eng-gd6c0f69-dirty #50
Backtrace:
[<c0012270>] (dump_backtrace+0x0/0x10c) from [<c001256c>] (show_stack+0x18/0x1c)
 r6:ffff1788 r5:c0c020c0 r4:e609c000 r3:00000000
[<c0012554>] (show_stack+0x0/0x1c) from [<c07a2970>] (dump_stack+0x20/0x28)
[<c07a2950>] (dump_stack+0x0/0x28) from [<c0057678>] (__might_sleep+0x104/0x120)
[<c0057574>] (__might_sleep+0x0/0x120) from [<c00ff000>] (__kmalloc_track_caller+0x144/0x274)
 r6:00000000 r5:e609c000 r4:e6802140
[<c00feebc>] (__kmalloc_track_caller+0x0/0x274) from [<c00da098>] (krealloc+0x58/0xb0)
[<c00da040>] (krealloc+0x0/0xb0) from [<c050266c>] (cpufreq_allstats_create+0x120/0x204)
 r8:e4c4ff00 r7:c0d266b8 r6:0013d620 r5:e4c4e600 r4:00000001
r3:e535d6d0
[<c050254c>] (cpufreq_allstats_create+0x0/0x204) from [<c0502e38>] (cpufreq_stat_notifier_policy+0xb8/0xd0)
[<c0502d80>] (cpufreq_stat_notifier_policy+0x0/0xd0) from [<c00517cc>] (notifier_call_chain+0x4c/0x8c)
 r5:00000000 r4:fffffffe
[<c0051780>] (notifier_call_chain+0x0/0x8c) from [<c00519fc>] (__blocking_notifier_call_chain+0x50/0x68)
 r8:c0cd4d00 r7:00000002 r6:e609dd7c r5:ffffffff r4:c0d25a4c
r3:ffffffff
[<c00519ac>] (__blocking_notifier_call_chain+0x0/0x68) from [<c0051a34>] (blocking_notifier_call_chain+0x20/0x28)
 r7:c0e24f30 r6:00000000 r5:e53e1e00 r4:e609dd7c
[<c0051a14>] (blocking_notifier_call_chain+0x0/0x28) from [<c0500fec>] (__cpufreq_set_policy+0xc0/0x1d0)
[<c0500f2c>] (__cpufreq_set_policy+0x0/0x1d0) from [<c0501308>] (cpufreq_add_dev_interface+0x20c/0x270)
 r7:00000008 r6:00000000 r5:e53e1e00 r4:e53e1e58
[<c05010fc>] (cpufreq_add_dev_interface+0x0/0x270) from [<c05016a8>] (cpufreq_add_dev+0x33c/0x420)
[<c050136c>] (cpufreq_add_dev+0x0/0x420) from [<c03604a4>] (subsys_interface_register+0x80/0xbc)
[<c0360424>] (subsys_interface_register+0x0/0xbc) from [<c050035c>] (cpufreq_register_driver+0x8c/0x194)

Change-Id: If77a656d0ea60a8fc4083283d104509fa6c07f8f
Signed-off-by: Minsung Kim <ms925.kim@samsung.com>
cpufreq: prevents NULL pointer reference while all_time_in_state stats is
collected.

Platform cpufreq driver may not be initiated at the time
cpufreq_stats_init() and therefore allocation of all_cpufreq_stats is
moved.
Also makes sure that all_cpufreq_stats is created appropriately for the
devices which doesn't support hotplugging of CPUs.

Change-Id: Iaf033688cf0e6cfdb3d605edbcbb984946f8ed45
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
msm8930: Some small changes to charger and sound driver

Change-Id: Ic8659253bad90209a2400809100c67d3e0572b2b
USB: msm_otg: Apply general changes to 8930 variant too

Change-Id: I3c7e6937b520485e5a4f170cc3c9456336562e55
This patch enables USB-OTG support with serranoltexx devices.

A Y-USB-OTG cable is needed for using USB-OTG with that devices,
beause voltage must supplied separatley.

The idea of this patch has the origin on otg patch for f4ktion's kernel.
See here:
https://github.com/F4k/f4ktion_kernel/commit/e87234357a045a74a00e1f212bb7e20d54e5e694
https://github.com/F4k/f4ktion_kernel/commit/8893a51d35c6867d464db746dc20295234f8c050

Change-Id: Id07167b4f2e459500a7316ddd204b0331c1ba23f