Store the device type (obtained from i2c_device_id) as an enum and add a
default type of unknown to distinguish from case when this is not set
at all.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
MAX77693_MUIC_IRQ_NR,
};
+enum max77693_types {
+ TYPE_MAX77693_UNKNOWN,
+ TYPE_MAX77693,
+};
+
struct max77693_dev {
struct device *dev;
struct i2c_client *i2c; /* 0xCC , PMIC, Charger, Flash LED */
struct i2c_client *muic; /* 0x4A , MUIC */
struct i2c_client *haptic; /* 0x90 , Haptic */
- int type;
+ enum max77693_types type;
struct regmap *regmap;
struct regmap *regmap_muic;
int irq;
};
-enum max77693_types {
- TYPE_MAX77693,
-};
-
#endif /* __LINUX_MFD_MAX77693_PRIV_H */