summaryrefslogtreecommitdiff
path: root/drivers/mfd/max8925-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-08-07 22:42:43 +0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-09-11 12:15:02 +0400
commitbee6e1fa617b1fb7f6f91033428410e05f5ab0ed (patch)
treeaceb990ad266a9a8d369c6382376d1ed404ebbd9 /drivers/mfd/max8925-core.c
parent092369efbd6ef6b4a215741ce9f65446bf45beff (diff)
downloadlinux-bee6e1fa617b1fb7f6f91033428410e05f5ab0ed.tar.xz
mfd: max8925: Move _IO resources out of ioport_ioresource
The removal of mach/io.h from most ARM platforms also set the range of valid IO ports to be empty for most platforms when previously any 32 bit integer had been valid. This makes it impossible to add IO resources as the added range is smaller than that of the root resource for IO ports. Since we're not really using IO memory at all fix this by defining our own root resource outside the normal tree and make that the parent of all IO resources. This also ensures we won't conflict with read IO ports if we ever run on a platform which happens to use them. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> Tested-by: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: stable@vger.kernel.org (v3.4+) Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/max8925-core.c')
-rw-r--r--drivers/mfd/max8925-core.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c
index 825a7f06d9ba..6aa3a22ea435 100644
--- a/drivers/mfd/max8925-core.c
+++ b/drivers/mfd/max8925-core.c
@@ -18,12 +18,19 @@
#include <linux/mfd/core.h>
#include <linux/mfd/max8925.h>
+static struct resource io_parent = {
+ .start = 0,
+ .end = 0xffffffff,
+ .flags = IORESOURCE_IO,
+};
+
static struct resource backlight_resources[] = {
{
.name = "max8925-backlight",
.start = MAX8925_WLED_MODE_CNTL,
.end = MAX8925_WLED_CNTL,
.flags = IORESOURCE_IO,
+ .parent = &io_parent,
},
};
@@ -42,6 +49,7 @@ static struct resource touch_resources[] = {
.start = MAX8925_TSC_IRQ,
.end = MAX8925_ADC_RES_END,
.flags = IORESOURCE_IO,
+ .parent = &io_parent,
},
};
@@ -60,6 +68,7 @@ static struct resource power_supply_resources[] = {
.start = MAX8925_CHG_IRQ1,
.end = MAX8925_CHG_IRQ1_MASK,
.flags = IORESOURCE_IO,
+ .parent = &io_parent,
},
};
@@ -118,6 +127,7 @@ static struct mfd_cell onkey_devs[] = {
.start = MAX8925_##_start, \
.end = MAX8925_##_end, \
.flags = IORESOURCE_IO, \
+ .parent = &io_parent, \
}
static struct resource regulator_resources[] = {