* [PATCH 1/1] mfd: max665x: Differentiate between MAX665X devices
@ 2014-02-12 16:58 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2014-02-12 16:58 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel
Cc: linus.walleij, linux, lpapp, khali, Lee Jones
This driver is pretty sparse at the moment, but once we start to add
more functionality it's highly probable that we'll be required to
differentiate between supported devices. To enable us to do that
efficiently via Device Tree we need to separate out the compatible
strings, one per variant.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/max665x.c | 3 ++-
include/linux/mfd/max665x-private.h | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/max665x.c b/drivers/mfd/max665x.c
index 54fdc11..3bcb765b0 100644
--- a/drivers/mfd/max665x.c
+++ b/drivers/mfd/max665x.c
@@ -71,7 +71,8 @@ static int max665x_remove(struct i2c_client *i2c)
}
static struct of_device_id max665x_dt_match[] = {
- { .compatible = "maxim,max665x" },
+ { .compatible = "maxim,max6650", .data = (void *)MAX6550 },
+ { .compatible = "maxim,max6651", .data = (void *)MAX6551 },
{},
};
MODULE_DEVICE_TABLE(of, max665x_dt_match);
diff --git a/include/linux/mfd/max665x-private.h b/include/linux/mfd/max665x-private.h
index 293db4b..1578a04 100644
--- a/include/linux/mfd/max665x-private.h
+++ b/include/linux/mfd/max665x-private.h
@@ -23,6 +23,11 @@
#include <linux/i2c.h>
#include <linux/regmap.h>
+enum max655x_id {
+ MAX6550 = 0,
+ MAX6551,
+}
+
struct max665x_dev {
struct device *dev;
struct mutex iolock;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 1/1] mfd: max665x: Differentiate between MAX665X devices
@ 2014-02-12 16:58 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2014-02-12 16:58 UTC (permalink / raw)
To: linux-arm-kernel
This driver is pretty sparse at the moment, but once we start to add
more functionality it's highly probable that we'll be required to
differentiate between supported devices. To enable us to do that
efficiently via Device Tree we need to separate out the compatible
strings, one per variant.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/max665x.c | 3 ++-
include/linux/mfd/max665x-private.h | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/max665x.c b/drivers/mfd/max665x.c
index 54fdc11..3bcb765b0 100644
--- a/drivers/mfd/max665x.c
+++ b/drivers/mfd/max665x.c
@@ -71,7 +71,8 @@ static int max665x_remove(struct i2c_client *i2c)
}
static struct of_device_id max665x_dt_match[] = {
- { .compatible = "maxim,max665x" },
+ { .compatible = "maxim,max6650", .data = (void *)MAX6550 },
+ { .compatible = "maxim,max6651", .data = (void *)MAX6551 },
{},
};
MODULE_DEVICE_TABLE(of, max665x_dt_match);
diff --git a/include/linux/mfd/max665x-private.h b/include/linux/mfd/max665x-private.h
index 293db4b..1578a04 100644
--- a/include/linux/mfd/max665x-private.h
+++ b/include/linux/mfd/max665x-private.h
@@ -23,6 +23,11 @@
#include <linux/i2c.h>
#include <linux/regmap.h>
+enum max655x_id {
+ MAX6550 = 0,
+ MAX6551,
+}
+
struct max665x_dev {
struct device *dev;
struct mutex iolock;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-12 16:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12 16:58 [PATCH 1/1] mfd: max665x: Differentiate between MAX665X devices Lee Jones
2014-02-12 16:58 ` Lee Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.