linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] mfd: max8925: Move _IO resources out of ioport_ioresource
@ 2012-08-07 18:42 Mark Brown
  2012-08-07 18:42 ` [PATCH 2/7] mfd: 88pm860x: " Mark Brown
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Mark Brown @ 2012-08-07 18:42 UTC (permalink / raw)
  To: Samuel Ortiz
  Cc: linux-kernel, Haojian Zhuang, Benjamin Herrenschmidt,
	Arnd Bergmann, Russell King, Mark Brown, v3.4+

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>
Cc: stable@vger.kernel.org (v3.4+)
---
 drivers/mfd/max8925-core.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c
index 825a7f0..6aa3a22 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[] = {
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-09-11  9:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-07 18:42 [PATCH 1/7] mfd: max8925: Move _IO resources out of ioport_ioresource Mark Brown
2012-08-07 18:42 ` [PATCH 2/7] mfd: 88pm860x: " Mark Brown
2012-08-07 18:42 ` [PATCH 3/7] resources: Add register address resource type Mark Brown
2012-08-07 18:42 ` [PATCH 4/7] resources: Document IORESOURCE_IO Mark Brown
2012-08-07 18:42 ` [PATCH 5/7] mfd: wm831x: Convert to IORESOURCE_REG Mark Brown
2012-08-07 18:42 ` [PATCH 6/7] mfd: 88pm860x: " Mark Brown
2012-08-07 18:42 ` [PATCH 7/7] mfd: max8925: " Mark Brown
2012-08-07 19:46 ` [PATCH 1/7] mfd: max8925: Move _IO resources out of ioport_ioresource Arnd Bergmann
2012-08-08 12:43   ` Mark Brown
2012-08-08 15:20   ` Haojian Zhuang
2012-09-10 15:11     ` Haojian Zhuang
2012-08-08 15:17 ` [PATCH 1/3] mfd: 88pm860x: use REG resource for backlight Haojian Zhuang
2012-08-08 15:17   ` [PATCH 2/3] mfd: 88pm860x: use REG in leds resource Haojian Zhuang
2012-08-08 15:17   ` [PATCH 3/3] mfd: 88pm860x: use REG resource in regulator Haojian Zhuang
2012-08-08 15:26   ` [PATCH 1/3] mfd: 88pm860x: use REG resource for backlight Greg KH
2012-09-11  9:38 ` [PATCH 1/7] mfd: max8925: Move _IO resources out of ioport_ioresource Samuel Ortiz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).