This source file includes following definitions.
- mfd_get_cell
- mfd_add_hotplug_devices
1
2
3
4
5
6
7
8
9
10 #ifndef MFD_CORE_H
11 #define MFD_CORE_H
12
13 #include <linux/platform_device.h>
14
15 struct irq_domain;
16 struct property_entry;
17
18
19 struct mfd_cell_acpi_match {
20 const char *pnpid;
21 const unsigned long long adr;
22 };
23
24
25
26
27
28
29 struct mfd_cell {
30 const char *name;
31 int id;
32
33
34 atomic_t *usage_count;
35 int (*enable)(struct platform_device *dev);
36 int (*disable)(struct platform_device *dev);
37
38 int (*suspend)(struct platform_device *dev);
39 int (*resume)(struct platform_device *dev);
40
41
42 void *platform_data;
43 size_t pdata_size;
44
45
46 struct property_entry *properties;
47
48
49
50
51
52 const char *of_compatible;
53
54
55 const struct mfd_cell_acpi_match *acpi_match;
56
57
58
59
60
61 int num_resources;
62 const struct resource *resources;
63
64
65 bool ignore_resource_conflicts;
66
67
68
69
70
71 bool pm_runtime_no_callbacks;
72
73
74
75
76 const char * const *parent_supplies;
77 int num_parent_supplies;
78 };
79
80
81
82
83
84
85
86 extern int mfd_cell_enable(struct platform_device *pdev);
87 extern int mfd_cell_disable(struct platform_device *pdev);
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104 extern int mfd_clone_cell(const char *cell, const char **clones,
105 size_t n_clones);
106
107
108
109
110
111 static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev)
112 {
113 return pdev->mfd_cell;
114 }
115
116 extern int mfd_add_devices(struct device *parent, int id,
117 const struct mfd_cell *cells, int n_devs,
118 struct resource *mem_base,
119 int irq_base, struct irq_domain *irq_domain);
120
121 static inline int mfd_add_hotplug_devices(struct device *parent,
122 const struct mfd_cell *cells, int n_devs)
123 {
124 return mfd_add_devices(parent, PLATFORM_DEVID_AUTO, cells, n_devs,
125 NULL, 0, NULL);
126 }
127
128 extern void mfd_remove_devices(struct device *parent);
129
130 extern int devm_mfd_add_devices(struct device *dev, int id,
131 const struct mfd_cell *cells, int n_devs,
132 struct resource *mem_base,
133 int irq_base, struct irq_domain *irq_domain);
134 #endif