cpufreq: CPU max. hardlimit v2.0a
cpufreq: CPU max. hardlimit v1.5 (Yank555.lu)

Reference:
https://github.com/yank555-lu/N3-KK-faux123-yank555.lu/commit/59c757ff71
dfaca86af8f28bd6f5769a0916842d
  - Needs to account for touch boost changes in new layout

- add user configurable touchboost frequencies

SysFs Interface :

* /sys/kernel/cpufreq/hardlimit (rw)
*
* set or show the real hard CPU frequency limit when screen is on
*
* /sys/kernel/cpufreq/hardlimit_screen_off (rw)
*
* set or show the real hard CPU frequency limit when screen is off
*
* /sys/kernel/cpufreq/wakeup_kick_freq (rw)
*
* set or show the wakeup kick frequency (scaling_min for delay time)
*
* /sys/kernel/cpufreq/wakeup_kick_delay (rw)
*
* set or show the wakeup kick duration (in ms)
*
* /sys/kernel/cpufreq/touchboost_lo_freq (rw)
*
* set or show touchboost low frequency
*
* /sys/kernel/cpufreq/touchboost_hi_freq (rw)
*
* set or show touchboost high frequency
*
* /sys/kernel/cpufreq/available_frequencies (ro)
*
* display list of available CPU frequencies for convenience
*
* /sys/kernel/cpufreq/current_limit_max (ro)
*
* display current applied hardlimit for CPU max
*
* /sys/kernel/cpufreq/current_limit_min (ro)
*
* display current applied hardlimit for CPU min
*
* /sys/kernel/cpufreq/version (ro)
*
* display CPU freq hard limit version information

cpufreq: CPU max. hardlimit v1.4a (Yank555.lu)

- fix a derp in wakeupkick, scaling min and max were set to wakeup kick
frequency, this was wrong, only scaling min should be raised, scaling
max shouldn't be lowered

cpufreq: CPU max. hardlimit v1.4 (Yank555.lu)

- keep scaling min/max from overlapping (through sysfs)

cpufreq: CPU max. hardlimit v1.3 (Yank555.lu)

- add a wakeup kick frequency/delay setting scaling min to given
frequency for given delay on powersuspend resume

cpufreq: CPU max. hardlimit v1.2 (Yank555.lu)

- add a screen off CPU max hardlimit enforced independantly of the used
governor

cpufreq: CPU max. hardlimit v1.1 (Yank555.lu)

- add a hook in cpufreq_verify_within_limits() in cpufreq.h

cpufreq: update cpu-boost driver to make it behave with cpufreq
hardlimit (Yank555.lu)

cpufreq: introduce a hardlimit that will be respected no matter what
userspace is trying to force (Yank555.lu)

cpufreq: CPU max. hardlimit v1.6 (Yank555.lu)

- big code review
- added loads of debugging prints to dmesg (not compiled by default)
- fixed scaling_min/max getting stuck

SysFs Interface :

* /sys/kernel/cpufreq/hardlimit (rw)
*
* set or show the real hard CPU frequency limit when screen is on
*
* /sys/kernel/cpufreq/hardlimit_screen_off (rw)
*
* set or show the real hard CPU frequency limit when screen is off
*
* /sys/kernel/cpufreq/wakeup_kick_freq (rw)
*
* set or show the wakeup kick frequency (scaling_min for delay time)
*
* /sys/kernel/cpufreq/wakeup_kick_delay (rw)
*
* set or show the wakeup kick duration (in ms)
*
* /sys/kernel/cpufreq/touchboost_lo_freq (rw)
*
* set or show touchboost low frequency
*
* /sys/kernel/cpufreq/touchboost_hi_freq (rw)
*
* set or show touchboost high frequency
*
* /sys/kernel/cpufreq/available_frequencies (ro)
*
* display list of available CPU frequencies for convenience
*
* /sys/kernel/cpufreq/current_limit_max (ro)
*
* display current applied hardlimit for CPU max
*
* /sys/kernel/cpufreq/current_limit_min (ro)
*
* display current applied hardlimit for CPU min
*
* /sys/kernel/cpufreq/version (ro)
*
* display CPU freq hard limit version information

Conflicts:
	drivers/cpufreq/cpu-boost.c
	drivers/cpufreq/cpufreq.c

cpufreq: CPU max. hardlimit v1.7 (Yank555.lu)

Reference:
https://github.com/yank555-lu/N3-KK-faux123-yank555.lu/commit/505966a339
e4d9b7b3b3252e6950ac735435276f
  - Needs to account for touch boost in new layout

- make touchboost respect hardlimit
- make taking CPUs online respect hardlimit

SysFs Interface :

* /sys/kernel/cpufreq/hardlimit (rw)
*
* set or show the real hard CPU frequency limit when screen is on
*
* /sys/kernel/cpufreq/hardlimit_screen_off (rw)
*
* set or show the real hard CPU frequency limit when screen is off
*
* /sys/kernel/cpufreq/wakeup_kick_freq (rw)
*
* set or show the wakeup kick frequency (scaling_min for delay time)
*
* /sys/kernel/cpufreq/wakeup_kick_delay (rw)
*
* set or show the wakeup kick duration (in ms)
*
* /sys/kernel/cpufreq/touchboost_lo_freq (rw)
*
* set or show touchboost low frequency
*
* /sys/kernel/cpufreq/touchboost_hi_freq (rw)
*
* set or show touchboost high frequency
*
* /sys/kernel/cpufreq/available_frequencies (ro)
*
* display list of available CPU frequencies for convenience
*
* /sys/kernel/cpufreq/current_limit_max (ro)
*
* display current applied hardlimit for CPU max
*
* /sys/kernel/cpufreq/current_limit_min (ro)
*
* display current applied hardlimit for CPU min
*
* /sys/kernel/cpufreq/version (ro)
*
* display CPU freq hard limit version information

cpufreq: CPU max. hardlimit v1.7a

Additional 3.10 compliance not converted in merge

cpufreq: CPU max. hardlimit v2.0 (Yank555.lu)

This has grown from a simply OC max control thingy to a full cpufreq
control driver, hence the need to review the whole sysfs interface

- added CPU min screen on / off control
- added userspace DVFS lock (prevent scaling min/max changes through
sysfs)
- completely new sysfs interface
- lagacy sysfs interface can be kept for compatibily (but without CPU
min support, though)

New SysFs Interface :

 * /sys/kernel/cpufreq_hardlimit/scaling_max_freq_screen_on (rw)
 *
 *   set or show the real hard CPU max frequency limit when screen is on
 *
 * /sys/kernel/cpufreq_hardlimit/scaling_max_freq_screen_off (rw)
 *
 *   set or show the real hard CPU max frequency limit when screen is
off
 *
 * /sys/kernel/cpufreq_hardlimit/scaling_min_freq_screen_on (rw)
 *
 *   set or show the real hard CPU min frequency limit when screen is on
 *
 * /sys/kernel/cpufreq_hardlimit/scaling_min_freq_screen_off (rw)
 *
 *   set or show the real hard CPU min frequency limit when screen is
off
 *
 * /sys/kernel/cpufreq_hardlimit/wakeup_kick_freq (rw)
 *
 *   set or show the wakeup kick frequency (scaling_min for delay time)
 *
 * /sys/kernel/cpufreq_hardlimit/wakeup_kick_delay (rw)
 *
 *   set or show the wakeup kick duration (in ms)
 *
 * /sys/kernel/cpufreq_hardlimit/touchboost_lo_freq (rw)
 *
 *   set or show touchboost low frequency
 *
 * /sys/kernel/cpufreq_hardlimit/touchboost_hi_freq (rw)
 *
 *   set or show touchboost high frequency
 *
 * /sys/kernel/cpufreq_hardlimit/userspace_dvfs_lock (rw)
 *
 *   0 = allow changes to scaling min/max
 *   1 = ignore (don't apply, but don't return an error)
 *   2 = refuse (don't apply, return EINVAL)
 *
 * /sys/kernel/cpufreq_hardlimit/available_frequencies (ro)
 *
 *   display list of available CPU frequencies for convenience
 *
 * /sys/kernel/cpufreq_hardlimit/current_limit_max (ro)
 *
 *   display current applied hardlimit for CPU max
 *
 * /sys/kernel/cpufreq_hardlimit/current_limit_min (ro)
 *
 *   display current applied hardlimit for CPU min
 *
 * /sys/kernel/cpufreq_hardlimit/version (ro)
 *
 *   display CPU freq hard limit version information

Legacy SysFs Interface :

 * /sys/kernel/cpufreq/hardlimit (rw)
 *
 *   set or show the real hard CPU frequency limit when screen is on
 *
 * /sys/kernel/cpufreq/hardlimit_screen_off (rw)
 *
 *   set or show the real hard CPU frequency limit when screen is off
 *
 * /sys/kernel/cpufreq/wakeup_kick_freq (rw)
 *
 *   set or show the wakeup kick frequency (scaling_min for delay time)
 *
 * /sys/kernel/cpufreq/wakeup_kick_delay (rw)
 *
 *   set or show the wakeup kick duration (in ms)
 *
 * /sys/kernel/cpufreq/touchboost_lo_freq (rw)
 *
 *   set or show touchboost low frequency
 *
 * /sys/kernel/cpufreq/touchboost_hi_freq (rw)
 *
 *   set or show touchboost high frequency
 *
 * /sys/kernel/cpufreq/available_frequencies (ro)
 *
 *   display list of available CPU frequencies for convenience
 *
 * /sys/kernel/cpufreq/current_limit_max (ro)
 *
 *   display current applied hardlimit for CPU max
 *
 * /sys/kernel/cpufreq/current_limit_min (ro)
 *
 *   display current applied hardlimit for CPU min
 *
 * /sys/kernel/cpufreq/version (ro)
 *
 *   display CPU freq hard limit version information

cpufreq: CPU max. hardlimit v2.0a (Yank555.lu)

- fixed wakeup_kick_freq must be between screen on min and max (instead of screen on max and screen off max)

Thanx to zancum for reporting this !

New SysFs Interface :

* /sys/kernel/cpufreq_hardlimit/scaling_max_freq_screen_on (rw)
*
* set or show the real hard CPU max frequency limit when screen is on
*
* /sys/kernel/cpufreq_hardlimit/scaling_max_freq_screen_off (rw)
*
* set or show the real hard CPU max frequency limit when screen is off
*
* /sys/kernel/cpufreq_hardlimit/scaling_min_freq_screen_on (rw)
*
* set or show the real hard CPU min frequency limit when screen is on
*
* /sys/kernel/cpufreq_hardlimit/scaling_min_freq_screen_off (rw)
*
* set or show the real hard CPU min frequency limit when screen is off
*
* /sys/kernel/cpufreq_hardlimit/wakeup_kick_freq (rw)
*
* set or show the wakeup kick frequency (scaling_min for delay time)
*
* /sys/kernel/cpufreq_hardlimit/wakeup_kick_delay (rw)
*
* set or show the wakeup kick duration (in ms)
*
* /sys/kernel/cpufreq_hardlimit/touchboost_lo_freq (rw)
*
* set or show touchboost low frequency
*
* /sys/kernel/cpufreq_hardlimit/touchboost_hi_freq (rw)
*
* set or show touchboost high frequency
*
* /sys/kernel/cpufreq_hardlimit/userspace_dvfs_lock (rw)
*
* 0 = allow changes to scaling min/max
* 1 = ignore (don't apply, but don't return an error)
* 2 = refuse (don't apply, return EINVAL)
*
* /sys/kernel/cpufreq_hardlimit/available_frequencies (ro)
*
* display list of available CPU frequencies for convenience
*
* /sys/kernel/cpufreq_hardlimit/current_limit_max (ro)
*
* display current applied hardlimit for CPU max
*
* /sys/kernel/cpufreq_hardlimit/current_limit_min (ro)
*
* display current applied hardlimit for CPU min
*
* /sys/kernel/cpufreq_hardlimit/version (ro)
*
* display CPU freq hard limit version information
cpufreq: CPU max. hardlimit / intellidemand policy

3.10 compliance: Use calls to match redefined function
Update config: Enable hardlimit for testing