]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/linux/mfd/rohm-bd718x7.h
mfd: regulator: clk: Split rohm-bd718x7.h
[linux.git] / include / linux / mfd / rohm-bd718x7.h
index fd194bfc836f49f79bae3a5c0403ed945a860f1c..7f2dbde402a1ee2f02906cc2839f81893578e224 100644 (file)
@@ -4,14 +4,9 @@
 #ifndef __LINUX_MFD_BD718XX_H__
 #define __LINUX_MFD_BD718XX_H__
 
+#include <linux/mfd/rohm-generic.h>
 #include <linux/regmap.h>
 
-enum {
-       BD718XX_TYPE_BD71837 = 0,
-       BD718XX_TYPE_BD71847,
-       BD718XX_TYPE_AMOUNT
-};
-
 enum {
        BD718XX_BUCK1 = 0,
        BD718XX_BUCK2,
@@ -321,18 +316,17 @@ enum {
        BD718XX_PWRBTN_LONG_PRESS_15S
 };
 
-struct bd718xx_clk;
-
 struct bd718xx {
-       unsigned int chip_type;
-       struct device *dev;
-       struct regmap *regmap;
-       unsigned long int id;
+       /*
+        * Please keep this as the first member here as some
+        * drivers (clk) supporting more than one chip may only know this
+        * generic struct 'struct rohm_regmap_dev' and assume it is
+        * the first chunk of parent device's private data.
+        */
+       struct rohm_regmap_dev chip;
 
        int chip_irq;
        struct regmap_irq_chip_data *irq_data;
-
-       struct bd718xx_clk *clk;
 };
 
 #endif /* __LINUX_MFD_BD718XX_H__ */