Commit 72dcb1197228b50bfb709ba97c2d53013c605868

Authored by Mark Brown
Committed by Samuel Ortiz
1 parent c10c2aab63

resources: Add register address resource type

Currently a bunch of I2C/SPI MFD drivers are using IORESOURCE_IO for
register address ranges. Since this causes some confusion due to the
primary use of this resource type for PCI/ISA I/O ports create a new
resource type IORESOURCE_REG.

Unfortunately the current resource types are specified as bitmasks and
there are no free bitmasks even though they really shouldn't be used as
such so we define the new type as IORESOURCE_IO | IORESOURCE_MEM.
Benjamin Herrenschmidt and Russell King have both verified that none of
the users in this series will have a problem with this, and no new code
should be affected.

This patch was written by Russell King but he found himself unable to
take the patch further.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Tested-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

include/linux/ioport.h
... ... @@ -31,6 +31,7 @@
31 31 #define IORESOURCE_TYPE_BITS 0x00001f00 /* Resource type */
32 32 #define IORESOURCE_IO 0x00000100
33 33 #define IORESOURCE_MEM 0x00000200
  34 +#define IORESOURCE_REG 0x00000300 /* Register offsets */
34 35 #define IORESOURCE_IRQ 0x00000400
35 36 #define IORESOURCE_DMA 0x00000800
36 37 #define IORESOURCE_BUS 0x00001000