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

Haojian Zhuang haojian.zhuang at gmail.com
Mon May 7 06:23:02 EDT 2012


On Mon, May 7, 2012 at 6:14 PM, Arnd Bergmann <arnd at arndb.de> wrote:
> 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

Even we append a new IORESOURCE type. We still meet similar issue. So
it means that we can't use any IORESOURCE for this kind of i2c usage. Is
it right?

Regards
Haojian



More information about the linux-arm-kernel mailing list