]>
Commit | Line | Data |
---|---|---|
e76a96dd GKH |
1 | From bee6e1fa617b1fb7f6f91033428410e05f5ab0ed Mon Sep 17 00:00:00 2001 |
2 | From: Mark Brown <broonie@opensource.wolfsonmicro.com> | |
3 | Date: Tue, 7 Aug 2012 19:42:43 +0100 | |
4 | Subject: mfd: max8925: Move _IO resources out of ioport_ioresource | |
5 | ||
6 | From: Mark Brown <broonie@opensource.wolfsonmicro.com> | |
7 | ||
8 | commit bee6e1fa617b1fb7f6f91033428410e05f5ab0ed upstream. | |
9 | ||
10 | The removal of mach/io.h from most ARM platforms also set the range of | |
11 | valid IO ports to be empty for most platforms when previously any 32 | |
12 | bit integer had been valid. This makes it impossible to add IO resources | |
13 | as the added range is smaller than that of the root resource for IO ports. | |
14 | ||
15 | Since we're not really using IO memory at all fix this by defining our | |
16 | own root resource outside the normal tree and make that the parent of | |
17 | all IO resources. This also ensures we won't conflict with read IO ports | |
18 | if we ever run on a platform which happens to use them. | |
19 | ||
6489cd51 | 20 | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> |
e76a96dd GKH |
21 | Acked-by: Arnd Bergmann <arnd@arndb.de> |
22 | Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> | |
23 | Tested-by: Haojian Zhuang <haojian.zhuang@gmail.com> | |
24 | Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> | |
25 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
26 | ||
27 | --- | |
28 | drivers/mfd/max8925-core.c | 10 ++++++++++ | |
29 | 1 file changed, 10 insertions(+) | |
30 | ||
31 | --- a/drivers/mfd/max8925-core.c | |
32 | +++ b/drivers/mfd/max8925-core.c | |
33 | @@ -18,12 +18,19 @@ | |
34 | #include <linux/mfd/core.h> | |
35 | #include <linux/mfd/max8925.h> | |
36 | ||
37 | +static struct resource io_parent = { | |
38 | + .start = 0, | |
39 | + .end = 0xffffffff, | |
40 | + .flags = IORESOURCE_IO, | |
41 | +}; | |
42 | + | |
43 | static struct resource backlight_resources[] = { | |
44 | { | |
45 | .name = "max8925-backlight", | |
46 | .start = MAX8925_WLED_MODE_CNTL, | |
47 | .end = MAX8925_WLED_CNTL, | |
48 | .flags = IORESOURCE_IO, | |
49 | + .parent = &io_parent, | |
50 | }, | |
51 | }; | |
52 | ||
53 | @@ -42,6 +49,7 @@ static struct resource touch_resources[] | |
54 | .start = MAX8925_TSC_IRQ, | |
55 | .end = MAX8925_ADC_RES_END, | |
56 | .flags = IORESOURCE_IO, | |
57 | + .parent = &io_parent, | |
58 | }, | |
59 | }; | |
60 | ||
61 | @@ -60,6 +68,7 @@ static struct resource power_supply_reso | |
62 | .start = MAX8925_CHG_IRQ1, | |
63 | .end = MAX8925_CHG_IRQ1_MASK, | |
64 | .flags = IORESOURCE_IO, | |
65 | + .parent = &io_parent, | |
66 | }, | |
67 | }; | |
68 | ||
69 | @@ -118,6 +127,7 @@ static struct mfd_cell onkey_devs[] = { | |
70 | .start = MAX8925_##_start, \ | |
71 | .end = MAX8925_##_end, \ | |
72 | .flags = IORESOURCE_IO, \ | |
73 | + .parent = &io_parent, \ | |
74 | } | |
75 | ||
76 | static struct resource regulator_resources[] = { |