[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120807111331.GC24257@flint.arm.linux.org.uk>
Date: Tue, 7 Aug 2012 12:13:31 +0100
From: Russell King <rmk@....linux.org.uk>
To: Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc: Haojian Zhuang <haojian.zhuang@...il.com>, sameo@...ux.intel.com,
rpurdie@...ys.net, bryan.wu@...onical.com,
linux-kernel@...r.kernel.org, Bergmann Arnd <arnd@...db.de>
Subject: Re: [PATCH 0/5] mfd: replace IORESOURCE_IO by IORESOURCE_MEM
On Tue, Aug 07, 2012 at 11:38:51AM +0100, Mark Brown wrote:
> On Tue, Aug 07, 2012 at 09:47:25AM +0800, Haojian Zhuang wrote:
>
> > It's because IO_SPACE_LIMIT is set as 0 if there's no PCI devices. But
> > IORESOURCE_IO is also used in PMIC mfd drivers to distinguish
> > different components.
>
> The change to keep things working here (pending the other changes which
> Russell wants) is to add a dummy resource with a wide enough range of
> registers defined and make it the parent for all the _IO resouces the
> PMIC has. This will put all the PMIC _IO resources in a separate tree
> to ioport_resource which can have the resorces added.
>
> If nothing else this seems much more suitable for stable and -rc (the
> bug has been there since v3.4).
There is no need for such hacks.
Just do as I've outlined:
1. Create a new resource type:
#define IORESOURCE_TYPE_FOO 0x00000300
2. Use this resource type for your resources in MFD which are using
platform devices.
3. Use it with the platform API. It will not handle this new resource
type any differently, it will treat it as its own unique resource type.
4. Use platform_get_resource() with this new resource type, it will work.
5. Move along to some other problem and enjoy life.
There's no need to botch this in any way what so ever, or invent some
other solution only to have to (probably never) rework it.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists