Thread (10 messages) 10 messages, 1 author, 2015-07-15

Lifecycle

  1. Posted Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
  2. Acked-by Lee Jones

[PATCH v5 2/9] mfd: max77693: Store I2C device type as enum and add default unknown

From: Krzysztof Kozlowski <hidden>
Date: 2015-07-15 13:00:48
Also in: linux-leds, linux-pm, lkml
Subsystem: maxim pmic and muic drivers for exynos based boards, multifunction devices (mfd), the rest · Maintainers: Chanwoo Choi, Krzysztof Kozlowski, Lee Jones, Linus Torvalds

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 <redacted>
Acked-by: Lee Jones <redacted>
---
 include/linux/mfd/max77693-private.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h
index ad67b8235a8d..e3c0afff38d3 100644
--- a/include/linux/mfd/max77693-private.h
+++ b/include/linux/mfd/max77693-private.h
@@ -529,13 +529,18 @@ enum max77693_irq_muic {
 	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;
@@ -549,8 +554,4 @@ struct max77693_dev {
 	int irq;
 };
 
-enum max77693_types {
-	TYPE_MAX77693,
-};
-
 #endif /*  __LINUX_MFD_MAX77693_PRIV_H */
-- 
2.1.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help