Subject: [PATCH 1/2] mfd: max8925: request resource region

From: [email-masked] (Arnd Bergmann)
Date: Mon, 7 May 2012 10:14:03 +0000

On Monday 07 May 2012, Mark Brown wrote:
> > What if you have two devices both claiming IO regions at 0?  Hint: it
> > fails.
> 
> Don't think I've got any examples with regions beginning at 0 but other
> regions seem to not run into any problems with overlap.  Note that all
> these drivers do with the regions is use them to look up the base
> register.

ISA devices start at 0. Using a definition for IORESOURCE_IO of "PCI
port number for relatively large values, but either ISA or PCMCIA or
an arbitrary MFD for relatively small values" is absolutely crazy.

FWIW, there are resources you define in include/linux/mfd/wm831x/core.h
that have values between 0x4000 and 0x8000, which is exactly the
range occupied by PCI devices on my thinkpad. It's only a matter of
time until someone puts conflicting devices into one machine.

	Arnd