public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Samuel Ortiz <sameo@linux.intel.com>
Cc: linux-kernel@vger.kernel.org,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Russell King <rmk@arm.linux.org.uk>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 3/7] resources: Add register address resource type
Date: Tue,  7 Aug 2012 19:42:45 +0100	[thread overview]
Message-ID: <1344364969-32489-3-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1344364969-32489-1-git-send-email-broonie@opensource.wolfsonmicro.com>

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>
---
 include/linux/ioport.h |    1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 589e0e7..bfee885 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -31,6 +31,7 @@ struct resource {
 #define IORESOURCE_TYPE_BITS	0x00001f00	/* Resource type */
 #define IORESOURCE_IO		0x00000100
 #define IORESOURCE_MEM		0x00000200
+#define IORESOURCE_REG		0x00000300	/* Register offsets */
 #define IORESOURCE_IRQ		0x00000400
 #define IORESOURCE_DMA		0x00000800
 #define IORESOURCE_BUS		0x00001000
-- 
1.7.10.4


  parent reply	other threads:[~2012-08-07 18:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-07 18:42 [PATCH 1/7] mfd: max8925: Move _IO resources out of ioport_ioresource Mark Brown
2012-08-07 18:42 ` [PATCH 2/7] mfd: 88pm860x: " Mark Brown
2012-08-07 18:42 ` Mark Brown [this message]
2012-08-07 18:42 ` [PATCH 4/7] resources: Document IORESOURCE_IO Mark Brown
2012-08-07 18:42 ` [PATCH 5/7] mfd: wm831x: Convert to IORESOURCE_REG Mark Brown
2012-08-07 18:42 ` [PATCH 6/7] mfd: 88pm860x: " Mark Brown
2012-08-07 18:42 ` [PATCH 7/7] mfd: max8925: " Mark Brown
2012-08-07 19:46 ` [PATCH 1/7] mfd: max8925: Move _IO resources out of ioport_ioresource Arnd Bergmann
2012-08-08 12:43   ` Mark Brown
2012-08-08 15:20   ` Haojian Zhuang
2012-09-10 15:11     ` Haojian Zhuang
2012-08-08 15:17 ` [PATCH 1/3] mfd: 88pm860x: use REG resource for backlight Haojian Zhuang
2012-08-08 15:17   ` [PATCH 2/3] mfd: 88pm860x: use REG in leds resource Haojian Zhuang
2012-08-08 15:17   ` [PATCH 3/3] mfd: 88pm860x: use REG resource in regulator Haojian Zhuang
2012-08-08 15:26   ` [PATCH 1/3] mfd: 88pm860x: use REG resource for backlight Greg KH
2012-09-11  9:38 ` [PATCH 1/7] mfd: max8925: Move _IO resources out of ioport_ioresource Samuel Ortiz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1344364969-32489-3-git-send-email-broonie@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox