summaryrefslogtreecommitdiff
path: root/drivers/power/supply/ab8500-bm.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2021-11-20 16:53:24 +0100
committerSebastian Reichel <sebastian.reichel@collabora.com>2021-11-22 17:16:26 +0100
commitbc6e0287140216011b99392fdf687a92707675ad (patch)
tree35c4322e245c5623a3af9b10799c6ac2eb7b1ded /drivers/power/supply/ab8500-bm.h
parent83e5aa77d1120fd38101f757c4aeb985e9305700 (diff)
downloadlwn-bc6e0287140216011b99392fdf687a92707675ad.tar.gz
lwn-bc6e0287140216011b99392fdf687a92707675ad.zip
power: supply: ab8500: Standardize CV voltage
The voltage used in the constant voltage phase of the charging exist in struct power_supply_battery_info as constant_charge_voltage_max_uv. Switch the custom property normal_vol_lvl to this and consequentially change everything that relates to this value over to using microvolts rather than millivolts so we align internal representation of current with the power core. Prefix every variable we change with *_uv to indicate the unit everywhere but also to make sure we do not miss any outlier. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power/supply/ab8500-bm.h')
-rw-r--r--drivers/power/supply/ab8500-bm.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/power/supply/ab8500-bm.h b/drivers/power/supply/ab8500-bm.h
index c8841567dfee..febf2dea853b 100644
--- a/drivers/power/supply/ab8500-bm.h
+++ b/drivers/power/supply/ab8500-bm.h
@@ -367,7 +367,6 @@ struct ab8500_maxim_parameters {
* struct ab8500_battery_type - different batteries supported
* @resis_high: battery upper resistance limit
* @resis_low: battery lower resistance limit
- * @normal_vol_lvl: charger voltage in normal state in mV
* @maint_a_cur_lvl: charger current in maintenance A state in mA
* @maint_a_vol_lvl: charger voltage in maintenance A state in mV
* @maint_a_chg_timer_h: charge time in maintenance A state
@@ -386,7 +385,6 @@ struct ab8500_maxim_parameters {
struct ab8500_battery_type {
int resis_high;
int resis_low;
- int normal_vol_lvl;
int maint_a_cur_lvl;
int maint_a_vol_lvl;
int maint_a_chg_timer_h;
@@ -421,15 +419,15 @@ struct ab8500_bm_capacity_levels {
/**
* struct ab8500_bm_charger_parameters - Charger specific parameters
- * @usb_volt_max: maximum allowed USB charger voltage in mV
+ * @usb_volt_max_uv: maximum allowed USB charger voltage in uV
* @usb_curr_max_ua: maximum allowed USB charger current in uA
- * @ac_volt_max: maximum allowed AC charger voltage in mV
+ * @ac_volt_max_uv: maximum allowed AC charger voltage in uV
* @ac_curr_max_ua: maximum allowed AC charger current in uA
*/
struct ab8500_bm_charger_parameters {
- int usb_volt_max;
+ int usb_volt_max_uv;
int usb_curr_max_ua;
- int ac_volt_max;
+ int ac_volt_max_uv;
int ac_curr_max_ua;
};