summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/mc13xxx.h
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2012-07-12 09:57:52 +0000
committerSamuel Ortiz <sameo@linux.intel.com>2012-11-06 23:11:42 +0100
commitcd0f34b08f98af72bb2f74fe4bd251558fc734d3 (patch)
treecaee50770690b553ffbc10df5fb031fdde5e187c /drivers/mfd/mc13xxx.h
parent5e53a69b44e893227b046a7bc74db3cb40d7f39b (diff)
downloadtalos-op-linux-cd0f34b08f98af72bb2f74fe4bd251558fc734d3.tar.gz
talos-op-linux-cd0f34b08f98af72bb2f74fe4bd251558fc734d3.zip
mfd: mc13xxx: Change probing details for mc13xxx devices
This removes auto-detection of which variant of mc13xxx is used because mc34708 uses a different layout in the revision register that doesn't allow differentiation any more. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Marc Reilly <marc@cpdesign.com.au> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/mc13xxx.h')
-rw-r--r--drivers/mfd/mc13xxx.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/mfd/mc13xxx.h b/drivers/mfd/mc13xxx.h
index bbba06feea06..78bf4c3c1fac 100644
--- a/drivers/mfd/mc13xxx.h
+++ b/drivers/mfd/mc13xxx.h
@@ -13,19 +13,24 @@
#include <linux/regmap.h>
#include <linux/mfd/mc13xxx.h>
-enum mc13xxx_id {
- MC13XXX_ID_MC13783,
- MC13XXX_ID_MC13892,
- MC13XXX_ID_INVALID,
+#define MC13XXX_NUMREGS 0x3f
+
+struct mc13xxx;
+
+struct mc13xxx_variant {
+ const char *name;
+ void (*print_revision)(struct mc13xxx *mc13xxx, u32 revision);
};
-#define MC13XXX_NUMREGS 0x3f
+extern struct mc13xxx_variant
+ mc13xxx_variant_mc13783,
+ mc13xxx_variant_mc13892;
struct mc13xxx {
struct regmap *regmap;
struct device *dev;
- enum mc13xxx_id ictype;
+ const struct mc13xxx_variant *variant;
struct mutex lock;
int irq;
OpenPOWER on IntegriCloud