diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-21 15:28:24 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-21 15:28:24 +0400 |
commit | 470fba7ebe60ad9185056b080b331abad24b4df9 (patch) | |
tree | f83bc13d97adaf5dd0e0f1d6a157b890f868577f /include/linux/mfd/core.h | |
parent | 7225e75144b9718cbbe1820d9c011c809d5773fd (diff) | |
parent | 6a55617ed5d1aa62b850de2cf66f5ede2eef4825 (diff) | |
download | linux-470fba7ebe60ad9185056b080b331abad24b4df9.tar.xz |
Merge branch 'linus' into x86/doc
Diffstat (limited to 'include/linux/mfd/core.h')
-rw-r--r-- | include/linux/mfd/core.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h new file mode 100644 index 000000000000..49ef857cdb2d --- /dev/null +++ b/include/linux/mfd/core.h @@ -0,0 +1,55 @@ +/* + * drivers/mfd/mfd-core.h + * + * core MFD support + * Copyright (c) 2006 Ian Molton + * Copyright (c) 2007 Dmitry Baryshkov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef MFD_CORE_H +#define MFD_CORE_H + +#include <linux/platform_device.h> + +/* + * This struct describes the MFD part ("cell"). + * After registration the copy of this structure will become the platform data + * of the resulting platform_device + */ +struct mfd_cell { + const char *name; + + int (*enable)(struct platform_device *dev); + int (*disable)(struct platform_device *dev); + int (*suspend)(struct platform_device *dev); + int (*resume)(struct platform_device *dev); + + /* 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. + * For accessing device you should use resources from device + */ + int num_resources; + const struct resource *resources; +}; + +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 device *parent); + +#endif |