summaryrefslogtreecommitdiff
path: root/include/linux/power/max17042_battery.h
diff options
context:
space:
mode:
authorBeomho Seo <beomho.seo@samsung.com>2015-04-03 17:26:08 +0900
committerSebastian Reichel <sre@kernel.org>2015-04-06 17:46:27 +0200
commit709c2c70c8ea73f488971f1de3c39fbdac995951 (patch)
treed9e71388036e98b7e6752a813e354bc499227f31 /include/linux/power/max17042_battery.h
parent7be5ac2c32bd26c47a05367c0135cb6e67b3d452 (diff)
downloadlwn-709c2c70c8ea73f488971f1de3c39fbdac995951.tar.gz
lwn-709c2c70c8ea73f488971f1de3c39fbdac995951.zip
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>
Diffstat (limited to 'include/linux/power/max17042_battery.h')
-rw-r--r--include/linux/power/max17042_battery.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/power/max17042_battery.h b/include/linux/power/max17042_battery.h
index 89dd84f47c6e..cf112b4075c8 100644
--- a/include/linux/power/max17042_battery.h
+++ b/include/linux/power/max17042_battery.h
@@ -126,7 +126,14 @@ enum max17047_register {
MAX17047_QRTbl30 = 0x42,
};
-enum max170xx_chip_type {MAX17042, MAX17047};
+enum max170xx_chip_type {
+ MAXIM_DEVICE_TYPE_UNKNOWN = 0,
+ MAXIM_DEVICE_TYPE_MAX17042,
+ MAXIM_DEVICE_TYPE_MAX17047,
+ MAXIM_DEVICE_TYPE_MAX17050,
+
+ MAXIM_DEVICE_TYPE_NUM
+};
/*
* used for setting a register to a desired value