aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-28 21:15:41 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-28 21:15:41 -0400
commit5dfb66ba8c4a96eb732942c9f78629e4db1a51d4 (patch)
treed443adb4d02ac2599baf402698a589a9b814e478 /include/linux
parent1d9b9f6a53d77ed801ba875f937d6dabbfc381ce (diff)
parent424f525a1241351da947fb48a938128ddd774511 (diff)
Merge branch 'for-linus' of git://git.o-hand.com/linux-mfd
* 'for-linus' of git://git.o-hand.com/linux-mfd: mfd: accept pure device as a parent, not only platform_device mfd: add platform_data to mfd_cell mfd: Coding style fixes mfd: Use to_platform_device instead of container_of
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/core.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
index bb3dd0545928..49ef857cdb2d 100644
--- a/include/linux/mfd/core.h
+++ b/include/linux/mfd/core.h
@@ -1,5 +1,3 @@
1#ifndef MFD_CORE_H
2#define MFD_CORE_H
3/* 1/*
4 * drivers/mfd/mfd-core.h 2 * drivers/mfd/mfd-core.h
5 * 3 *
@@ -13,6 +11,9 @@
13 * 11 *
14 */ 12 */
15 13
14#ifndef MFD_CORE_H
15#define MFD_CORE_H
16
16#include <linux/platform_device.h> 17#include <linux/platform_device.h>
17 18
18/* 19/*
@@ -28,7 +29,13 @@ struct mfd_cell {
28 int (*suspend)(struct platform_device *dev); 29 int (*suspend)(struct platform_device *dev);
29 int (*resume)(struct platform_device *dev); 30 int (*resume)(struct platform_device *dev);
30 31
31 void *driver_data; /* driver-specific data */ 32 /* driver-specific data for MFD-aware "cell" drivers */
33 void *driver_data;
34
35 /* platform_data can be used to either pass data to "generic"
36 driver or as a hook to mfd_cell for the "cell" drivers */
37 void *platform_data;
38 size_t data_size;
32 39
33 /* 40 /*
34 * This resources can be specified relatievly to the parent device. 41 * This resources can be specified relatievly to the parent device.
@@ -38,18 +45,11 @@ struct mfd_cell {
38 const struct resource *resources; 45 const struct resource *resources;
39}; 46};
40 47
41static inline struct mfd_cell * 48extern int mfd_add_devices(struct device *parent, int id,
42mfd_get_cell(struct platform_device *pdev) 49 const struct mfd_cell *cells, int n_devs,
43{ 50 struct resource *mem_base,
44 return (struct mfd_cell *)pdev->dev.platform_data; 51 int irq_base);
45}
46
47extern int mfd_add_devices(
48 struct platform_device *parent,
49 const struct mfd_cell *cells, int n_devs,
50 struct resource *mem_base,
51 int irq_base);
52 52
53extern void mfd_remove_devices(struct platform_device *parent); 53extern void mfd_remove_devices(struct device *parent);
54 54
55#endif 55#endif