Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3417d797 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: step-chg-jeita: update jeita/step ranges to support signed threshold"

parents c8d08d32 8b897f18
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1110,7 +1110,7 @@ static int get_time_to_full_locked(struct ttf *ttf, int *val)

			/* Calculate OCV for each window */
			if (power_approx) {
				i_step = pbatt_avg / max((u32)MILLI_UNIT,
				i_step = pbatt_avg / max(MILLI_UNIT,
					(step_chg_cfg[i].high_threshold /
						MILLI_UNIT));
			} else {
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ static bool is_input_present(struct step_chg_info *chip)

int read_range_data_from_node(struct device_node *node,
		const char *prop_str, struct range_data *ranges,
		u32 max_threshold, u32 max_value)
		int max_threshold, u32 max_value)
{
	int rc = 0, i, length, per_tuple_length, tuples;

+4 −4
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -23,8 +23,8 @@ struct step_chg_jeita_param {
};

struct range_data {
	u32 low_threshold;
	u32 high_threshold;
	int low_threshold;
	int high_threshold;
	u32 value;
};

@@ -33,5 +33,5 @@ int qcom_step_chg_init(struct device *dev,
void qcom_step_chg_deinit(void);
int read_range_data_from_node(struct device_node *node,
		const char *prop_str, struct range_data *ranges,
		u32 max_threshold, u32 max_value);
		int max_threshold, u32 max_value);
#endif /* __STEP_CHG_H__ */