[Moto G 4G Android Development] BryanByteZ:
UPDATE

Guys here it is, I dint tested this version (I am on a more old without intellithermal,KCAL and faux Sound) but it should work ok, as I am on nougat its working but anyone can confirm that is working on marshmallow too? I will build a CM12.1 version soon, a TITAN/THEA version will be built too. And I have bought a new phone but still will make this kernel for Moto G (even if no new custom features added I plan to at least keep it updated).

(BUILDING IT.... SOON ON AFH AND MIRROR(GITHUB))

I dont give up on DT2W just need free time to work on it.

Simple changelog:

LATEST SOURCES

CPU OC/UC

GPU OC/UC

CPU boost

KCAL

faux Sound

High perf headset mode

OC RAM and slimbus

Intellithermal

Simple GPU Algorithm and AdrenoIdler

State notifier and Powersuspend

Alucard and AutoSMP hotplugs

Stereo call recording

Custom I/O's

Stock GOVS

KEXEC Hardboot patch

wakelock blocks

Fsync on/off

Power efficient workqueue

Changelog for this new version:

- Revert "initial s2w dt2w code import from [MENTION=358990]show[/MENTION]p1984" (credits to BryanByteZero)

- Revert "dt2w/s2w: adapt and implement proper pocket mode for moto G [v2]" (credits to BryanByteZero)

- Revert "dt2w/s2w: switch to state notifier" (credits to BryanByteZero)

- Revert "Fixing cherry pick" (credits to BryanByteZero)

- Revert "sweep2wake: add sweep2sleep and code update" (credits to BryanByteZero)

- Revert "dt2w/s2w: fix screen freeze if dt2w/s2w in disable mode" (credits to BryanByteZero)

- Revert "dt2w/s2w: should return 0 if proximity not covered" (credits to BryanByteZero)

- Revert "dt2w/s2w/s2s: implement STATE_PREVENT_SLEEP" (credits to BryanByteZero)

- Revert "dt2w: remove power effecient workqueue" (credits to BryanByteZero)

- Revert "dt2w/s2w/s2s: Remove suspend_touch function" (credits to BryanByteZero)

- Revert "msm: mdss: Avoid calling wake_up_all() twice in display thread" (credits to BryanByteZero)

- Fix choice (credits to BryanByteZero)

- dt2w/s2w/s2s: Remove suspend_touch function (credits to hurtsky)

- dt2w: remove power effecient workqueue (credits to hurtsky)

- dt2w/s2w/s2s: implement STATE_PREVENT_SLEEP (credits to hurtsky)

- dt2w/s2w: should return 0 if proximity not covered (credits to hurtsky)

- dt2w/s2w: fix screen freeze if dt2w/s2w in disable mode (credits to hurtsky)

- sweep2wake: add sweep2sleep and code update (credits to hurtsky)

- Fixing cherry pick (credits to hurtsky)

- dt2w/s2w: switch to state notifier (credits to hurtsky)

- dt2w/s2w: adapt and implement proper pocket mode for moto G [v2] (credits to hurtsky)

- initial s2w dt2w code import from [MENTION=358990]show[/MENTION]p1984 (credits to hurtsky)

- cpufreq: enable/disable cpu-boost via sysfs (credits to savoca)

- cpufreq: interactive: various optimizations (credits to decipher90)

- msm_bam_rmnet: Fix potential memory corruption (credits to Subash Abhinov Kasiviswanathan)

- cpufreq: force cpuN policy to match cpu0 when changing freq or gov (credits to imoseyon)

- workqueue: usb: move hub init and LED blink work to power efficient workqueue (credits to Shaibal Dutta)

- workqueue: net: rfkill: move poll work to power efficient workqueue (credits to Shaibal Dutta)

- workqueue: net: wireless: move regulatory timeout work to power efficient workqueue (credits to Shaibal Dutta)

- sched: LOAD_FREQ (4*HZ+61) avoids loadavg Moire. From http://ripke.com/loadavg/moire (credits to franciscofranco)

- cpufreq: Initial CPU utilization should be 0 (credits to Stratos Karafotis)

- msm: mpm: use an interruptible wait to reduce loadavg (credits to Francisco Franco)

- msm: slimbus: use interruptible wait to reduce system's load average (credits to franciscofranco)

- msm: mdss: Avoid calling wake_up_all() twice in display thread (credits to Pranav Vashi)

- mdss: we can probably use interruptible thread on this code path (credits to franciscofranco)

- cpufreq: Introduce new relation for freq selection (credits to Stratos Karafotis)

- Defconfig update (credits to BryanByteZero)

- increase Torch power 20mA (credits to DC07)

- Enhance power efficiency: Series of patches from NVIDIA on some critical blocking code paths to allow the CPU to relax instead of busy spinning thus lowering the load_average and lowering power consumption. (credits to klozz)

- DOLBY_DAP dependency fix (credits to DC07)

- sched: Fix load avg vs cpu-hotplug (credits to Peter Zijlstra)

- slimbus: overclock root freq (credits to klozz)

- ASoC: msm: Change QOS value for low latency path (credits to Mekala Natarajan)

- ASoC: msm: Reduce min buffer size for low latency (credits to klozz)

- ASoc: msm: Increase max buffer size to 4k for lowlatency playback (credits to klozz)

- ASoc: Reduce number of periods in low latency driver. (credits to klozz)

- ASoC: wcd9306: Fix req_clsh_state mismatch (credits to savoca)

- ASoC: wcd9306: Enable class AB and expose sysfs (credits to savoca)

- ASoC: wcd9xxx: Enable headset in high performance (credits to Sudheer Papothi)

- video: mdss: Report PCC values from pp registers (credits to savoca)

- msm: mdss: KCAL: Remove deprecated __dev* markings (credits to savoca)

- msm: mdss: Add pa_v2 support to KCAL (credits to savoca)

- msm: mdss: Replace PGC implementation with PCC for KCAL (credits to savoca)

- msm: mdss: Add KCAL support for post processing control [v2] (credits to savoca)

- Faux Sound Control: Update to v3.5 (credits to Kamin4ri)

- Sound Control: let register lock be dependent on different hw revisions (credits to Paul Reioux)

- Sound Control: Misc clean up for newer WCD9xxx SOCs (credits to Paul Reioux)

- Sound Control: expose direct register manipulations to userspace (credits to Paul Reioux)

- Sound Control 3.2: Initial Port to MSM8226 Socs (credits to Paul Reioux)

- intellithermal v2: adapt for MSM8226 architecture (credits to Alin)

- wakeup: add toggle for bluesleep wakelock (credits to franciscofranco)

- wakeup: add toggle for bluedroid_timer wakelock (credits to franciscofranco)

- wakeup: add toggles for wlan wakelocks. They are all enabled by default, it's up to the user and I provide no support if Wi-Fi stops working normally without these locks enabled. This is for advanced users (credits to franciscofranco)

- Simple GPU Algorithm: Initial coding for devfreq based Adreno Drivers (credits to Paul Reioux)

- Defconfig update and fix (credits to BryanByteZero)

- drivers: state_notifier: sync with latest from neobuddy (credits to desaishivam26)

- drivers: state_notifier: start driver as subsystem (credits to Dorimanx)

- drivers: state_notifier: use singlethread workqueue (credits to alucard24)

- drivers: state_notifier: Use high priority workqueue (credits to Pranav Vashi)

- drivers: state_notifier: Prevent racy suspend call (credits to Pranav Vashi)

- drivers: state_notifier: Export suspend status (credits to Pranav Vashi)

- drivers: state_notifier: Implement suspend_defer_timer (credits to Pranav Vashi)

- adreno_idler: enable by default (credits to desaishivam26)

- devfreq: adreno_idler: Clean up & Use state notifier helper (credits to anarkia1976)

- drivers: notifier: add state notifier driver (credits to anarkia1976)

- ARM : Stabilize UC/OC * Add 300/600 Mhz steps, to scale down just how she likes it * Also, match MAX/MIN default configs in case somebody would like to use it (credits to Louis Popi)

- ARM : Add underclock/overclock support * Overclock is based on the speed bin 1 for acpuclock-8226 * This reverts commit https://github.com/h2o64/kernel_msm/commit/0ae6f3a2410d6d5ff579e55329eb1ead3848ca06 * Underclock based on https://github.com/zakee94/stellar_msm8226/commit/dbe1f3eec050922fac67fc9b1bcd37ba03102141 (savoca's work) * It's enabled by default but cm-caf userspace set 1,2 GHz Max and 900 Mhz min * Those values can be overidden by userspace (credits to h2o64)

- Alucard Hotplug by [MENTION=2199706]Alucard24[/MENTION] (credits to zakee94)

- hotplug: add Autosmp hotplug driver (credits to hurtsky)

- msm8226: underclock GPU to 100MHz (credits to Luka Karinja)

- overclocked gpu to 600Mhz (credits to MetalPhoenix45)

- msm8226: overclock GPU to 533MHz (credits to Luka Karinja)

- devfreq: adreno_idler: Introduce Adreno idler for devfreq-based devices (credits to arter97)

- msm8226: overclock RAM to 566MHz (credits to slukk)

- msm: cpufreq: Fix msm_cpufreq_get_freq() for sync CPUs (credits to Junjie Wu)

- ARM: mm: update __v7_setup() to the new LoUIS cache maintenance API (credits to Santosh Shilimkar)

- ARM: kernel: update __cpu_disable to use cache LoUIS maintenance API (credits to Lorenzo Pieralisi)

- ARM: mm: rename jump labels in v7_flush_dcache_all function (credits to Lorenzo Pieralisi)

- ARM: 7592/1: nommu: prevent generation of kernel unaligned memory accesses (credits to Will Deacon)

- ARM: 7492/1: add strstr declaration for decompressors (credits to Rob Herring)

- ARM: 7493/1: use generic unaligned.h (credits to faux123)

- ARM: 7583/1: decompressor: Enable unaligned memory access for v6 and above (credits to Dave Martin)

- ARM: mutex: use generic atomic_dec-based implementation for ARMv6+ (credits to Will Deacon)

- cpufreq: fix interactive build (credits to Blechd0se)

- cpufreq: Move get_cpu_idle_time() to cpufreq.c (credits to Viresh Kumar)

- msm: use of swp{b} is deprecated for ARMv6+ (credits to Pranav Vashi)

- PM / devfreq: Fix simple_ondemand crashing (credits to myfluxi)

- NOATIME and NODIRATIME as default (credits to pinkflozd)

- msm: kgsl: Vote against deep low power modes when GPU wakes up from slumber (credits to Yizheng Zhou)

- Reclaim RAM from loggers (credits to shivamk11)

- stereo call recording support (credits to shivamk11)

- block: scheduler: Added tripndroid scheduler (credits to shivamk11)

- kernel/power/powersuspend: cumulative update to version 1.5 (credits to yank555-lu)

- kernel/power/powersuspend: LCD screen on/off hooks (Yank555.lu) (credits to yank555-lu)

- kernel/power/powersuspend: default to userspace for now (credits to Paul Reioux)

- kernel/power/powersuspend: add back userpace control w/ default kernel control (credits to yank555-lu)

- kernel/power/powersuspend: remove userspace dependency from powersuspend (credits to yank555-lu)

- powersuspend: fix logci derps :p (credits to Paul Reioux)

- powersuspend: new PM kernel driver for Android w/o early_suspend (credits to Paul Reioux)

- Revert "SQUASH: Powersuspend v1.5" (credits to BryanByteZero)

- Fix implicit function declaration (credits to BryanByteZero)

- vfp: makefile: optimize (credits to desaishivam26)

- Add and enable kexec-hardboot changes for falcon. (credits to hurtsky)

- Makefile: add -fno-pic (credits to hurtsky)

- gcc5: makefile: if -O3 disable array-bounds false positive (credits to hurtsky)

- kernel: use the gnu89 standard explicitly (credits to hurtsky)

- Makefile: Added compilation optimization flags (credits to hurtsky)

- Give it a name (credits to BryanByteZero)

- drivers: cpufreq: Send a uevent when governor changes (credits to Steve Kondik)

- ARM: 7835/2: fix modular build of xor_blocks() with NEON enabled (credits to Ard Biesheuvel)

- ARM: crypto: add NEON accelerated XOR implementation (credits to Ard Biesheuvel)

- ARM: only allow kernel mode neon with AEABI (credits to Russell King)

- soc: qcom: bam_dmux: Add fast-shutdown flag (credits to Arun Kumar Neelakantam)

- SQUASH: Powersuspend v1.5 (credits to Paul Reioux)

- arm/dt: falcon: enable ULPS (credits to hurtsky)

- workqueue: drop CPU_DYING notifier operation (credits to Tejun Heo)

- workqueue: Catch more locking problems with flush_work() (credits to Stephen Boyd)

- random: entropy tweaks are all the rage nowadays (credits to Yuri.Sh)

- block: Make CFQ default to IOPS mode on SSDs (credits to anarkia1976)

- block: zen: Optimize usage for android (credits to Pranav Vashi)

- block: Add SIO, VR and ZEN I/O schedulers (credits to Pranav Vashi)

- sched: Add controls for sched features (credits to Pranav Vashi)

- lowmemorykiller: Do proper NULL checks (credits to Susheel Khiani)

- fs: fsync: correct permissions, cleanup introduced whitespaces (credits to Evisceration)

- fs: sync: add missing return if fsync is disabled from userspace. (credits to Francisco Franco)

- fs: sync: enable fsync by default. (credits to franciscofranco)

- Added fsync on/off support. (credits to franciscofranco)

- block: deadline: Optimize for non-rotational (credits to myfluxi)

- block: Disable add_random (credits to Chester Kener)

- workqueue: Fix permission for power_efficient workqueue (credits to desaishivam26)

- Revamp spinlock ASM code (credits to Randy DuCharme)

- mmc: Disable crc check (credits to Chet Kener)

- lib/memcopy: use glibc version (credits to Miao Xie)

- lib/string: use glibc version (credits to Miao Xie)

- Added optimized ARM RWSEM algorithm. (credits to Ezekeel)

- binfmt_elf.c: use get_random_int() to fix entropy depleting (credits to Jeff Liu)

- msm: kgsl: Report correct GPU frequency in sysfs (credits to myfluxi)

- workqueue: asoc: compress: Use power efficient workqueue (credits to Mark Brown)

- workqueue: fbcon: queue work on power efficient wq (credits to Viresh Kumar)

- workqueue: timekeeping: move clock sync work to power efficient workqueue (credits to anarkia1976)

- msm: kgsl: Bump the GPU frequency for long blocks of processing (credits to Lucille Sylvester)

- mm: slub: Default slub_max_order to 0 (credits to Mel Gorman)

- PM: devfreq: Fix show available freqs (credits to myfluxi)

- ASoC: jack: Use power efficient workqueue (credits to Mark Brown)

- regulator: core: Use the power efficient workqueue for delayed powerdown (credits to Mark Brown)

- ASoC: pcm: Use the power efficient workqueue for delayed powerdown (credits to Mark Brown)

- PHYLIB: queue work on system_power_efficient_wq (credits to Viresh Kumar)

- workqueue: Add system wide power_efficient workqueues (credits to Viresh Kumar)

- workqueues: Introduce new flag WQ_POWER_EFFICIENT for power oriented workqueues (credits to Viresh Kumar)

- crypto: sha512 - Expose generic sha512 routine to be callable from other modules (credits to Tim Chen)

- crypto: sha256 - Expose SHA256 generic routine to be callable externally. (credits to Tim Chen)

- crypto: add crypto_[un]register_shashes for [un]registering multiple shash entries at once (credits to Jussi Kivilinna)

- ARM: move VFP init to an earlier boot stage (credits to Ard Biesheuvel)

- ARM: smp: Wait just 1 second for other CPU to halt (credits to Chris Fries)

- block: disable slice idle for BFQ and CFQ (credits to Alex Naidis)

- block: Disable IO Stats (credits to Chester Kener)

- KGSL: GPU kgsl_pwrctrl.c use min pwr level as default. to reduce battery drain. (credits to Dorimanx)

- arm/mach-msm: fix some section mismatches with new source base (credits to YoshiShaPow)

- gitignore: ignore generated file (credits to YoshiShaPow)