doubletap2wake: Add user selected feather radius

Signed-off-by: Dan Trifan <jimsth@gmail.com>
Sweep2wake: add vertical sweep capability and expose tunables to userspace

HUGE thanks to Dennis Rassmann <showp1984@gmail.com> for his original
sweep2wake contribution!

Signed-off-by: Paul Reioux <reioux@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
sweep2wake: Cleanup dead code

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
Option to disable touch wake with power button

Signed-off-by: flar2 <asegaert@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
disable s2w/dt2w after timeout

Signed-off-by: flar2 <asegaert@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
waketimeout: Stop spam in dmesg when not enabled

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
s2w/s2s/dt2w: Cleanup and re-implementation

* Thanks to Flar.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
drivers: input: touchscreen: fix wake_timeout derps

Signed-off-by: Dan Trifan <jimsth@gmail.com>
ASoC: qcom: qdsp6v2: fix crash due to asynchronous read/write

Whenever an async read command is issued to dsp when
the driver is not enabled, there is a crash in userspace.
The read command is disallowed in the driver and an error
is propagated to userspace which results in the crash.
The driver is re-enabled in a subsequent asynchronous write
command anyway, so the async read command can be allowed.
Ensure that read is allowed by removing a superfluous check.

CRs-Fixed: 675131
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
Change-Id: I5d0598e37d08ac1090f98c24be49fd99c132e22f
Signed-off-by: Dan Trifan <jimsth@gmail.com>
net: wireless: bcmdhd: Fix Batch scan get bug

Legacy Batch scan code would issue mutex unlock w/o a lock

bug: 17021370

Change-Id: Ica576f3a5ae8242d8510d90b3a1f3f3628b044f3
Signed-off-by: Ashwin <ashwin.bhat@broadcom.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
net: wireless : bcmdhd fix the type of bssidx of P2P

Currently we set WL_INVALID(-1) to bssidx for deinit.
However, the bssdix has u32 type.
so, we need to change type to s32.
Signed-off-by: Ecco park <eccopark@broadcom.com>

Change-Id: Icf18dbe6cbed560f07ecb2c25d5e8261021fabee
Signed-off-by: Dan Trifan <jimsth@gmail.com>
net: wireless: bcmdhd: Add support for hidden ssid PNO scan

Changes to support hidden ssid config to be sent to FW. Earlier
all ssids were hard coded as hidden, now only those indicated
as such by supplicant will be.

Change-Id: I927030fe12f162c52c93277b2ebfb4bf55daef4a
Signed-off-by: Ashwin <ashwin.bhat@broadcom.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
ext4: Add support for FIDTRIM, a best-effort ioctl for deep discard trim

* What
This provides an interface for issuing an FITRIM which uses the
secure discard instead of just a discard.
Only the eMMC command is "secure", and not how the FS uses it:
due to the fact that the FS might reassign a region somewhere else,
the original deleted data will not be affected by the "trim" which only
handles un-used regions.
So we'll just call it "deep discard", and note that this is a
"best effort" cleanup.

* Why
Once in a while, We want to be able to cleanup most of the unused blocks
after erasing a bunch of files.
We don't want to constantly secure-discard via a mount option.

From an eMMC spec perspective, it tells the device to really get rid of
all the data for the specified blocks and not just put them back into the
pool of free ones (unlike the normal TRIM). The eMMC spec says the
secure trim handling must make sure the data (and metadata) is not available
anymore. A simple TRIM doesn't clear the data, it just puts blocks in the
free pool.
JEDEC Standard No. 84-A441
  7.6.9 Secure Erase
  7.6.10 Secure Trim

From an FS perspective, it is acceptable to leave some data behind.
 - directory entries related to deleted files
 - databases entries related to deleted files
 - small-file data stored in inode extents
 - blocks held by the FS waiting to be re-used (mitigated by sync).
 - blocks reassigned by the FS prior to FIDTRIM.

Change-Id: I676a1404a80130d93930c84898360f2e6fb2f81e
Signed-off-by: Geremy Condra <gcondra@google.com>
Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
usb: gadget: f_accessory: Enabled Zero Length Packet (ZLP) for acc_write

Accessory connected to Android Device requires
Zero Length Packet (ZLP) to be written when data
transferred out from the Android device are multiples
of wMaxPacketSize (64bytes (Full-Speed) / 512bytes (High-Speed))
to end the transfer.

Change-Id: Ib2c2c0ab98ef9afa10e74a720142deca5c0ed476
Signed-off-by: Anson Jacob <ansonkuzhumbil@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
usb: gadget: f_audio_source: change max ISO packet size

Re-applying from
https://gitorious.org/shr/linux/commit/eb4c9d2db894c3492c0a848581bd4f6790f93d5f

Most USB-AUDIO devices are limited to 256 byte for max iso buffer size.
If a IN_EP_MAX_PACKET_SIZE is bigger than a USB-AUDIO device's max iso
buffer size, it will cause noise. This patch will prevent this case as
possibe by reducing packet size. When using 44.1khz, 2ch, 16bit audio
data, if max packet size is bigger than 176 bytes, it's no problem.

Credits to: Iliyan Malchev <malchev@google.com>

Change-Id: I61435bc9ad7ab05faba16cf80bfb9ff0431c3002
Signed-off-by: Anson Jacob <ansonkuzhumbil@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
usb: gadget: f_audio_source: Fixed USB Audio Class Interface Descriptor

Fixed Android Issue #56549.

When both Vendor Class and Audio Class are activated for AOA 2.0,
the baInterfaceNr of the AudioControl Interface Descriptor points
to wrong interface numbers. They should be pointing to
Audio Control Device and Audio Streaming interfaces.

Replaced baInterfaceNr with the correct value.

Change-Id: Ib20f20c1d65887bac051b7ff9453dc53fc23a8d0
Signed-off-by: Anson Jacob <ansonkuzhumbil@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
cfg80211: mlme: Silently ignore duplicate management registrations

Instead of erroring out, just ignore the call

Change-Id: I5ff67100ea2d7f53bd30b6844c462bca71c24d15
Signed-off-by: Dan Trifan <jimsth@gmail.com>
arm/dts: hammerhead: Disable ULPS

Signed-off-by: Dan Trifan <jimsth@gmail.com>