aboutsummaryrefslogtreecommitdiff
path: root/scripts/gcc-plugins/cyc_complexity_plugin.c
diff options
context:
space:
mode:
authorJonghwa Lee <[email protected]>2020-05-14 16:04:31 -0700
committerSebastian Reichel <[email protected]>2020-08-28 19:27:45 +0200
commite132fc6bb89bd307cfcdb8ba24afcd1985261485 (patch)
treeda60e52633eaf44c7011e85bfb426e17d4fc3069 /scripts/gcc-plugins/cyc_complexity_plugin.c
parentdfc63825aa15daa1d335e2291741949fd001b782 (diff)
power: supply: charger-manager: Make decisions focussed on battery status
cm_monitor(), where charging management starts, checks various charging condition sequentially to decide next charging operation. However, as it follows sequential process, cascaded if statements, it does some jobs which have already done in the previous stage. This results in a delay in decision making. Moreover, starting point of charging is spread all around which makes maintain code and debugging difficult. Both of the problems mentioned above become clean if it manages battery charging focusing on battery status not following sequential condition checking. Now, cm_monitor() moves battery state diagram and does the optimal operation for current state. As a result, it reduces whole monitoring time almost in half. Signed-off-by: Jonghwa Lee <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Jonathan Bakker <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions