-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from spiiroin/jb40062_charging_hysteresis
[charging] Configurable charging hysteresis. Fixes JB#40062
- Loading branch information
Showing
10 changed files
with
1,226 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @file builtin-gconf.c | ||
* GConf compatibility module - for dynamic mce settings | ||
* <p> | ||
* Copyright (C) 2012-2019 Jolla Ltd. | ||
* Copyright (c) 2012 - 2022 Jolla Ltd. | ||
* <p> | ||
* @author Simo Piiroinen <[email protected]> | ||
* | ||
|
@@ -49,6 +49,7 @@ | |
#include "modules/doubletap.h" | ||
#include "modules/led.h" | ||
#include "modules/inactivity.h" | ||
#include "modules/charging.h" | ||
|
||
#include <stdlib.h> | ||
#include <string.h> | ||
|
@@ -1957,6 +1958,21 @@ static const setting_t gconf_defaults[] = | |
.type = "i", | ||
.def = G_STRINGIFY(MCE_DEFAULT_BUTTONBACKLIGHT_OFF_DELAY), | ||
}, | ||
{ | ||
.key = MCE_SETTING_CHARGING_MODE, | ||
.type = "i", | ||
.def = G_STRINGIFY(MCE_DEFAULT_CHARGING_MODE), | ||
}, | ||
{ | ||
.key = MCE_SETTING_CHARGING_LIMIT_DISABLE, | ||
.type = "i", | ||
.def = G_STRINGIFY(MCE_DEFAULT_CHARGING_LIMIT_DISABLE), | ||
}, | ||
{ | ||
.key = MCE_SETTING_CHARGING_LIMIT_ENABLE, | ||
.type = "i", | ||
.def = G_STRINGIFY(MCE_DEFAULT_CHARGING_LIMIT_ENABLE), | ||
}, | ||
{ | ||
.key = NULL, | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Configuration file for MCE - charging hysteresis control -*- mode: sh -*- | ||
# | ||
# Provided that battery kernel driver supports such operation, | ||
# mce can be instructed for example to cease charging when battery | ||
# level reaches 90% and restart charging when battery level drops | ||
# below 50%. | ||
# | ||
# While mce side state logic and settings are generic, how charging | ||
# is actually enabled/disabled can vary from one device type to | ||
# another depending on hw and related kernel drivers. | ||
|
||
[Charging] | ||
|
||
# Devices where kernel utilizes POWER_SUPPLY_PROP_CHARGING_ENABLED | ||
# For example: f5121 (Xperia X), l500d (Jolla C) | ||
|
||
#ControlPath = /sys/class/power_supply/battery/charging_enabled | ||
#EnableValue = 1 | ||
#DisableValue = 0 | ||
|
||
# Devices where kernel utilizes POWER_SUPPLY_PROP_INPUT_SUSPEND | ||
# For example: h3113 (Xperia XA2), i4113 (Xperia 10) | ||
|
||
#ControlPath = /sys/class/power_supply/battery/input_suspend | ||
#EnableValue = 0 | ||
#DisableValue = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.