Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
devices-common.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009-2010 Pengutronix
3  * Uwe Kleine-Koenig <[email protected]>
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License version 2 as published by the
7  * Free Software Foundation.
8  */
9 #include <linux/kernel.h>
10 #include <linux/platform_device.h>
11 #include <linux/init.h>
13 
14 extern struct device mxc_aips_bus;
15 extern struct device mxc_ahb_bus;
16 
17 static inline struct platform_device *imx_add_platform_device_dmamask(
18  const char *name, int id,
19  const struct resource *res, unsigned int num_resources,
20  const void *data, size_t size_data, u64 dmamask)
21 {
22  struct platform_device_info pdevinfo = {
23  .name = name,
24  .id = id,
25  .res = res,
26  .num_res = num_resources,
27  .data = data,
28  .size_data = size_data,
29  .dma_mask = dmamask,
30  };
31  return platform_device_register_full(&pdevinfo);
32 }
33 
34 static inline struct platform_device *imx_add_platform_device(
35  const char *name, int id,
36  const struct resource *res, unsigned int num_resources,
37  const void *data, size_t size_data)
38 {
39  return imx_add_platform_device_dmamask(
40  name, id, res, num_resources, data, size_data, 0);
41 }
42 
43 #include <linux/fec.h>
44 struct imx_fec_data {
45  const char *devid;
48 };
50  const struct imx_fec_data *data,
51  const struct fec_platform_data *pdata);
52 
55  int id;
59 };
61  const struct imx_flexcan_data *data,
62  const struct flexcan_platform_data *pdata);
63 
64 #include <linux/fsl_devices.h>
68 };
70  const struct imx_fsl_usb2_udc_data *data,
71  const struct fsl_usb2_platform_data *pdata);
72 
73 #include <linux/gpio_keys.h>
75  const struct gpio_keys_platform_data *pdata);
76 
81 };
83  const struct imx_imx21_hcd_data *data,
84  const struct mx21_usbh_platform_data *pdata);
85 
90 };
92  const struct imx_imx27_coda_data *data);
93 
95  int id;
98 };
100  const struct imx_imx2_wdt_data *data);
101 
105 };
107  const struct imx_imxdi_rtc_data *data);
108 
114 };
116  const struct imx_imx_fb_data *data,
117  const struct imx_fb_platform_data *pdata);
118 
121  int id;
125 };
127  const struct imx_imx_i2c_data *data,
128  const struct imxi2c_platform_data *pdata);
129 
135 };
137  const struct imx_imx_keypad_data *data,
138  const struct matrix_keymap_data *pdata);
139 
142  int id;
150 };
152  const struct imx_imx_ssi_data *data,
153  const struct imx_ssi_platform_data *pdata);
154 
157  int id;
163 };
165  const struct imx_imx_uart_3irq_data *data,
166  const struct imxuart_platform_data *pdata);
167 
169  int id;
173 };
175  const struct imx_imx_uart_1irq_data *data,
176  const struct imxuart_platform_data *pdata);
177 
189 };
191  const struct imx_imx_udc_data *data,
192  const struct imxusb_platform_data *pdata);
193 
200 };
202  const struct imx_ipu_core_data *data);
204  const struct imx_ipu_core_data *data,
205  const struct mx3_camera_pdata *pdata);
207  const struct imx_ipu_core_data *data,
208  struct mx3fb_platform_data *pdata);
209 
215 };
217  const struct imx_mx1_camera_data *data,
218  const struct mx1_camera_pdata *pdata);
219 
228 };
230  const struct imx_mx2_camera_data *data,
231  const struct mx2_camera_platform_data *pdata);
233  const struct imx_mx2_camera_data *data);
234 
237  int id;
240 };
242  const struct imx_mxc_ehci_data *data,
243  const struct mxc_usbh_platform_data *pdata);
244 
247  int id;
252 };
254  const struct imx_mxc_mmc_data *data,
255  const struct imxmmc_platform_data *pdata);
256 
259  /*
260  * id is traditionally 0, but -1 is more appropriate. We use -1 for new
261  * machines but don't change existing devices as the nand device usually
262  * appears in the kernel command line to pass its partitioning.
263  */
264  int id;
269 };
271  const struct imx_mxc_nand_data *data,
272  const struct mxc_nand_platform_data *pdata);
273 
278 };
280  const struct imx_pata_imx_data *data);
281 
283  int id;
287 };
289  const struct imx_mxc_pwm_data *data);
290 
291 /* mxc_rtc */
295 };
297  const struct imx_mxc_rtc_data *data);
298 
299 /* mxc_w1 */
302 };
304  const struct imx_mxc_w1_data *data);
305 
308  const char *devid;
309  int id;
312 };
314  const struct imx_sdhci_esdhc_imx_data *data,
315  const struct esdhc_platform_data *pdata);
316 
319  const char *devid;
320  int id;
323  int irq;
324 };
326  const struct imx_spi_imx_data *data,
327  const struct spi_imx_master *pdata);
328 
329 struct platform_device *imx_add_imx_dma(void);
331  resource_size_t iobase, int irq, struct sdma_platform_data *pdata);
332 
333 #include <linux/ahci_platform.h>
335  const char *devid;
338 };
340  const struct imx_ahci_imx_data *data,
341  const struct ahci_platform_data *pdata);