drivers: bluetooth: Improve use of macros

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Also set TX_TIMER_INTERVAL to 10 to save move battery.
THERMAL CONTROL: fix shutdown on bench test.
Disable ARCH_POWER and SLEEPERS

*Power save on suspend was better with ARCH_POWER OFF.
Set all versions of sync_freq to middle range freq to gain high perf.

and not allow to set less than 960000Mhz
as at this point gov start to LAG hard!

LG default hotplug also set sync_freq types to 960000 by default,
and if user select default hotplug he loose performance allot.
Kernel 5.9
Disable gentle_fair_sleepers & arch_power in  kernel/sched/fair.c
Disable WIFI Driver Debug. works good no need to debug.

Thanks neobuddy89
Revert WIFI wakelocks to STOCK. to prevent too high power use.
Revert "drivers: bluetooth: Improve use of macros"

This reverts commit 6780709e56fb7adeb1190b6de1740bf08af28b02.

Users report SLOW BT connect to Car BT, also noticed with my car...

LG uses different BT code for sleep/wake so i will keep it STOCK.
 bcmdhd: Reset the hang flag after notifications are sent

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

https://github.com/neobuddy89/hammerhead_kernel_caf/commit/7b683bd7323abe0b2bd4cd82e377236a99b4f517
gpio: msm: Remove software handling for dual-edge interrupts for TLMM_V2

The TLMM_V2 did not have hardware support for dual-edge interrupts.
This was handled in software using an algorithm to detect the current
edge and switch the interrupt polarity. This does not work after keeping
the RAW_STATUS_EN always enabled as switching the interrupt polarity
causes a spurious interrupt.
The TLMM_v3 has hardware support for dual-edge interrupts and this
continues to work as expected.
Thus, this patch removes dual-edge interrupt support for TLMM_V2.

Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
gpio: msm-v3: Use _no_log variants of readl/writel accessors

Avoid logging accesses to GPIO-related registers. This prevents flooding
of RTB logs when GPIOs are polled. GPIO (TLMM) registers should always
be accessible anyway, so logging of these accesses is unlikely to be
useful for debugging purposes.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Merge branch 'LG-STOCK-KK' of https://github.com/dorimanx/Dorimanx-LG-G2-D802-Kernel into upstream

Conflicts:
	READY-KERNEL/system/etc/thermal-engine-8974-default.conf
	READY-KERNEL/system/etc/thermal-engine-8974-ftm.conf
	READY-KERNEL/system/etc/thermal-engine-8974.conf
cpufreq_alucard: Added init_boostfreq pcpu parameter.
drivers: dma: warn if ioremap fails

dma-removed alloc hook tries to ioremap a carve-out in order
to memset it to 0s. Warn the user if it fails due to low
vmalloc space.

Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
arm: dma-removed: Add option to skip buffer zeroing

The DMA framework currently zeros all buffers because it (righfully so)
assumes that drivers will soon need to pass the memory to a device.
Some devices/use case may not require zeroed memory and there can
be an increase in performance if we skip the zeroing. Use the
DMA_ATTR_SKIP_ZEROING attr to allow skipping of DMA zeroing.

Signed-off-by: Taniya Das <tdas@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
drivers: dma: map pages only if required

DMA clients such as PIL would often allocate large
contiguous physical memory through dma-removed interface
for carve-outs. It may not be possible to map these large
allocations due to insufficient vmalloc space.

Hence provide provision to map the allocated pages only
if mapping or zeroing is explicitly requested for.

Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cma: Increase the default number of regions

The total number of CMA regions that can be created is statically
decided at compile time via a config option. Incoming memory map
changes increase the number of CMA regions significantly across
almost all targets. Rather than make every target set the CONFIG,
just increase the default number. The additional overhead is very
small.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
drivers: cma: Fix wrong CMA selected region size default value

Kconfig lists CMA_SIZE_SEL_ABSOLUTE as the default value fo the CMA
selected region size, but that option isn't available in the defined
choices. Set the default to CMA_SIZE_SEL_MBYTES instead.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
drivers: Add option to reserve default CMA region

CMA provides good utilization of memory but for some use cases, the
allocation time is too costly. Add a Kconfig option to allow the
default region to be permanently set aside for contiguous use cases.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>