spi_qsd: Remove check for unaligned  length during input_irq

QUP_IRQ complete is triggered before dmov_rx callback.
Which will initiate SPI to start next transfer, due to
this earlier DMOV_CMD is blocked and results in kernel panic.

Current Implementation  make sure that transfer complete waits
For DMOV callback only in case of aligned lengths ,This patch
ensures transfer trigger only after DMOV RX call back for
unaligned length also.

CRs-Fixed: 583126
Change-Id: I306a705d0eaf0eac33b2dbf335992254351cce20
Signed-off-by: Sana Venkat Raju <c_vsana@codeaurora.org>
spi_qsd: Fix SPI L2 Crash

Message queue  is scheduled to process
SPI messages during system suspend
state which leads to crash.

This patch make sure all the messages
in queue are processed before system
suspends.

CRs-Fixed: 593658
Change-Id: I722f24fcee4a1d2bbfee4341c8bc6c36ff9e1ec8
Signed-off-by: Sana Venkat Raju <c_vsana@codeaurora.org>
spi_qsd: Add core message queue feature

Add support to use new message queue feature provided
by SPI core framework. It is having benefits of saving
code space and getting the benefits of improvements
implemented in the core. User can set the priority
of message queue at compile time.

CRs-Fixed: 458268
Change-Id: I3f3a70b20ed6f2c8ceb9c27d616c5ba19acb422c
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
Signed-off-by: Sana Venkat Raju <c_vsana@codeaurora.org>
spi_qsd: Initialize wait queue

Due to missing initialization of wait queue
issues reported on customer builds. This patch
adds the missing wait queue initialization code.

Change-Id: I2150d94bfec74b26842aac4fbd0e2e44af3b9943
Signed-off-by: Sana Venkat Raju <c_vsana@codeaurora.org>
USB: ccid_bridge: Add support for USB smart card class

This module implements a bridge driver which allows user space
to communicate with USB smart card devices.  This module provides
/dev/ccid_bridge device file which allows read/write/ioctl methods.
The ioctls facilitate control and interrupt transfers.  The bulk
transfers are implemented via read and write.  The interrupt
endpoint is optional and not all devices may support it.

Change-Id: I67ac7c7d15fb65c8f6a2cc9f9c81343da074aab7
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
USB: ccid_bridge: Don't kill URB in release after device is disconnected

The URBs are killed in disconnect method. If the device is disconnected
before the /dev/ccid_bridge is closed, no need to kill the URBs again.
As the URB reference count is dropped in disconnect, accessing it in
release is causing the kernel panic.

CRs-Fixed: 653776
Change-Id: I7fae9ac2568cce59ea39bdd73c955d388d3f26bd
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
USB: ccid_bridge: Provide bulk message write/read stats via debugfs

The bulk message timeouts are observed occasionally during mass storage
transfers. This debug facility helps in identifying such timeout issues.

The sample output of the stats debugfs file.

ccid_bridge: connected
ccid_bridge: opened
total writes: 444
total reads: 444
write/read timeout val: 1000
write_timeout: 0
read_timeout: 0
write_max_time (msec): 130
read_max_time: (msec): 857

CRs-Fixed: 659909
Change-Id: I9787288c10d23b176c9316feed82d41bd2adae65
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
cpufreq: interactive: Choose highest frequency below or at target

This generally saves us one freq level.
cpufreq: Always allow update of user policy

In the cases where the system boots up in a constraint with policy min and
max lower than cpuinfo min/max, and user tries to set a higher user
policy min, the value would be overridden during the verifying the
limits.

Once user initiates the sysfs write the previous user policy is
maintained in policy min and max thus changing the limits for verification
of the current policy. Once the verification is completed restore the
current user policy min/max with the updated values if any. This would take
care of cases uwhere user policy min/max input is higher/lesser than the
current min and max.

Change-Id: I5ad92ba05162cb5c32c3ba3fdae21d2e505493d3
Signed-off-by: Taniya Das <tdas@codeaurora.org>
USB: ccid_bridge: Add module param for bulk message timeout

The bulk message timeout is 1 second by default. Some cards take
more time to respond to CCID commands. Provide a module param
to configure the bulk message timeout.

For example, the below command configures the timeout as 5 seconds.

echo -n 5000 > /sys/module/ccid_bridge/parameters/bulk_msg_timeout

CRs-Fixed: 652421
Change-Id: I5f8fc2a9586d3728fe1c43311a28c4084a333164
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
cpufreq: interactive: Add check_fast mode to raise freqs faster

It takes too long to scale from min_freq to max_freq. If you ignore
go_hispeed, then it takes over 100ms to step up through all the
frequencies. Even with go_hispeed, I think I figured it was 90ms to go
from idle to max speed.

The core of the problem is that a cpu_load << 100% is meaningful for
scaling.  As that load approaches 100% though, this estimate becomes
meaningless.

Here "meaningful" means that the speed adjusted load is a good approximation
of the total processing work needed and therefore good for estimating the
target frequency.

At 100% it is not meaningful because either it is a perfect estimate (had
we been running faster there is no more work we would have done) or off by
a factor of max_freq/min_freq in the worst case.

This patch recognizes this case and scales more aggressively.  At the same
time it also re-estimates in a shorter time to correct over/under scaling.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cpufreq: interactive: Disable idle notifier

Instead, just always poll using the timer.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
sched/fair: Fix typo describing flags in enqueue_entity

Fix spelling of 'calling' in description of se flags in
enqueue_entity().

Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Cc: peterz@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
sched: Fix __sched_period comment

It should be sched_nr_latency so fix it before it annoys me more.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
sched: Update documentation and comments

Change sched_*.c to sched/*.c in documentation and comments.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Interactive: Code fixed to adapt to my branch.
Config Update with new usb config.