Re: [PATCH 0/5] mfd: replace IORESOURCE_IO by IORESOURCE_MEM

From: Mark Brown
Date: Tue Aug 07 2012 - 12:48:53 EST


On Tue, Aug 07, 2012 at 04:44:58PM +0100, Russell King wrote:

> However, one issue that I hope has already been addressed is what space
> the ranges are in, and how does a sub-driver get to know that. To put
> it another way, how does a sub-driver get to know about the 'base' for
> these register ranges. I hope that problem has been thought about in
> MFD land _before_ the approach of passing around register ranges
> through resources was allowed to happen.

That's been thought through - the subdevice drivers already have to rely
heavily on the fact that they know about their parent and part of that
contract is that the base address for these resources is always address
zero in the register space of the MFD and there's never more than one
resource in the tree. Nothing will ever do anything like reserve the
resources, they just get looked up to retrieve the base address for the
relevant range.

Someone could do a device which does something different but nobody
wanted to yet and it's very unclear that anyone would, if they did then
they'd have to deal with the issues that will result.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/