ELF loader support for auxvec base platform string
[deliverable/linux.git] / include / linux / mfd / core.h
CommitLineData
aa613de6
DB
1#ifndef MFD_CORE_H
2#define MFD_CORE_H
3/*
4 * drivers/mfd/mfd-core.h
5 *
6 * core MFD support
7 * Copyright (c) 2006 Ian Molton
8 * Copyright (c) 2007 Dmitry Baryshkov
9 *
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.
13 *
14 */
15
16#include <linux/platform_device.h>
17
18/*
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
22 */
23struct mfd_cell {
24 const char *name;
25
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);
30
31 void *driver_data; /* driver-specific data */
32
33 /*
34 * This resources can be specified relatievly to the parent device.
35 * For accessing device you should use resources from device
36 */
37 int num_resources;
38 const struct resource *resources;
39};
40
41static inline struct mfd_cell *
42mfd_get_cell(struct platform_device *pdev)
43{
44 return (struct mfd_cell *)pdev->dev.platform_data;
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
53extern void mfd_remove_devices(struct platform_device *parent);
54
55#endif
This page took 0.038878 seconds and 5 git commands to generate.