4 * drivers/mfd/mfd-core.h
7 * Copyright (c) 2006 Ian Molton
8 * Copyright (c) 2007 Dmitry Baryshkov
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
16 #include <linux/platform_device.h>
19 * This struct describes the MFD part ("cell").
20 * After registration the copy of this structure will become the platform data
21 * of the resulting platform_device
26 int (*enable)(struct platform_device *dev);
27 int (*disable)(struct platform_device *dev);
28 int (*suspend)(struct platform_device *dev);
29 int (*resume)(struct platform_device *dev);
31 void *driver_data; /* driver-specific data */
34 * This resources can be specified relatievly to the parent device.
35 * For accessing device you should use resources from device
38 const struct resource *resources;
41 static inline struct mfd_cell *
42 mfd_get_cell(struct platform_device *pdev)
44 return (struct mfd_cell *)pdev->dev.platform_data;
47 extern int mfd_add_devices(
48 struct platform_device *parent,
49 const struct mfd_cell *cells, int n_devs,
50 struct resource *mem_base,
53 extern void mfd_remove_devices(struct platform_device *parent);