summaryrefslogtreecommitdiff
path: root/include/linux/mfd/max14577-private.h
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>2014-04-14 11:17:14 +0200
committerLee Jones <lee.jones@linaro.org>2014-04-23 14:08:06 +0100
commiteccb80cc22354a12255c2579247a92a30a4c881b (patch)
tree5109ff3dcc8493c807f04efda8e9e0d8223251c4 /include/linux/mfd/max14577-private.h
parent575343d161d75dc1516f53436b9eb47d04eda938 (diff)
mfd: max14577: Add detection of device type
This patch continues the preparation for adding support for MAX77836 device to existing max14577 driver. Add enum for types of devices supported by this driver. The device type will be detected by matching of_device_id, or i2c_device_id as a fallback. The patch also moves to separate function the code related to displaying DeviceID register values. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd/max14577-private.h')
-rw-r--r--include/linux/mfd/max14577-private.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/mfd/max14577-private.h b/include/linux/mfd/max14577-private.h
index 97b78d94f92f..1ce6f2952cc9 100644
--- a/include/linux/mfd/max14577-private.h
+++ b/include/linux/mfd/max14577-private.h
@@ -22,6 +22,13 @@
#include <linux/i2c.h>
#include <linux/regmap.h>
+enum maxim_device_type {
+ MAXIM_DEVICE_TYPE_UNKNOWN = 0,
+ MAXIM_DEVICE_TYPE_MAX14577,
+
+ MAXIM_DEVICE_TYPE_NUM,
+};
+
/* Slave addr = 0x4A: MUIC and Charger */
enum max14577_reg {
MAX14577_REG_DEVICEID = 0x00,
@@ -271,15 +278,12 @@ enum max14577_irq {
struct max14577 {
struct device *dev;
struct i2c_client *i2c; /* Slave addr = 0x4A */
+ enum maxim_device_type dev_type;
struct regmap *regmap;
struct regmap_irq_chip_data *irq_data;
int irq;
-
- /* Device ID */
- u8 vendor_id; /* Vendor Identification */
- u8 device_id; /* Chip Version */
};
/* MAX14577 shared regmap API function */