summaryrefslogtreecommitdiff
path: root/include/linux/mfd/wm831x
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2017-03-17 10:05:18 +0000
committerLee Jones <lee.jones@linaro.org>2017-03-23 11:45:50 +0000
commitf6dd8449cd50de25881b76cecf1086bebeb11fe8 (patch)
treefa757139b73dc9a8e79e46952d93db19dd5e8068 /include/linux/mfd/wm831x
parentc1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201 (diff)
mfd: wm831x: Add basic device tree binding
Add the basic ability to register the device through device tree, more work is needed to get each individual sub-driver functioning correctly but this is enough to get the device to probe from device tree. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd/wm831x')
-rw-r--r--include/linux/mfd/wm831x/core.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/mfd/wm831x/core.h b/include/linux/mfd/wm831x/core.h
index 76c22648436f..b49fa67612f1 100644
--- a/include/linux/mfd/wm831x/core.h
+++ b/include/linux/mfd/wm831x/core.h
@@ -21,6 +21,8 @@
#include <linux/list.h>
#include <linux/regmap.h>
#include <linux/mfd/wm831x/auxadc.h>
+#include <linux/mfd/wm831x/pdata.h>
+#include <linux/of.h>
/*
* Register values.
@@ -367,6 +369,9 @@ struct wm831x {
struct regmap *regmap;
+ struct wm831x_pdata pdata;
+ enum wm831x_parent type;
+
int irq; /* Our chip IRQ */
struct mutex irq_lock;
struct irq_domain *irq_domain;
@@ -412,7 +417,7 @@ int wm831x_set_bits(struct wm831x *wm831x, unsigned short reg,
int wm831x_bulk_read(struct wm831x *wm831x, unsigned short reg,
int count, u16 *buf);
-int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq);
+int wm831x_device_init(struct wm831x *wm831x, int irq);
void wm831x_device_exit(struct wm831x *wm831x);
int wm831x_device_suspend(struct wm831x *wm831x);
void wm831x_device_shutdown(struct wm831x *wm831x);
@@ -427,4 +432,6 @@ static inline int wm831x_irq(struct wm831x *wm831x, int irq)
extern struct regmap_config wm831x_regmap_config;
+extern const struct of_device_id wm831x_of_match[];
+
#endif