Commit graph

7 commits

Author SHA1 Message Date
Ramakrishna Pallala edd4ab0559 power: max17042_battery: add HEALTH and TEMP_* properties support
This patch adds the support for following battery properties
to max17042 fuel gauge driver.

POWER_SUPPLY_PROP_TEMP_ALERT_MIN
POWER_SUPPLY_PROP_TEMP_ALERT_MAX
POWER_SUPPLY_PROP_TEMP_MIN
POWER_SUPPLY_PROP_TEMP_MAX
POWER_SUPPLY_PROP_HEALTH

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-05-23 22:43:28 +02:00
Beomho Seo 709c2c70c8 power: max17042_battery: Use reg type instead of chip type
Currently, max17042 battery driver choose register map by MAX17042_DevName
register. But it is return IC specific firmware version. So other maxim chip
hard to use this drvier. This patch choose chip type from driver_data.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-04-06 17:46:27 +02:00
Ramakrishna Pallala 9a8422d205 max17042_battery: Add support for max17047/50 chip
max17047 is improved version of max17042 chip. It has few HW bug
fixes with minor changes in register set.

max17050 is same as max17047 chip except its silicon packging. So from
driver's point of view there is no difference btw max1047 and max1050.

This patch adds the support to dynamically detect the chip type and
adds steps to initialize the max17047 chip.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-05-05 20:28:11 -07:00
Ramakrishna Pallala f3a71a6eb1 max17042: Add POR init procedure from Maxim appnote
Add power on reset (POR) init procedure defined by the maxim
appnote. Using this procedure ensures that the part is
configured/initialized correctly at POR and improves early accuracy of
the fuel gauge and informs the fuel gauge with the battery
characterization parameters.  The battery characterization parameters
come from the maxim characterization procedure.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-26 20:37:35 +04:00
Dirk Brandewie f42c2b45b1 max17042: Align register definitions with data sheet and init appnote
align the register names with max17042 data sheet removing
registers that are marked reserved that are not used.

Add register definitions defined in the maxim initialization appnote

Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
2012-03-13 22:07:39 +04:00
Donggeun Kim 086ef502c2 power_supply: MAX17042: Support additional properties
This patch supports additional properties (PRESENT, CYCLE_COUNT,
VOLTAGE_MAX, VOLTAGE_MIN_DESIGN, CURRENT_NOW, CURRENT_AVG,
CHARGE_FULL, and TEMP).
Plus, initialization code for registers is added.

Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: KyungMin Park <kyungmin.park@samsung.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2011-07-08 17:01:58 +04:00
MyungJoo Ham 359ab9f5b1 power_supply: Add MAX17042 Fuel Gauge Driver
The MAX17042 is a fuel gauge with an I2C interface for lithium-ion
betteries. Unlike its predecessor MAX17040, MAX17042 uses 16bit
registers. Besides, MAX17042 has much more features than MAX17040; e.g.,
a thermistor, current and current accumulation measurement, battery
internal resistance estimate, average values of measurement, and others.

This patch implements a driver for MAX17042.
In this initial release, we have implemented the most basic features of
a fuel gauge: measure the battery capacity and voltage.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2011-01-14 18:11:59 +03:00