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>
This commit is contained in:
Beomho Seo 2015-04-03 17:26:08 +09:00 committed by Sebastian Reichel
parent 7be5ac2c32
commit 709c2c70c8
2 changed files with 18 additions and 24 deletions

View file

@ -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