This source file includes following definitions.
- imx_add_mxc_w1
1
2
3
4
5
6 #include "../hardware.h"
7 #include "devices-common.h"
8
9 #define imx_mxc_w1_data_entry_single(soc) \
10 { \
11 .iobase = soc ## _OWIRE_BASE_ADDR, \
12 }
13
14 #ifdef CONFIG_SOC_IMX21
15 const struct imx_mxc_w1_data imx21_mxc_w1_data __initconst =
16 imx_mxc_w1_data_entry_single(MX21);
17 #endif
18
19 #ifdef CONFIG_SOC_IMX27
20 const struct imx_mxc_w1_data imx27_mxc_w1_data __initconst =
21 imx_mxc_w1_data_entry_single(MX27);
22 #endif
23
24 #ifdef CONFIG_SOC_IMX31
25 const struct imx_mxc_w1_data imx31_mxc_w1_data __initconst =
26 imx_mxc_w1_data_entry_single(MX31);
27 #endif
28
29 #ifdef CONFIG_SOC_IMX35
30 const struct imx_mxc_w1_data imx35_mxc_w1_data __initconst =
31 imx_mxc_w1_data_entry_single(MX35);
32 #endif
33
34 struct platform_device *__init imx_add_mxc_w1(
35 const struct imx_mxc_w1_data *data)
36 {
37 struct resource res[] = {
38 {
39 .start = data->iobase,
40 .end = data->iobase + SZ_4K - 1,
41 .flags = IORESOURCE_MEM,
42 },
43 };
44
45 return imx_add_platform_device("mxc_w1", 0,
46 res, ARRAY_SIZE(res), NULL, 0);
47 }