summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-28 18:15:41 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-28 18:15:41 -0700
commit5dfb66ba8c4a96eb732942c9f78629e4db1a51d4 (patch)
treed443adb4d02ac2599baf402698a589a9b814e478 /include/linux
parent1d9b9f6a53d77ed801ba875f937d6dabbfc381ce (diff)
parent424f525a1241351da947fb48a938128ddd774511 (diff)
downloadop-kernel-dev-5dfb66ba8c4a96eb732942c9f78629e4db1a51d4.zip
op-kernel-dev-5dfb66ba8c4a96eb732942c9f78629e4db1a51d4.tar.gz
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 bb3dd054..49ef857 100644
--- a/include/linux/mfd/core.h
+++ b/include/linux/mfd/core.h
@@ -1,5 +1,3 @@
-#ifndef MFD_CORE_H
-#define MFD_CORE_H
/*
* drivers/mfd/mfd-core.h
*
@@ -13,6 +11,9 @@
*
*/
+#ifndef MFD_CORE_H
+#define MFD_CORE_H
+
#include <linux/platform_device.h>
/*
@@ -28,7 +29,13 @@ struct mfd_cell {
int (*suspend)(struct platform_device *dev);
int (*resume)(struct platform_device *dev);
- void *driver_data; /* driver-specific data */
+ /* driver-specific data for MFD-aware "cell" drivers */
+ void *driver_data;
+
+ /* platform_data can be used to either pass data to "generic"
+ driver or as a hook to mfd_cell for the "cell" drivers */
+ void *platform_data;
+ size_t data_size;
/*
* This resources can be specified relatievly to the parent device.
@@ -38,18 +45,11 @@ struct mfd_cell {
const struct resource *resources;
};
-static inline struct mfd_cell *
-mfd_get_cell(struct platform_device *pdev)
-{
- return (struct mfd_cell *)pdev->dev.platform_data;
-}
-
-extern int mfd_add_devices(
- struct platform_device *parent,
- const struct mfd_cell *cells, int n_devs,
- struct resource *mem_base,
- int irq_base);
+extern int mfd_add_devices(struct device *parent, int id,
+ const struct mfd_cell *cells, int n_devs,
+ struct resource *mem_base,
+ int irq_base);
-extern void mfd_remove_devices(struct platform_device *parent);
+extern void mfd_remove_devices(struct device *parent);
#endif
OpenPOWER on IntegriCloud